mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-11 21:43:54 +00:00
Added orbit.
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user