Class SetSpawnCommand
- java.lang.Object
-
- com.pneumaticraft.commandhandler.Command
-
- com.onarandombox.MultiverseCore.commands.MultiverseCommand
-
- com.onarandombox.MultiverseCore.commands.SetSpawnCommand
-
public class SetSpawnCommand extends MultiverseCommand
Sets the spawn for a world.
-
-
Field Summary
-
Fields inherited from class com.onarandombox.MultiverseCore.commands.MultiverseCommand
messaging, plugin
-
-
Constructor Summary
Constructors Constructor Description SetSpawnCommand(MultiverseCore plugin)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrunCommand(org.bukkit.command.CommandSender sender, java.util.List<java.lang.String> args)Dispatches the user's command depending on the number of parametersprotected voidsetWorldSpawn(org.bukkit.command.CommandSender sender)Set the world spawn when no parameters are givenprotected voidsetWorldSpawn(org.bukkit.command.CommandSender sender, java.lang.String world, java.lang.String x, java.lang.String y, java.lang.String z)Set the world spawn when 4 parameters are givenprotected voidsetWorldSpawn(org.bukkit.command.CommandSender sender, java.lang.String world, java.lang.String x, java.lang.String y, java.lang.String z, java.lang.String yaw, java.lang.String pitch)Set the world spawn when 6 parameters are given-
Methods inherited from class com.pneumaticraft.commandhandler.Command
addAdditonalPermission, addCommandExample, addKey, addKey, checkArgLength, getAllPermissionStrings, getCommandDesc, getCommandExamples, getCommandName, getCommandUsage, getKey, getKeys, getKeyStrings, getMaxArgs, getMinArgs, getNumKeyArgs, getPermission, getPermissionString, getPlugin, isOpRequired, removeKeyArgs, setArgRange, setCommandUsage, setName, setPermission, setPermission, showHelp
-
-
-
-
Constructor Detail
-
SetSpawnCommand
public SetSpawnCommand(MultiverseCore plugin)
-
-
Method Detail
-
runCommand
public void runCommand(org.bukkit.command.CommandSender sender, java.util.List<java.lang.String> args)Dispatches the user's command depending on the number of parameters- Specified by:
runCommandin classMultiverseCommand- Parameters:
sender- The player who executes the command, may be console as well.args- Command line parameters
-
setWorldSpawn
protected void setWorldSpawn(org.bukkit.command.CommandSender sender)
Set the world spawn when no parameters are given- Parameters:
sender- TheCommandSenderwho executes the command. Everything not aPlayer, e.g. console, gets rejected, as we can't get coordinates from there.
-
setWorldSpawn
protected void setWorldSpawn(org.bukkit.command.CommandSender sender, java.lang.String world, java.lang.String x, java.lang.String y, java.lang.String z)Set the world spawn when 4 parameters are given- Parameters:
sender- TheCommandSenderwho executes the commandworld- The world to set the spawn inx- X-coordinate to set the spawn to (as aStringas it's from the command line, gets parsed into a double)y- Y-coordinate to set the spawn to (as aStringas it's from the command line, gets parsed into a double)z- Z-coordinate to set the spawn to (as aStringas it's from the command line, gets parsed into a double)
-
setWorldSpawn
protected void setWorldSpawn(org.bukkit.command.CommandSender sender, java.lang.String world, java.lang.String x, java.lang.String y, java.lang.String z, java.lang.String yaw, java.lang.String pitch)Set the world spawn when 6 parameters are given- Parameters:
sender- TheCommandSenderwho executes the commandworld- The world to set the spawn inx- X-coordinate to set the spawn to (as aStringas it's from the command line, gets parsed into a double)y- Y-coordinate to set the spawn to (as aStringas it's from the command line, gets parsed into a double)z- Z-coordinate to set the spawn to (as aStringas it's from the command line, gets parsed into a double)yaw- Yaw a newly spawned player should look at (as aStringas it's from the command line, gets parsed into a float)pitch- Pitch a newly spawned player should look at (as aStringas it's from the command line, gets parsed into a float)
-
-