Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commands should be available at the server console #13

Open
zhuowei opened this issue Apr 12, 2011 · 3 comments
Open

Commands should be available at the server console #13

zhuowei opened this issue Apr 12, 2011 · 3 comments

Comments

@zhuowei
Copy link
Contributor

zhuowei commented Apr 12, 2011

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.

@grahamedgecombe
Copy link
Owner

Sounds good, will do at some point.

@grahamedgecombe
Copy link
Owner

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?

@Joe0
Copy link

Joe0 commented Jun 2, 2011

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants