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

Add a new command which is executable by all (non-ops too) #27

Closed
walterhiggins opened this issue Jan 15, 2013 · 1 comment
Closed

Add a new command which is executable by all (non-ops too) #27

walterhiggins opened this issue Jan 15, 2013 · 1 comment

Comments

@walterhiggins
Copy link
Owner

The goal is to be able to add new console commands via javascript - however, only operators should have access to the js command so for an op to create a new javascript function and have that function executable by all, it needs to be exposed via another command.

That command will be jsp - (short for js plugin , or js proxy or js protected - take your pick). jsp won't in fact evaluate any javascript code - that would leave the server wide open for all players - instead it looks up a lookup table of javascript functions which have been exposed for use by players.
For example...

/jsp home set

will make the plugin lookup a table to see if there is a 'home' javascript function defined and if there is it calls that function passing in each argument. The distinction between js and jsp is this - js evaluates javascript. jsp looks up a table for a specific javascript function (the 1st parameter supplied to jsp) and invokes that function passing in all subsequent parameters.
The plan is to use the common (among bukkit plugins/servers) home plugin commands as a test-bed.

basic commands:
/jsp home - takes the player home.
/jsp home set - sets the player's current location as home.
/jsp home delete - delete the home reference
/jsp home help - prints help about the command

social commands:
/jsp home - go to 's home.
/jsp home list - display whose homes you can visit
/jsp home ilist - display who can visit your home
/jsp home invite - invite player to your home
/jsp home uninvite - uninvite
/jsp home public - make your home public (anyone can visit)
/jsp home private - make your home private

admin commands:
/jsp home listall - list all of the homes on the server.
/jsp home clear - clears player's home from server.

See http://dev.bukkit.org/server-mods/myhome/ for reference.

@walterhiggins
Copy link
Owner Author

Added functionality to core to support exposure of plugin 'commands' to non operators, and persistence of plugin-state.

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

1 participant