feat: command to toggle all modules (dirty fix...)

This commit is contained in:
əlemi 2023-02-19 23:47:51 +01:00
parent c6dff8df7d
commit 184aa773ba
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -127,6 +127,19 @@ public class BoSCoVicino implements ICommons {
} }
}) })
); );
dispatcher.register(
Commands.literal("toggle-all")
.executes(ctx -> {
for (Module mod : BoSCoVicino.mods) {
if (mod.enabled.get()) {
mod.disable();
mod.enable();
}
}
return 1;
})
);
} }
@SubscribeEvent @SubscribeEvent