tutorial:commands
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
tutorial:commands [2020/06/14 05:17] – Move old categories below FAQ to be migrated i509vcb | tutorial:commands [2020/11/25 08:01] – Specify the class i509vcb | ||
---|---|---|---|
Line 159: | Line 159: | ||
public void onInitialize() { | public void onInitialize() { | ||
CommandRegistrationCallback.EVENT.register((dispatcher, | CommandRegistrationCallback.EVENT.register((dispatcher, | ||
- | if (dispatcher) { | + | if (dedicated) { |
TestDedicatedCommand.register(dispatcher); | TestDedicatedCommand.register(dispatcher); | ||
} | } | ||
Line 174: | Line 174: | ||
public void onInitialize() { | public void onInitialize() { | ||
CommandRegistrationCallback.EVENT.register((dispatcher, | CommandRegistrationCallback.EVENT.register((dispatcher, | ||
- | if (!dispatcher) { | + | if (!dedicated) { |
TestIntegratedCommand.register(dispatcher); | TestIntegratedCommand.register(dispatcher); | ||
} | } | ||
Line 254: | Line 254: | ||
You can do this but it is not recommended. You would get the '' | You can do this but it is not recommended. You would get the '' | ||
- | After that you need to send the command tree to every player again using '' | + | After that you need to send the command tree to every player again using '' |
==== Can I unregister commands in runtime? ==== | ==== Can I unregister commands in runtime? ==== |
tutorial/commands.txt · Last modified: 2024/02/23 14:22 by allen1210