You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In its current arrangement, commands needs a valid Player reference to execute.
Is there a way to restructure the command classes so that a valid player is no longer needed? One could run most of the commands simply by passing in the world.
for example, changing the execute signature from this:
public void execute(Player player, String[] args) {
to this:
public void execute(Player player, World world, String[] args) {
and now one could call many commands that does not apply to the current player by passing null as the player.
The text was updated successfully, but these errors were encountered:
I'm not sure how we should take care of this now given the multi-dimension support in #21, as there would be multiple world instances. Some commands might need to act over all of the world instances, for example. Any ideas?
Maybe have an optional parameter for the identifier for each server/world. If the parameter is left blank, then execute the command across all servers/worlds.
In its current arrangement, commands needs a valid Player reference to execute.
Is there a way to restructure the command classes so that a valid player is no longer needed? One could run most of the commands simply by passing in the world.
for example, changing the execute signature from this:
to this:
and now one could call many commands that does not apply to the current player by passing null as the player.
The text was updated successfully, but these errors were encountered: