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 command interfaces #29
Conversation
/** | ||
* | ||
*/ | ||
public interface CommandSource { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this interface do ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It represents the source of the command. (e.g. Player or Console)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm wouldn't it be better to use CommandSender as name? Like in NMS ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like CommandSource better, dont forget this is not a bukkit copy
Maybe CommandSource like sender for now. When execute command, run like this: public void execute(CommandSource cmd, String[] args){
} |
@nikosgram13: What do you mean by "Maybe CommandSource like sender"? |
Zidane mentioned he was planning a more "meaty" command system and I think with sk's recent work on Intake, and sk's desire for a non-crappy permission system, I'm betting that they'll want to tackle this. |
Here's a link to Intake: https://github.com/sk89q/Intake We'll have to discuss the equivalent to "CommandSender" though. |
@sk89q Intake looks sexy |
I prefer I like where intake is going, and I like the use of the annotation-based command registration. One feature that's critical to me, and the only reason I didn't look into intake further, is we should allow a parent command to still handle logic if the next argument doesn't match any of it's children, rather catching a thrown exception as a place to present the logic. |
c368a6d
to
b1babf2
Compare
fc421d8
to
74766ec
Compare
duplicated by #31 |
@botskonet Agreed, like i mentioned in the first commit |
import java.util.List; | ||
|
||
/** | ||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing description
* @return List of command aliases | ||
*/ | ||
List<String> getAliases(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whitespace
I ended up writing the command interfaces myself, sorry! See 8779e58. |
Adding some interfaces for commands.
I am open to suggestions on this pull request.