mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-30 10:05:59 +00:00
Merge with master
This commit is contained in:
commit
730b0e2c83
@ -1,3 +1,3 @@
|
|||||||
#Build Number for ANT. Do not edit!
|
#Build Number for ANT. Do not edit!
|
||||||
#Mon May 05 16:25:12 CEST 2014
|
#Mon May 05 16:09:04 CEST 2014
|
||||||
build.number=821
|
build.number=824
|
||||||
|
@ -130,9 +130,9 @@ public class Command_adminworld extends TFM_Command
|
|||||||
playerMsg("Could not add player to guest list.");
|
playerMsg("Could not add player to guest list.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (TFM_Util.isRemoveCommand(args[1]))
|
else if ("remove".equals(args[1]))
|
||||||
{
|
{
|
||||||
Player player = TFM_AdminWorld.getInstance().removeGuest(args[2]);
|
final Player player = TFM_AdminWorld.getInstance().removeGuest(args[2]);
|
||||||
if (player != null)
|
if (player != null)
|
||||||
{
|
{
|
||||||
TFM_Util.adminAction(sender.getName(), "AdminWorld guest removed: " + player.getName(), false);
|
TFM_Util.adminAction(sender.getName(), "AdminWorld guest removed: " + player.getName(), false);
|
||||||
|
@ -22,7 +22,7 @@ public class Command_cage extends TFM_Command
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TFM_Util.isStopCommand(args[0]) && sender instanceof Player)
|
if ("off".equals(args[0]) && sender instanceof Player)
|
||||||
{
|
{
|
||||||
TFM_Util.adminAction(sender.getName(), "Uncaging " + sender.getName(), true);
|
TFM_Util.adminAction(sender.getName(), "Uncaging " + sender.getName(), true);
|
||||||
TFM_PlayerData playerdata = TFM_PlayerData.getPlayerData(sender_p);
|
TFM_PlayerData playerdata = TFM_PlayerData.getPlayerData(sender_p);
|
||||||
@ -33,9 +33,9 @@ public class Command_cage extends TFM_Command
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if ("purge".equalsIgnoreCase(args[0]))
|
else if ("purge".equals(args[0]))
|
||||||
{
|
{
|
||||||
TFM_Util.adminAction(sender.getName(), "Uncaging all players.", true);
|
TFM_Util.adminAction(sender.getName(), "Uncaging all players", true);
|
||||||
|
|
||||||
for (Player player : server.getOnlinePlayers())
|
for (Player player : server.getOnlinePlayers())
|
||||||
{
|
{
|
||||||
@ -63,7 +63,7 @@ public class Command_cage extends TFM_Command
|
|||||||
|
|
||||||
if (args.length >= 2)
|
if (args.length >= 2)
|
||||||
{
|
{
|
||||||
if (TFM_Util.isStopCommand(args[1]))
|
if ("off".equals(args[1]))
|
||||||
{
|
{
|
||||||
TFM_Util.adminAction(sender.getName(), "Uncaging " + player.getName(), true);
|
TFM_Util.adminAction(sender.getName(), "Uncaging " + player.getName(), true);
|
||||||
|
|
||||||
|
@ -13,10 +13,9 @@ public class Command_denick extends TFM_Command
|
|||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
TFM_Util.adminAction(sender.getName(), "Removing all nicknames.", false);
|
TFM_Util.adminAction(sender.getName(), "Removing all nicknames", false);
|
||||||
|
|
||||||
Player[] onlinePlayers = server.getOnlinePlayers();
|
for (Player player : server.getOnlinePlayers())
|
||||||
for (Player player : onlinePlayers)
|
|
||||||
{
|
{
|
||||||
TFM_EssentialsBridge.getInstance().setNickname(player.getName(), null);
|
TFM_EssentialsBridge.getInstance().setNickname(player.getName(), null);
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package me.StevenLawson.TotalFreedomMod.Commands;
|
|||||||
import me.StevenLawson.TotalFreedomMod.TFM_AdminList;
|
import me.StevenLawson.TotalFreedomMod.TFM_AdminList;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Ban;
|
import me.StevenLawson.TotalFreedomMod.TFM_Ban;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_BanManager;
|
import me.StevenLawson.TotalFreedomMod.TFM_BanManager;
|
||||||
|
import me.StevenLawson.TotalFreedomMod.TFM_PlayerList;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
@ -51,8 +52,11 @@ public class Command_doom extends TFM_Command
|
|||||||
// deop
|
// deop
|
||||||
player.setOp(false);
|
player.setOp(false);
|
||||||
|
|
||||||
// ban IP
|
// ban IPs
|
||||||
TFM_BanManager.getInstance().addIpBan(new TFM_Ban(ip, player.getName()));
|
for (String playerIp : TFM_PlayerList.getInstance().getEntry(player).getIps())
|
||||||
|
{
|
||||||
|
TFM_BanManager.getInstance().addIpBan(new TFM_Ban(playerIp, player.getName()));
|
||||||
|
}
|
||||||
|
|
||||||
// ban name
|
// ban name
|
||||||
TFM_BanManager.getInstance().addUuidBan(new TFM_Ban(player.getUniqueId(), player.getName()));
|
TFM_BanManager.getInstance().addUuidBan(new TFM_Ban(player.getUniqueId(), player.getName()));
|
||||||
|
@ -55,13 +55,6 @@ public class Command_enchant extends TFM_Command
|
|||||||
{
|
{
|
||||||
for (Enchantment ench : Enchantment.values())
|
for (Enchantment ench : Enchantment.values())
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
2013-07-20 23:17:13 [INFO] [TotalFreedomMod]: Command Error: enchant
|
|
||||||
java.lang.NullPointerException
|
|
||||||
at net.minecraft.server.v1_6_R2.EnchantmentDurability.canEnchant(SourceFile:33)
|
|
||||||
at org.bukkit.craftbukkit.v1_6_R2.enchantments.CraftEnchantment.canEnchantItem(CraftEnchantment.java:55)
|
|
||||||
at me.StevenLawson.TotalFreedomMod.Commands.Command_enchant.run(Command_enchant.java:56)
|
|
||||||
*/
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (ench.canEnchantItem(itemInHand))
|
if (ench.canEnchantItem(itemInHand))
|
||||||
@ -122,7 +115,7 @@ public class Command_enchant extends TFM_Command
|
|||||||
playerMsg("Can't use this enchantment on held item.");
|
playerMsg("Can't use this enchantment on held item.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (TFM_Util.isRemoveCommand(args[0]))
|
else if (args[0].equals("remove"))
|
||||||
{
|
{
|
||||||
itemInHand.removeEnchantment(ench);
|
itemInHand.removeEnchantment(ench);
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH)
|
@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "Manage jumppads", usage = "/<command> <on | off | info |sideways <on | off> | strength <strength (1-10)>>", aliases = "launchpads,jp")
|
@CommandParameters(description = "Manage jumppads", usage = "/<command> <on | off | info | sideways <on | off> | strength <strength (1-10)>>", aliases = "launchpads,jp")
|
||||||
public class Command_jumppads extends TFM_Command
|
public class Command_jumppads extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@ -29,7 +29,7 @@ public class Command_jumppads extends TFM_Command
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TFM_Util.isStopCommand(args[0]))
|
if ("off".equals(args[0]))
|
||||||
{
|
{
|
||||||
TFM_Util.adminAction(sender.getName(), "Disabling Jumppads", false);
|
TFM_Util.adminAction(sender.getName(), "Disabling Jumppads", false);
|
||||||
TFM_Jumppads.getInstance().setMode(TFM_Jumppads.JumpPadMode.OFF);
|
TFM_Jumppads.getInstance().setMode(TFM_Jumppads.JumpPadMode.OFF);
|
||||||
@ -50,7 +50,7 @@ public class Command_jumppads extends TFM_Command
|
|||||||
|
|
||||||
if (args[0].equalsIgnoreCase("sideways"))
|
if (args[0].equalsIgnoreCase("sideways"))
|
||||||
{
|
{
|
||||||
if (TFM_Util.isStopCommand(args[1]))
|
if ("off".equals(args[1]))
|
||||||
{
|
{
|
||||||
TFM_Util.adminAction(sender.getName(), "Setting Jumppads mode to: Madgeek", false);
|
TFM_Util.adminAction(sender.getName(), "Setting Jumppads mode to: Madgeek", false);
|
||||||
TFM_Jumppads.getInstance().setMode(TFM_Jumppads.JumpPadMode.MADGEEK);
|
TFM_Jumppads.getInstance().setMode(TFM_Jumppads.JumpPadMode.MADGEEK);
|
||||||
|
@ -1,34 +0,0 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
|
||||||
import org.bukkit.command.Command;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH)
|
|
||||||
@CommandParameters(description = "Prevents new players from joining the server", usage = "/<command> <on | off>")
|
|
||||||
public class Command_lockdown extends TFM_Command
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
|
||||||
{
|
|
||||||
if (args.length != 1)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (TFM_Util.isStopCommand(args[0]))
|
|
||||||
{
|
|
||||||
TFM_Util.adminAction(sender.getName(), "De-activating server lockdown", true);
|
|
||||||
TotalFreedomMod.lockdownEnabled = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
TFM_Util.adminAction(sender.getName(), "Activating server lockdown", true);
|
|
||||||
TotalFreedomMod.lockdownEnabled = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
@ -59,7 +59,7 @@ public class Command_lockup extends TFM_Command
|
|||||||
startLockup(player);
|
startLockup(player);
|
||||||
playerMsg("Locked up " + player.getName() + ".");
|
playerMsg("Locked up " + player.getName() + ".");
|
||||||
}
|
}
|
||||||
else if (TFM_Util.isStopCommand(args[1]))
|
else if ("off".equals(args[1]))
|
||||||
{
|
{
|
||||||
final Player player = getPlayer(args[0]);
|
final Player player = getPlayer(args[0]);
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@ import java.util.Map.Entry;
|
|||||||
import me.StevenLawson.TotalFreedomMod.Config.TFM_ConfigEntry;
|
import me.StevenLawson.TotalFreedomMod.Config.TFM_ConfigEntry;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Log;
|
import me.StevenLawson.TotalFreedomMod.TFM_Log;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Admin;
|
import me.StevenLawson.TotalFreedomMod.TFM_Admin;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||||
import net.minecraft.util.org.apache.commons.lang3.StringUtils;
|
import net.minecraft.util.org.apache.commons.lang3.StringUtils;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
@ -32,7 +31,7 @@ public class Command_logs extends TFM_Command
|
|||||||
|
|
||||||
if (args.length == 1)
|
if (args.length == 1)
|
||||||
{
|
{
|
||||||
mode = (TFM_Util.isStopCommand(args[0]) ? LogsRegistrationMode.DELETE : LogsRegistrationMode.UPDATE);
|
mode = ("off".equals(args[0]) ? LogsRegistrationMode.DELETE : LogsRegistrationMode.UPDATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateLogsRegistration(sender, sender_p, mode);
|
updateLogsRegistration(sender, sender_p, mode);
|
||||||
|
@ -19,7 +19,7 @@ public class Command_nicknyan extends TFM_Command
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TFM_Util.isStopCommand(args[0]))
|
if ("off".equals(args[0]))
|
||||||
{
|
{
|
||||||
TFM_EssentialsBridge.getInstance().setNickname(sender.getName(), null);
|
TFM_EssentialsBridge.getInstance().setNickname(sender.getName(), null);
|
||||||
playerMsg("Nickname cleared.");
|
playerMsg("Nickname cleared.");
|
||||||
|
@ -11,7 +11,8 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH)
|
@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH)
|
||||||
@CommandParameters(description = "POW!!! Right in the kisser! One of these days Alice, straight to the Moon!", usage = "/<command> <target> [power]")
|
@CommandParameters(description = "POW!!! Right in the kisser! One of these days Alice, straight to the Moon!",
|
||||||
|
usage = "/<command> <target> [<<power> | stop>]")
|
||||||
public class Command_orbit extends TFM_Command
|
public class Command_orbit extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@ -36,7 +37,7 @@ public class Command_orbit extends TFM_Command
|
|||||||
|
|
||||||
if (args.length >= 2)
|
if (args.length >= 2)
|
||||||
{
|
{
|
||||||
if (TFM_Util.isStopCommand(args[1]))
|
if (args[1].equals("stop"))
|
||||||
{
|
{
|
||||||
playerMsg("Stopped orbiting " + player.getName());
|
playerMsg("Stopped orbiting " + player.getName());
|
||||||
playerdata.stopOrbiting();
|
playerdata.stopOrbiting();
|
||||||
@ -58,7 +59,7 @@ public class Command_orbit extends TFM_Command
|
|||||||
playerdata.startOrbiting(strength);
|
playerdata.startOrbiting(strength);
|
||||||
|
|
||||||
player.setVelocity(new Vector(0, strength, 0));
|
player.setVelocity(new Vector(0, strength, 0));
|
||||||
TFM_Util.adminAction(sender.getName(), "Orbiting " + player.getName() + ".", false);
|
TFM_Util.adminAction(sender.getName(), "Orbiting " + player.getName(), false);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ public class Command_protectarea extends TFM_Command
|
|||||||
}
|
}
|
||||||
else if (args.length == 2)
|
else if (args.length == 2)
|
||||||
{
|
{
|
||||||
if (TFM_Util.isRemoveCommand(args[0]))
|
if ("remove".equals(args[0]))
|
||||||
{
|
{
|
||||||
TFM_ProtectedArea.removeProtectedArea(args[1]);
|
TFM_ProtectedArea.removeProtectedArea(args[1]);
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ public class Command_saconfig extends TFM_Command
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TFM_Util.isRemoveCommand(args[0]))
|
if ("remove".equals(args[0]))
|
||||||
{
|
{
|
||||||
if (!TFM_AdminList.isSeniorAdmin(sender))
|
if (!TFM_AdminList.isSeniorAdmin(sender))
|
||||||
{
|
{
|
||||||
|
@ -62,7 +62,7 @@ public class Command_tag extends TFM_Command
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TFM_Util.isStopCommand(args[0]))
|
if ("remove".equals(args[0]))
|
||||||
{
|
{
|
||||||
TFM_PlayerData.getPlayerData(sender_p).setTag(null);
|
TFM_PlayerData.getPlayerData(sender_p).setTag(null);
|
||||||
playerMsg("Your tag has been removed.");
|
playerMsg("Your tag has been removed.");
|
||||||
|
@ -0,0 +1,37 @@
|
|||||||
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
|
import me.StevenLawson.TotalFreedomMod.TFM_PlayerData;
|
||||||
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
|
import net.minecraft.util.org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandPermissions(level = AdminLevel.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
|
@CommandParameters(description = "Gives you a tag with random colors", usage = "/<command> <tag>", aliases = "tn")
|
||||||
|
public class Command_tagnyan extends TFM_Command
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
|
{
|
||||||
|
if (args.length < 1)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
final StringBuilder tag = new StringBuilder();
|
||||||
|
|
||||||
|
for (char c : ChatColor.stripColor(TFM_Util.colorize(StringUtils.join(args, " "))).toCharArray())
|
||||||
|
{
|
||||||
|
tag.append(TFM_Util.randomChatColor()).append(c);
|
||||||
|
}
|
||||||
|
|
||||||
|
final TFM_PlayerData data = TFM_PlayerData.getPlayerData(sender_p);
|
||||||
|
data.setTag(tag.toString());
|
||||||
|
|
||||||
|
playerMsg("Set tag to " + tag);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
@ -4,6 +4,7 @@ import me.StevenLawson.TotalFreedomMod.Config.TFM_ConfigEntry;
|
|||||||
import me.StevenLawson.TotalFreedomMod.TFM_GameRuleHandler;
|
import me.StevenLawson.TotalFreedomMod.TFM_GameRuleHandler;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_GameRuleHandler.TFM_GameRule;
|
import me.StevenLawson.TotalFreedomMod.TFM_GameRuleHandler.TFM_GameRule;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
|
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -27,6 +28,7 @@ public class Command_toggle extends TFM_Command
|
|||||||
playerMsg("- lavadmg");
|
playerMsg("- lavadmg");
|
||||||
playerMsg("- firespread");
|
playerMsg("- firespread");
|
||||||
playerMsg("- prelog");
|
playerMsg("- prelog");
|
||||||
|
playerMsg("- lockdown");
|
||||||
playerMsg("- petprotect");
|
playerMsg("- petprotect");
|
||||||
playerMsg("- droptoggle");
|
playerMsg("- droptoggle");
|
||||||
playerMsg("- nonuke");
|
playerMsg("- nonuke");
|
||||||
@ -78,6 +80,13 @@ public class Command_toggle extends TFM_Command
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (args[0].equals("lockdown"))
|
||||||
|
{
|
||||||
|
TFM_Util.adminAction(sender.getName(), (TotalFreedomMod.lockdownEnabled ? "De-a" : "A") + "ctivating server lockdown", true);
|
||||||
|
TotalFreedomMod.lockdownEnabled = !TotalFreedomMod.lockdownEnabled;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (args[0].equals("petprotect"))
|
if (args[0].equals("petprotect"))
|
||||||
{
|
{
|
||||||
toggle("Tamed pet protection is", TFM_ConfigEntry.PET_PROTECT_ENABLED);
|
toggle("Tamed pet protection is", TFM_ConfigEntry.PET_PROTECT_ENABLED);
|
||||||
|
@ -13,7 +13,8 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
@CommandPermissions(level = AdminLevel.OP, source = SourceType.ONLY_IN_GAME)
|
@CommandPermissions(level = AdminLevel.OP, source = SourceType.ONLY_IN_GAME)
|
||||||
@CommandParameters(description = "Throw a mob in the direction you are facing when you left click with a stick.", usage = "/<command> <mobtype [speed] | off | list>")
|
@CommandParameters(description = "Throw a mob in the direction you are facing when you left click with a stick.",
|
||||||
|
usage = "/<command> <mobtype [speed] | off | list>")
|
||||||
public class Command_tossmob extends TFM_Command
|
public class Command_tossmob extends TFM_Command
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@ -30,7 +31,7 @@ public class Command_tossmob extends TFM_Command
|
|||||||
EntityType creature = EntityType.PIG;
|
EntityType creature = EntityType.PIG;
|
||||||
if (args.length >= 1)
|
if (args.length >= 1)
|
||||||
{
|
{
|
||||||
if (TFM_Util.isStopCommand(args[0]))
|
if ("off".equals(args[0]))
|
||||||
{
|
{
|
||||||
playerData.disableMobThrower();
|
playerData.disableMobThrower();
|
||||||
playerMsg("MobThrower is disabled.", ChatColor.GREEN);
|
playerMsg("MobThrower is disabled.", ChatColor.GREEN);
|
||||||
|
@ -28,7 +28,7 @@ public class Command_trail extends TFM_Command
|
|||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
if (args.length > 0 && TFM_Util.isStopCommand(args[0]))
|
if (args.length > 0 && "off".equals(args[0]))
|
||||||
{
|
{
|
||||||
trailPlayers.remove(sender_p);
|
trailPlayers.remove(sender_p);
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ public class Command_whitelist extends TFM_Command
|
|||||||
}
|
}
|
||||||
|
|
||||||
// remove
|
// remove
|
||||||
if (TFM_Util.isRemoveCommand(args[0]))
|
if ("remove".equals(args[0]))
|
||||||
{
|
{
|
||||||
if (args.length < 2)
|
if (args.length < 2)
|
||||||
{
|
{
|
||||||
|
@ -45,8 +45,6 @@ public class TFM_Util
|
|||||||
{
|
{
|
||||||
private static final Map<String, Integer> ejectTracker = new HashMap<String, Integer>();
|
private static final Map<String, Integer> ejectTracker = new HashMap<String, Integer>();
|
||||||
public static final Map<String, EntityType> mobtypes = new HashMap<String, EntityType>();
|
public static final Map<String, EntityType> mobtypes = new HashMap<String, EntityType>();
|
||||||
public static final List<String> STOP_COMMANDS = Arrays.asList("stop", "off", "end", "halt", "die");
|
|
||||||
public static final List<String> REMOVE_COMMANDS = Arrays.asList("del", "delete", "rem", "remove");
|
|
||||||
public static final List<String> DEVELOPERS = Arrays.asList("Madgeek1450", "DarthSalamon", "AcidicCyanide", "wild1145", "WickedGamingUK", "xXWilee999Xx");
|
public static final List<String> DEVELOPERS = Arrays.asList("Madgeek1450", "DarthSalamon", "AcidicCyanide", "wild1145", "WickedGamingUK", "xXWilee999Xx");
|
||||||
private static final Random RANDOM = new Random();
|
private static final Random RANDOM = new Random();
|
||||||
public static String DATE_STORAGE_FORMAT = "EEE, d MMM yyyy HH:mm:ss Z";
|
public static String DATE_STORAGE_FORMAT = "EEE, d MMM yyyy HH:mm:ss Z";
|
||||||
@ -430,16 +428,6 @@ public class TFM_Util
|
|||||||
return new File(plugin.getDataFolder(), name);
|
return new File(plugin.getDataFolder(), name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isStopCommand(String command)
|
|
||||||
{
|
|
||||||
return STOP_COMMANDS.contains(command.toLowerCase());
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean isRemoveCommand(String command)
|
|
||||||
{
|
|
||||||
return REMOVE_COMMANDS.contains(command.toLowerCase());
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void autoEject(Player player, String kickMessage)
|
public static void autoEject(Player player, String kickMessage)
|
||||||
{
|
{
|
||||||
EjectMethod method = EjectMethod.STRIKE_ONE;
|
EjectMethod method = EjectMethod.STRIKE_ONE;
|
||||||
|
Loading…
Reference in New Issue
Block a user