-
-
Notifications
You must be signed in to change notification settings - Fork 344
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
Added Command registration Support! #31
Conversation
I dont believe that Sponge likes to put 'I' in front of its classes. |
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. |
df1d74d
to
73083e5
Compare
Well you can still go anywhere with this approach. Also I still think permissions should be handled on execution level of the command and not somewhere else. |
ca7469a
to
9187893
Compare
c368a6d
to
b1babf2
Compare
fc421d8
to
74766ec
Compare
@@ -1,4 +1,4 @@ | |||
package org.spongepowered.example; | |||
package org.spongepowered.api; |
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.
Why change the package?
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.
Oh dangit I think Idea changed it when i tested the class.
duplication of #29 |
Squashed commits: [9187893] Removed my name from these Classes. (+1 squashed commits) Squashed commits: [ca7469a] Fixed Sponge denying field starting with a capital (+1 squashed commits) Squashed commits: [73083e5] Fixed license and sponge not liking "I" interfaces. (+1 squashed commits) Squashed commits: [7f607bf] Added Command registration Support!
Pretty sure @sk89q is working on something like this based on his work on sk89q/Intake. |
@@ -10,10 +10,12 @@ | |||
@SpongeEventHandler | |||
public void onInitialization(SpongeInitializationEvent event) { | |||
event.game.getLogger().info("Hey folks, this is INITIALIZATION!"); | |||
|
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.
Fix this
* @return | ||
*/ | ||
|
||
public String getCommandUsage(CommandSender sender); |
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.
Do not use public in interfaces
Oke working on it ;-;. (And ya i was looking at the wrong PR) |
@thomas15v Your PR does not merge. Please resolve the issue to have it reviewed further. Thanks! |
@thomas15v Also please identify how this PR is better/worse than #29 and why it should be pulled. Thanks! |
Conflicts: src/main/example/main/java/org/spongepowered/example/ExamplePlugin.java src/main/java/org/spongepowered/api/Game.java
Wait wait working on it. this isn't good ik. Dangit it is broke somehow ;-;. Rly ik this would turn out bad. |
Conflicts: src/main/java/org/spongepowered/api/Game.java
Finally! And @turt2live I honestly have no idea. This system should be a basic command system. Also the implementation is also working. |
public void onServerStarting(SpongeServerStartingEvent event) { | ||
event.game.getLogger().info("Hey...my implementation's server is starting?"); | ||
event.game.getCommandManager().registerCommand(new HelloWorldCommand()); | ||
|
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.
umm, missing brace? "}"
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.
No idea how I lost that one.
I ended up writing the command interfaces myself, sorry! See 8779e58. |
No Problem 👍. |
No description provided.