Added orbit.

This commit is contained in:
Steven Lawson 2011-10-10 22:26:11 -04:00
parent 41043845c7
commit 112382893d
3 changed files with 42 additions and 1 deletions

View File

@ -15,6 +15,7 @@ import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.util.Vector;
//TFM_Cmds_Admin:
//fr
@ -651,6 +652,42 @@ public class TFM_Cmds_Admin implements CommandExecutor
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
}
return true;
}
else if (cmd.getName().equalsIgnoreCase("orbit"))
{
if (senderIsConsole || plugin.isUserSuperadmin(sender))
{
if (args.length == 0)
{
return false;
}
Player p;
List<Player> matches = Bukkit.matchPlayer(args[0]);
if (matches.isEmpty())
{
sender.sendMessage(ChatColor.GRAY + "Can't find user " + args[0]);
return true;
}
else
{
p = matches.get(0);
}
double strength = 100.0;
if (args.length >= 2)
{
strength = Double.parseDouble(args[1]);
}
p.setVelocity(new Vector(0, strength, 0));
}
else
{
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
}
return true;
}
}

View File

@ -313,6 +313,7 @@ public class TotalFreedomMod extends JavaPlugin
this.getCommand("umd").setExecutor(AdminCommands);
this.getCommand("csay").setExecutor(AdminCommands);
this.getCommand("cage").setExecutor(AdminCommands);
this.getCommand("orbit").setExecutor(AdminCommands);
this.getCommand("explosives").setExecutor(AntiblockCommands);
this.getCommand("lavadmg").setExecutor(AntiblockCommands);

View File

@ -9,7 +9,7 @@ commands:
usage: /<command> [purge]
cage:
description: Superadmin command - Place a cage around someone.
usage: /<command> [partialname]
usage: /<command> <partialname> [off|outermaterial] [water|lava]
cake:
description: Superadmin command - For the people that are still alive.
usage: /<command>
@ -73,6 +73,9 @@ commands:
opme:
description: Superadmin command - Automatically ops user.
usage: /<command>
orbit:
description: Superadmin command - POW!!! Right in the kisser! One of these days Alice, straight to the Moon!
usage: /<command> <target> [power]
prelog:
description: Superadmin command - Enable/disable the command prelogger. When this is on, logs will be filled with many duplicate messages.
usage: /<command> <on|off>