Added "spawn" as a valid command in onCommand() and onTabComplete().
TeleportSubcommand.java:
parseCommand():
Added String that holds the current subCommand to use in MultiMessages. Also added check to see if the subCommand is "tp" and setting it equal to "teleport" if true because the MultiMessages would not work with "tp". Updated the check for valid number of arguments to include "spawn". Moved the checks for if the world is null and if the target Player is the sender into teleportToWorld(). Added switch to check if the command is "teleport" or "spawn" and then calling teleportToWorld() with the correct arguments for each case.
parseTabComplete():
Also added String for the current subCommand here. Added switch to check if the command is "teleport" or "spawn" and then check the number of arguments for tab completion.
teleportToWorld():
Everything is the same here as it was when it was in parseCommand() excpet it now uses targetPlayer instead of args[2] and world instead of args[1]. The String subCommand is being used in some MultiMessages here too.
messages.yml & plugin.yml:
Added "spawn" as a command in both of these files. Wasn't exactly sure what to do here, but I just based it on the teleport command since they are essentially the same.
Let me know about any problems and I'll fix them. Thanks.
PhantomWorldsCommand.java:
TeleportSubcommand.java:
parseCommand(): Added String that holds the current subCommand to use in MultiMessages. Also added check to see if the subCommand is "tp" and setting it equal to "teleport" if true because the MultiMessages would not work with "tp". Updated the check for valid number of arguments to include "spawn". Moved the checks for if the world is null and if the target Player is the sender into teleportToWorld(). Added switch to check if the command is "teleport" or "spawn" and then calling teleportToWorld() with the correct arguments for each case.
parseTabComplete(): Also added String for the current subCommand here. Added switch to check if the command is "teleport" or "spawn" and then check the number of arguments for tab completion.
teleportToWorld(): Everything is the same here as it was when it was in parseCommand() excpet it now uses targetPlayer instead of args[2] and world instead of args[1]. The String subCommand is being used in some MultiMessages here too.
messages.yml & plugin.yml:
Let me know about any problems and I'll fix them. Thanks.