Class SetSpawnCommand

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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
      protected void setWorldSpawn​(org.bukkit.command.CommandSender sender)
      Set the world spawn when no parameters are given
      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
      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
      • 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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:
        runCommand in class MultiverseCommand
        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 - The CommandSender who executes the command. Everything not a Player, 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 - The CommandSender who executes the command
        world - The world to set the spawn in
        x - X-coordinate to set the spawn to (as a String as it's from the command line, gets parsed into a double)
        y - Y-coordinate to set the spawn to (as a String as it's from the command line, gets parsed into a double)
        z - Z-coordinate to set the spawn to (as a String as 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 - The CommandSender who executes the command
        world - The world to set the spawn in
        x - X-coordinate to set the spawn to (as a String as it's from the command line, gets parsed into a double)
        y - Y-coordinate to set the spawn to (as a String as it's from the command line, gets parsed into a double)
        z - Z-coordinate to set the spawn to (as a String as it's from the command line, gets parsed into a double)
        yaw - Yaw a newly spawned player should look at (as a String as it's from the command line, gets parsed into a float)
        pitch - Pitch a newly spawned player should look at (as a String as it's from the command line, gets parsed into a float)