Merge branch 'Obi2kanobi-master'

This commit is contained in:
StevenLawson 2014-10-01 13:22:10 -04:00
commit 1565c9643d

View File

@ -1,7 +1,7 @@
package me.StevenLawson.TotalFreedomMod.Commands;
import me.StevenLawson.TotalFreedomMod.TFM_PlayerData;
import me.StevenLawson.TotalFreedomMod.TFM_AdminList;
import me.StevenLawson.TotalFreedomMod.TFM_PlayerData;
import me.StevenLawson.TotalFreedomMod.TFM_Util;
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
import org.bukkit.command.Command;
@ -10,13 +10,13 @@ import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable;
@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH)
@CommandParameters(description = "Mutes a player with brute force.", usage = "/<command> [<player> | list | purge | all]", aliases = "mute")
@CommandParameters(description = "Mutes a player with brute force.", usage = "/<command> [<player> [-s] | list | purge | all]", aliases = "mute")
public class Command_stfu extends TFM_Command
{
@Override
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
if (args.length != 1)
if (args.length == 0 || args.length > 2)
{
return false;
}
@ -119,6 +119,12 @@ public class Command_stfu extends TFM_Command
{
TFM_Util.adminAction(sender.getName(), "Muting " + player.getName(), true);
playerdata.setMuted(true);
if (args.length == 2 && args[1].equalsIgnoreCase("-s"))
{
Command_smite.smite(player);
}
playerMsg("Muted " + player.getName());
}
else