The various kinds of commands
#5
Wouldn't overloading commands be confusing?
But anyways, you can also create a register method, where you can register the command for specific types only.
The main goal of this attempt is to avoid code deduplication. Look at the /list command in the Core plugin.
It is defined in https://github.com/mc-server/Core/blob/m...le.lua#L86 and in https://github.com/mc-server/Core/blob/m...ist.lua#L1.
The result is: Nearly 100% copied code(except the command output) and in order to fix a command, you have to copy the code and slightly modify it.

Also the a_CommandOutput is too static in my eyes. Think of a command, which informs you, when a player mines a diamond block. You want to send single messages and not the whole message block at once.

P.S.: What about of giving permissions to command blocks? This would give the Server owners more control about the command blocks. Think of a command block, which can execute a /save-all on a specific action.
Reply
Thanks given by:


Messages In This Thread
The various kinds of commands - by xoft - 11-01-2015, 12:05 AM
RE: The various kinds of commands - by NiLSPACE - 11-01-2015, 12:24 AM
RE: The various kinds of commands - by bibo38 - 11-01-2015, 04:10 AM
RE: The various kinds of commands - by xoft - 11-01-2015, 08:03 AM
RE: The various kinds of commands - by bibo38 - 11-01-2015, 07:45 PM



Users browsing this thread: 1 Guest(s)