While using the plugin, I realized that if a world has spaces in the name, it would have errors looking up the sender/receiver ID. This was due to the way onCommand parses the commands into separate arguments based on the spaces. This fix uses URLEncode/URLDecode to ensure the IDs are passed around in commands in a single argument.
Why URL encode/decode? I could have just just merged all arguments to rebuild the ID, but this means the very last argument must be the ID, or it wont work. Using URL encoding the order of arguments becomes irrelevant, and future commands wont have to solve this problem either.
While using the plugin, I realized that if a world has spaces in the name, it would have errors looking up the sender/receiver ID. This was due to the way
onCommand
parses the commands into separate arguments based on the spaces. This fix uses URLEncode/URLDecode to ensure the IDs are passed around in commands in a single argument.Why URL encode/decode? I could have just just merged all arguments to rebuild the ID, but this means the very last argument must be the ID, or it wont work. Using URL encoding the order of arguments becomes irrelevant, and future commands wont have to solve this problem either.