mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-11 13:33:54 +00:00
wftgeuhjor
This commit is contained in:
@ -25,12 +25,7 @@ public class Command_consolesay extends FreedomCommand
|
||||
|
||||
String message = StringUtils.join(args, " ");
|
||||
FUtil.bcastMsg(String.format("§7[CONSOLE] §c%s §8» §f%s", sender.getName(), StringUtils.join(args, " ")));
|
||||
|
||||
// Send the message to Discord
|
||||
if (!ConfigEntry.ADMIN_ONLY_MODE.getBoolean() && !Bukkit.hasWhitelist())
|
||||
{
|
||||
plugin.dc.messageChatChannel("[CONSOLE] " + sender.getName() + " \u00BB " + ChatColor.stripColor(message));
|
||||
}
|
||||
plugin.dc.messageChatChannel("[CONSOLE] " + sender.getName() + " \u00BB " + ChatColor.stripColor(message));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -18,8 +18,8 @@ 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 | -q] <player> [reason] | list | purge | all]", aliases = "mute")
|
||||
public class Command_stfu extends FreedomCommand
|
||||
@CommandParameters(description = "Mutes a player with brute force.", usage = "/<command> [[-s | -q] <player> [reason] | list | purge | all]", aliases = "stfu")
|
||||
public class Command_mute extends FreedomCommand
|
||||
{
|
||||
|
||||
@Override
|
||||
@ -121,31 +121,14 @@ public class Command_stfu extends FreedomCommand
|
||||
}
|
||||
|
||||
FPlayer playerdata = plugin.pl.getPlayer(player);
|
||||
if (playerdata.isMuted())
|
||||
if (plugin.al.isAdmin(player))
|
||||
{
|
||||
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());
|
||||
|
||||
msg(player, "You have been unmuted.", ChatColor.RED);
|
||||
player.sendTitle(ChatColor.RED + "You've been unmuted.", ChatColor.YELLOW + "Be sure to follow the rules!", 20, 100, 60);
|
||||
msg(player.getName() + " is an admin, and can't be muted.");
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (plugin.al.isAdmin(player))
|
||||
{
|
||||
msg(player.getName() + " is an admin, and can't be muted.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!playerdata.isMuted())
|
||||
{
|
||||
if (quiet)
|
||||
{
|
||||
playerdata.setMuted(true);
|
||||
@ -166,13 +149,17 @@ public class Command_stfu extends FreedomCommand
|
||||
player.sendTitle(ChatColor.RED + "You've been muted.", ChatColor.YELLOW + "Be sure to follow the rules!", 20, 100, 60);
|
||||
if (reason != null)
|
||||
{
|
||||
msg(player, "Reason: " + ChatColor.YELLOW + reason);
|
||||
msg(player, ChatColor.RED + "Reason: " + ChatColor.YELLOW + reason);
|
||||
}
|
||||
msg("Muted " + player.getName());
|
||||
|
||||
plugin.pul.logPunishment(new Punishment(player.getName(), Ips.getIp(player), sender.getName(), PunishmentType.MUTE, reason));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
msg(ChatColor.RED + "That player is already muted.");
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
@ -41,6 +41,7 @@ public class Command_say extends FreedomCommand
|
||||
}
|
||||
|
||||
FUtil.bcastMsg(String.format("[Server:%s] %s", sender.getName(), message), ChatColor.LIGHT_PURPLE);
|
||||
plugin.dc.messageChatChannel(String.format("[Server:%s] \u00BB %s", sender.getName(), message));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -149,7 +149,6 @@ public class Command_verify extends FreedomCommand
|
||||
|
||||
final FPlayer fPlayer = plugin.pl.getPlayer(playerSender);
|
||||
FUtil.bcastMsg(playerSender.getName() + " has verified!", ChatColor.GOLD);
|
||||
plugin.rm.updateDisplay(playerSender);
|
||||
playerSender.setOp(true);
|
||||
msg(YOU_ARE_OP);
|
||||
if (fPlayer.getFreezeData().isFrozen())
|
||||
@ -158,6 +157,7 @@ public class Command_verify extends FreedomCommand
|
||||
msg("You have been unfrozen.");
|
||||
}
|
||||
plugin.pv.verifyPlayer(playerSender, backupCode);
|
||||
plugin.rm.updateDisplay(playerSender);
|
||||
return true;
|
||||
}
|
||||
else if (plugin.al.isAdminImpostor(playerSender))
|
||||
|
Reference in New Issue
Block a user