Plot-System
Plot-System copied to clipboard
[Bug] - Tutorial doesn't count commands prefixed by the plugin name
Description
using commands such as: /fastasyncworldedit:/line instead of //line is not counted //pos(1|2) instead of interact/attack don't work during the tutorial (don't ask me why I tried) and I would also assume //wand has the same problem
For all I know, these problems are simple enough to fix, and are NOT high priority
Steps to Reproduce
- Do the tutorial until the outline step
- Start drawing one of the lines (depending on which you want to test, try using //pos(1|2) or the wand)
- use /fastasyncworldedit:/line instead of //line
Possible Solution
The following snippet of code should handle regulation and turning aliases into the command's actual name
This was mocked up inside GitHub's README editor, not in an IDE, in case it doesn't work
Command cmd = Bukkit.getCommandMap().getCommand("command");
assert cmd != null; // PLEASE DO NOT ACTUALLY USE assert IN THE CODE
if (cmd.getName() == "said command") {/* Do Stuff */};