-
Notifications
You must be signed in to change notification settings - Fork 421
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
Adding some helpful changes #981
base: master
Are you sure you want to change the base?
Conversation
@@ -3308,6 +3308,12 @@ public boolean chat(String message) { | |||
this.resetCraftingGridType(); | |||
this.craftingType = CRAFTING_SMALL; | |||
|
|||
// adding command execution like in Nukkit-DOC -> see above | |||
if(message.startsWith("/")) { |
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.
But why?
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 just think player.chat("/say hi"); is better and faster written then player.getServer().dispatchCommand(player, "say hi"); and its written in the javadoc if a message starts with / in player.chat method it would be dispatched as command... :)
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.
That doc comment looks like a mistake when commands were given their own packet in 1.2
…ages Fixes CloudburstMC#981 magma, lava, and starvation death messages
Adding * // negative permission for * users to remove solo perms from *
Adding getNearbyEntities // getNearbyPlayers methods to player object
Adding Command-executor to player.chat() method ( if message starts with a / ) like in DOCs described