crwdns126423:0crwdne126423:0
Note
crwdns126425:0crwdne126425:0
crwdns126427:0crwdne126427:0
crwdns126429:0crwdne126429:0
crwdns126431:0crwdne126431:0
crwdns126433:0crwdne126433:0
crwdns126435:0crwdne126435:0
Tip
crwdns126437:0:doc:crwdnd126437:0:doc:crwdnd126437:0:doc:crwdne126437:0
crwdns126439:0crwdne126439:0
crwdns126441:0crwdne126441:0
Note
crwdns126443:0crwdne126443:0
crwdns126445:0crwdne126445:0
private boolean registered = false;
@Listener
public void onInit(GameInitializationEvent event) {
Sponge.getCommandManager().register(this,
CommandSpec.builder().executor((source, context) -> {
if (this.registered) {
this.registered = false;
Sponge.getEventManager().unregisterListeners(this.listener);
} else {
this.registered = true;
Sponge.getEventManager().registerListeners(this, this.listener);
}
return CommandResult.success();
}).build(), "flowerPotTest");
}
Note
crwdns126447:0crwdne126447:0