You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider the following code (to create a chatroom, in this particular case) in a command:
@Subcommand("create")
publicvoidcreate(CommandSendersender, @SingleStringname, @Single@OptionalStringpassword) {
// some action
}
If a user types /room_create__something (please think of _ as a space, a double space was formatted away in this editor) name is an empty string and password will be something (because of the double space between create and something!)
As you cannot call other commands that have a String parameter as the last parameter with an empty string by just adding spaces (e.g. /room_delete__), I doubt that this works as intended - I would expect the second argument to actually be the second argument instead of supplying me with an empty string.
The text was updated successfully, but these errors were encountered:
Consider the following code (to create a chatroom, in this particular case) in a command:
If a user types
/room_create__something
(please think of_
as a space, a double space was formatted away in this editor) name is an empty string and password will besomething
(because of the double space betweencreate
andsomething
!)As you cannot call other commands that have a String parameter as the last parameter with an empty string by just adding spaces (e.g.
/room_delete__
), I doubt that this works as intended - I would expect the second argument to actually be the second argument instead of supplying me with an empty string.The text was updated successfully, but these errors were encountered: