wftgeuhjor

This commit is contained in:
ZeroEpoch1969 2020-04-22 01:23:51 -07:00
parent bc8ff3cd7f
commit a523cc313c
No known key found for this signature in database
GPG Key ID: A7BAB4E14F089CF3
9 changed files with 58 additions and 35 deletions

View File

@ -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;
}

View File

@ -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:

View File

@ -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;
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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))

View File

@ -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("<li>").append(tag).append(player.getName()).append("</li>\r\n");
}

View File

@ -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<String> 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;
}

View File

@ -194,4 +194,22 @@ public class Groups
Material.WHITE_WALL_BANNER,
Material.YELLOW_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);
}