mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-11 13:33:54 +00:00
why dont i ever commit
This commit is contained in:
@ -9,7 +9,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
|
||||
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.ONLY_CONSOLE, blockHostConsole = true)
|
||||
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.BOTH, blockHostConsole = true)
|
||||
@CommandParameters(description = "Block a player's Minecraft input. This is evil, and I never should have wrote it.", usage = "/<command> <all | purge | <<partialname> on | off>>")
|
||||
public class Command_lockup extends FreedomCommand
|
||||
{
|
||||
|
@ -21,7 +21,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
|
||||
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||
@CommandParameters(description = "Access the shop", usage = "/<command> <buy> <item>")
|
||||
@CommandParameters(description = "Access the shop", usage = "/<command> <buy <item> | action | list>")
|
||||
public class Command_shop extends FreedomCommand
|
||||
{
|
||||
private final List<String> locations = Arrays.asList("Sofa", "Car", "Bed", "Kitchen", "Garage", "Basement", "Home Study");
|
||||
@ -70,6 +70,16 @@ public class Command_shop extends FreedomCommand
|
||||
cooldown(30, args[0]);
|
||||
return true;
|
||||
}
|
||||
case "list":
|
||||
case "items":
|
||||
{
|
||||
msg(prefix + ChatColor.GREEN + "Available items:");
|
||||
for (ShopItem item : ShopItem.values())
|
||||
{
|
||||
msg(prefix + ChatColor.AQUA + item.getName() + ChatColor.GREEN + " - " + ChatColor.RED + item.getCost());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
default:
|
||||
{
|
||||
return false;
|
||||
|
@ -18,7 +18,7 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||
@CommandParameters(description = "Mutes a player with brute force.", usage = "/<command> [[-s] <player> [reason] | list | purge | all]", aliases = "mute")
|
||||
@CommandParameters(description = "Mutes a player with brute force.", usage = "/<command> [[-s | -q] <player> [reason] | list | purge | all]", aliases = "mute")
|
||||
public class Command_stfu extends FreedomCommand
|
||||
{
|
||||
|
||||
@ -95,7 +95,9 @@ public class Command_stfu extends FreedomCommand
|
||||
|
||||
// -s option (smite)
|
||||
boolean smite = args[0].equals("-s");
|
||||
if (smite)
|
||||
// -q option (shadowmute)
|
||||
boolean quiet = args[0].equals("-q");
|
||||
if (smite || quiet)
|
||||
{
|
||||
args = ArrayUtils.subarray(args, 1, args.length);
|
||||
|
||||
@ -121,6 +123,14 @@ public class Command_stfu extends FreedomCommand
|
||||
FPlayer playerdata = plugin.pl.getPlayer(player);
|
||||
if (playerdata.isMuted())
|
||||
{
|
||||
if (quiet || playerdata.isQuietMuted())
|
||||
{
|
||||
playerdata.setMuted(false);
|
||||
playerdata.setQuietMuted(false);
|
||||
msg("Unmuted " + player.getName() + " quietly");
|
||||
return true;
|
||||
}
|
||||
|
||||
FUtil.adminAction(sender.getName(), "Unmuting " + player.getName(), true);
|
||||
playerdata.setMuted(false);
|
||||
msg("Unmuted " + player.getName());
|
||||
@ -136,6 +146,14 @@ public class Command_stfu extends FreedomCommand
|
||||
return true;
|
||||
}
|
||||
|
||||
if (quiet)
|
||||
{
|
||||
playerdata.setMuted(true);
|
||||
playerdata.setQuietMuted(true);
|
||||
msg("Muted " + player.getName() + " quietly");
|
||||
return true;
|
||||
}
|
||||
|
||||
FUtil.adminAction(sender.getName(), "Muting " + player.getName(), true);
|
||||
playerdata.setMuted(true);
|
||||
|
||||
|
@ -0,0 +1,21 @@
|
||||
package me.totalfreedom.totalfreedommod.command;
|
||||
|
||||
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@CommandPermissions(level = Rank.TELNET_ADMIN, source = SourceType.BOTH)
|
||||
@CommandParameters(description = "Toggle the server chat.", usage = "/<command>", aliases = "tc")
|
||||
public class Command_togglechat extends FreedomCommand
|
||||
{
|
||||
@Override
|
||||
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||
{
|
||||
ConfigEntry.TOGGLE_CHAT.setBoolean(!ConfigEntry.TOGGLE_CHAT.getBoolean());
|
||||
FUtil.adminAction(sender.getName(), "Chat " + (ConfigEntry.TOGGLE_CHAT.getBoolean() ? "enabled" : "disabled") + ".", true);
|
||||
return true;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user