mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Added orbit.
This commit is contained in:
parent
41043845c7
commit
112382893d
@ -15,6 +15,7 @@ import org.bukkit.command.CommandExecutor;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
//TFM_Cmds_Admin:
|
//TFM_Cmds_Admin:
|
||||||
//fr
|
//fr
|
||||||
@ -651,6 +652,42 @@ public class TFM_Cmds_Admin implements CommandExecutor
|
|||||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -313,6 +313,7 @@ public class TotalFreedomMod extends JavaPlugin
|
|||||||
this.getCommand("umd").setExecutor(AdminCommands);
|
this.getCommand("umd").setExecutor(AdminCommands);
|
||||||
this.getCommand("csay").setExecutor(AdminCommands);
|
this.getCommand("csay").setExecutor(AdminCommands);
|
||||||
this.getCommand("cage").setExecutor(AdminCommands);
|
this.getCommand("cage").setExecutor(AdminCommands);
|
||||||
|
this.getCommand("orbit").setExecutor(AdminCommands);
|
||||||
|
|
||||||
this.getCommand("explosives").setExecutor(AntiblockCommands);
|
this.getCommand("explosives").setExecutor(AntiblockCommands);
|
||||||
this.getCommand("lavadmg").setExecutor(AntiblockCommands);
|
this.getCommand("lavadmg").setExecutor(AntiblockCommands);
|
||||||
|
@ -9,7 +9,7 @@ commands:
|
|||||||
usage: /<command> [purge]
|
usage: /<command> [purge]
|
||||||
cage:
|
cage:
|
||||||
description: Superadmin command - Place a cage around someone.
|
description: Superadmin command - Place a cage around someone.
|
||||||
usage: /<command> [partialname]
|
usage: /<command> <partialname> [off|outermaterial] [water|lava]
|
||||||
cake:
|
cake:
|
||||||
description: Superadmin command - For the people that are still alive.
|
description: Superadmin command - For the people that are still alive.
|
||||||
usage: /<command>
|
usage: /<command>
|
||||||
@ -73,6 +73,9 @@ commands:
|
|||||||
opme:
|
opme:
|
||||||
description: Superadmin command - Automatically ops user.
|
description: Superadmin command - Automatically ops user.
|
||||||
usage: /<command>
|
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:
|
prelog:
|
||||||
description: Superadmin command - Enable/disable the command prelogger. When this is on, logs will be filled with many duplicate messages.
|
description: Superadmin command - Enable/disable the command prelogger. When this is on, logs will be filled with many duplicate messages.
|
||||||
usage: /<command> <on|off>
|
usage: /<command> <on|off>
|
||||||
|
Loading…
Reference in New Issue
Block a user