Convert codebase to JMC #1

Merged
ehrumsey merged 9 commits from dev into master 2025-02-26 00:51:24 -06:00
Showing only changes of commit 559117352e - Show all commits

View File

@ -1,10 +1,22 @@
@lazy
function triggerCommand(objective, function) {
scoreboard players enable @a $objective;
execute as @a[scores={$objective=1..}] run function $function;
execute as @a[scores={$objective=1..}] run $function;
scoreboard players set @a $objective 0;
}
function command.transport_creative() {
transfer 10.0.0.13 25566;
}
function command.transport_SMP() {
transfer 10.0.0.13 25565;
}
function command.open_menu() {
guis open menu;
}
class command {
@add(__load__)
function commandsLoad() {
@ -15,20 +27,8 @@ class command {
@add(__tick__)
function commandsTick() {
triggerCommand(transportCreative, this.transport_creative());
triggerCommand(transportSMP, this.transport_SMP());
triggerCommand(menu, this.menu());
}
function transport_creative() {
transfer 10.0.0.13 25566;
}
function transport_SMP() {
transfer 10.0.0.13 25565;
}
function open_menu() {
guis open menu;
triggerCommand(transportCreative, command.transport_creative());
triggerCommand(transportSMP, command.transport_SMP());
triggerCommand(menu, command.open_menu());
}
}