mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-30 10:05:59 +00:00
wftgeuhjor
This commit is contained in:
parent
bc8ff3cd7f
commit
a523cc313c
@ -61,7 +61,7 @@ public class EntityWiper extends FreedomService
|
|||||||
{
|
{
|
||||||
if (!(entity instanceof Player))
|
if (!(entity instanceof Player))
|
||||||
{
|
{
|
||||||
if (!bypassBlacklist && (BLACKLIST.contains(entity.getType()) || Groups.MOB_TYPES.contains(entity.getType())))
|
if ((!bypassBlacklist && BLACKLIST.contains(entity.getType())) || Groups.MOB_TYPES.contains(entity.getType()))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ import me.totalfreedom.totalfreedommod.util.FLog;
|
|||||||
import me.totalfreedom.totalfreedommod.util.Groups;
|
import me.totalfreedom.totalfreedommod.util.Groups;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.block.Biome;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
@ -88,6 +89,14 @@ public class InteractBlocker extends FreedomService
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Groups.BED_COLORS.contains(event.getMaterial()) && event.getClickedBlock().getBiome().equals(Biome.NETHER))
|
||||||
|
{
|
||||||
|
player.sendMessage(ChatColor.RED + "You can't sleep in hell.");
|
||||||
|
event.setCancelled(true);
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
switch (event.getMaterial())
|
switch (event.getMaterial())
|
||||||
{
|
{
|
||||||
case WATER_BUCKET:
|
case WATER_BUCKET:
|
||||||
|
@ -25,12 +25,7 @@ public class Command_consolesay extends FreedomCommand
|
|||||||
|
|
||||||
String message = StringUtils.join(args, " ");
|
String message = StringUtils.join(args, " ");
|
||||||
FUtil.bcastMsg(String.format("§7[CONSOLE] §c%s §8» §f%s", sender.getName(), 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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,8 +18,8 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
@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")
|
@CommandParameters(description = "Mutes a player with brute force.", usage = "/<command> [[-s | -q] <player> [reason] | list | purge | all]", aliases = "stfu")
|
||||||
public class Command_stfu extends FreedomCommand
|
public class Command_mute extends FreedomCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -121,31 +121,14 @@ public class Command_stfu extends FreedomCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
FPlayer playerdata = plugin.pl.getPlayer(player);
|
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());
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (plugin.al.isAdmin(player))
|
if (plugin.al.isAdmin(player))
|
||||||
{
|
{
|
||||||
msg(player.getName() + " is an admin, and can't be muted.");
|
msg(player.getName() + " is an admin, and can't be muted.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!playerdata.isMuted())
|
||||||
|
{
|
||||||
if (quiet)
|
if (quiet)
|
||||||
{
|
{
|
||||||
playerdata.setMuted(true);
|
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);
|
player.sendTitle(ChatColor.RED + "You've been muted.", ChatColor.YELLOW + "Be sure to follow the rules!", 20, 100, 60);
|
||||||
if (reason != null)
|
if (reason != null)
|
||||||
{
|
{
|
||||||
msg(player, "Reason: " + ChatColor.YELLOW + reason);
|
msg(player, ChatColor.RED + "Reason: " + ChatColor.YELLOW + reason);
|
||||||
}
|
}
|
||||||
msg("Muted " + player.getName());
|
msg("Muted " + player.getName());
|
||||||
|
|
||||||
plugin.pul.logPunishment(new Punishment(player.getName(), Ips.getIp(player), sender.getName(), PunishmentType.MUTE, reason));
|
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;
|
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);
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -149,7 +149,6 @@ public class Command_verify extends FreedomCommand
|
|||||||
|
|
||||||
final FPlayer fPlayer = plugin.pl.getPlayer(playerSender);
|
final FPlayer fPlayer = plugin.pl.getPlayer(playerSender);
|
||||||
FUtil.bcastMsg(playerSender.getName() + " has verified!", ChatColor.GOLD);
|
FUtil.bcastMsg(playerSender.getName() + " has verified!", ChatColor.GOLD);
|
||||||
plugin.rm.updateDisplay(playerSender);
|
|
||||||
playerSender.setOp(true);
|
playerSender.setOp(true);
|
||||||
msg(YOU_ARE_OP);
|
msg(YOU_ARE_OP);
|
||||||
if (fPlayer.getFreezeData().isFrozen())
|
if (fPlayer.getFreezeData().isFrozen())
|
||||||
@ -158,6 +157,7 @@ public class Command_verify extends FreedomCommand
|
|||||||
msg("You have been unfrozen.");
|
msg("You have been unfrozen.");
|
||||||
}
|
}
|
||||||
plugin.pv.verifyPlayer(playerSender, backupCode);
|
plugin.pv.verifyPlayer(playerSender, backupCode);
|
||||||
|
plugin.rm.updateDisplay(playerSender);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (plugin.al.isAdminImpostor(playerSender))
|
else if (plugin.al.isAdminImpostor(playerSender))
|
||||||
|
@ -40,6 +40,11 @@ public class Module_list extends HTTPDModule
|
|||||||
for (Player player : Bukkit.getOnlinePlayers())
|
for (Player player : Bukkit.getOnlinePlayers())
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (plugin.al.vanished.contains(player))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (isImposter(player))
|
if (isImposter(player))
|
||||||
{
|
{
|
||||||
imposters.add(player.getName());
|
imposters.add(player.getName());
|
||||||
@ -123,6 +128,10 @@ public class Module_list extends HTTPDModule
|
|||||||
|
|
||||||
for (Player player : onlinePlayers)
|
for (Player player : onlinePlayers)
|
||||||
{
|
{
|
||||||
|
if (plugin.al.vanished.contains(player))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
String tag = plugin.rm.getDisplay(player).getTag();
|
String tag = plugin.rm.getDisplay(player).getTag();
|
||||||
body.append("<li>").append(tag).append(player.getName()).append("</li>\r\n");
|
body.append("<li>").append(tag).append(player.getName()).append("</li>\r\n");
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,7 @@ import java.util.UUID;
|
|||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import javax.net.ssl.HttpsURLConnection;
|
import javax.net.ssl.HttpsURLConnection;
|
||||||
|
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
|
||||||
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
@ -146,9 +147,12 @@ public class FUtil
|
|||||||
{
|
{
|
||||||
List<String> names = new ArrayList<>();
|
List<String> names = new ArrayList<>();
|
||||||
for (Player player : Bukkit.getOnlinePlayers())
|
for (Player player : Bukkit.getOnlinePlayers())
|
||||||
|
{
|
||||||
|
if (!TotalFreedomMod.plugin().al.vanished.contains(player))
|
||||||
{
|
{
|
||||||
names.add(player.getName());
|
names.add(player.getName());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return names;
|
return names;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,4 +194,22 @@ public class Groups
|
|||||||
Material.WHITE_WALL_BANNER,
|
Material.WHITE_WALL_BANNER,
|
||||||
Material.YELLOW_BANNER,
|
Material.YELLOW_BANNER,
|
||||||
Material.YELLOW_WALL_BANNER);
|
Material.YELLOW_WALL_BANNER);
|
||||||
|
|
||||||
|
public static final List<Material> BED_COLORS = Arrays.asList(
|
||||||
|
Material.WHITE_BED,
|
||||||
|
Material.RED_BED,
|
||||||
|
Material.ORANGE_BED,
|
||||||
|
Material.YELLOW_BED,
|
||||||
|
Material.GREEN_BED,
|
||||||
|
Material.LIME_BED,
|
||||||
|
Material.LIGHT_BLUE_BED,
|
||||||
|
Material.CYAN_BED,
|
||||||
|
Material.BLUE_BED,
|
||||||
|
Material.PURPLE_BED,
|
||||||
|
Material.MAGENTA_BED,
|
||||||
|
Material.PINK_BED,
|
||||||
|
Material.BROWN_BED,
|
||||||
|
Material.GRAY_BED,
|
||||||
|
Material.LIGHT_GRAY_BED,
|
||||||
|
Material.BLACK_BED);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user