diff --git a/src/main/java/me/totalfreedom/totalfreedommod/EntityWiper.java b/src/main/java/me/totalfreedom/totalfreedommod/EntityWiper.java index 030b9ac0..752d52d5 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/EntityWiper.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/EntityWiper.java @@ -61,7 +61,7 @@ public class EntityWiper extends FreedomService { 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; } diff --git a/src/main/java/me/totalfreedom/totalfreedommod/blocking/InteractBlocker.java b/src/main/java/me/totalfreedom/totalfreedommod/blocking/InteractBlocker.java index 522712d8..8c89f6b5 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/blocking/InteractBlocker.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/blocking/InteractBlocker.java @@ -7,6 +7,7 @@ import me.totalfreedom.totalfreedommod.util.FLog; import me.totalfreedom.totalfreedommod.util.Groups; import org.bukkit.ChatColor; import org.bukkit.Material; +import org.bukkit.block.Biome; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -88,6 +89,14 @@ public class InteractBlocker extends FreedomService 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()) { case WATER_BUCKET: diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_consolesay.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_consolesay.java index 15ff25c8..b92cede2 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_consolesay.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_consolesay.java @@ -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; } } diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_stfu.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_mute.java similarity index 84% rename from src/main/java/me/totalfreedom/totalfreedommod/command/Command_stfu.java rename to src/main/java/me/totalfreedom/totalfreedommod/command/Command_mute.java index 7f162697..6911c9d7 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_stfu.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_mute.java @@ -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 = "/ [[-s | -q] [reason] | list | purge | all]", aliases = "mute") -public class Command_stfu extends FreedomCommand +@CommandParameters(description = "Mutes a player with brute force.", usage = "/ [[-s | -q] [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; } diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_say.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_say.java index 2b32f9b7..8b493629 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_say.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_say.java @@ -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; } diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_verify.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_verify.java index f6a382b1..827d8736 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_verify.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_verify.java @@ -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)) diff --git a/src/main/java/me/totalfreedom/totalfreedommod/httpd/module/Module_list.java b/src/main/java/me/totalfreedom/totalfreedommod/httpd/module/Module_list.java index d63e520b..eff3e06c 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/httpd/module/Module_list.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/httpd/module/Module_list.java @@ -40,6 +40,11 @@ public class Module_list extends HTTPDModule for (Player player : Bukkit.getOnlinePlayers()) { + if (plugin.al.vanished.contains(player)) + { + continue; + } + if (isImposter(player)) { imposters.add(player.getName()); @@ -123,6 +128,10 @@ public class Module_list extends HTTPDModule for (Player player : onlinePlayers) { + if (plugin.al.vanished.contains(player)) + { + continue; + } String tag = plugin.rm.getDisplay(player).getTag(); body.append("
  • ").append(tag).append(player.getName()).append("
  • \r\n"); } diff --git a/src/main/java/me/totalfreedom/totalfreedommod/util/FUtil.java b/src/main/java/me/totalfreedom/totalfreedommod/util/FUtil.java index 63e73846..c4eae300 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/util/FUtil.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/util/FUtil.java @@ -27,6 +27,7 @@ import java.util.UUID; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.net.ssl.HttpsURLConnection; +import me.totalfreedom.totalfreedommod.TotalFreedomMod; import me.totalfreedom.totalfreedommod.config.ConfigEntry; import org.apache.commons.io.FileUtils; import org.apache.commons.lang.StringUtils; @@ -147,7 +148,10 @@ public class FUtil List names = new ArrayList<>(); for (Player player : Bukkit.getOnlinePlayers()) { - names.add(player.getName()); + if (!TotalFreedomMod.plugin().al.vanished.contains(player)) + { + names.add(player.getName()); + } } return names; } diff --git a/src/main/java/me/totalfreedom/totalfreedommod/util/Groups.java b/src/main/java/me/totalfreedom/totalfreedommod/util/Groups.java index 5ff850e0..76c24499 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/util/Groups.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/util/Groups.java @@ -194,4 +194,22 @@ public class Groups Material.WHITE_WALL_BANNER, Material.YELLOW_BANNER, Material.YELLOW_WALL_BANNER); + + public static final List 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); }