it compiles now

This commit is contained in:
Telesphoreo 2020-08-15 17:58:48 -05:00
parent 7a810519f3
commit 04a7b633a4
43 changed files with 145 additions and 137 deletions

View File

@ -140,13 +140,6 @@
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.github.MyzelYam</groupId>
<artifactId>SuperVanish</artifactId>
<version>6.1.8</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>

View File

@ -5,9 +5,9 @@ import java.util.Arrays;
import java.util.List;
import joptsimple.internal.Strings;
import lombok.Getter;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.json.simple.JSONObject;

View File

@ -1,11 +1,11 @@
package me.totalfreedom.totalfreedommod;
import com.google.common.base.Strings;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import me.totalfreedom.totalfreedommod.player.PlayerData;
import me.totalfreedom.totalfreedommod.rank.Displayable;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FSync;
import me.totalfreedom.totalfreedommod.util.FUtil;

View File

@ -3,8 +3,6 @@ package me.totalfreedom.totalfreedommod;
import java.io.File;
import java.io.InputStream;
import java.util.Properties;
import me.totalfreedom.totalfreedommod.staff.ActivityLog;
import me.totalfreedom.totalfreedommod.staff.StaffList;
import me.totalfreedom.totalfreedommod.banning.BanManager;
import me.totalfreedom.totalfreedommod.banning.IndefiniteBanList;
import me.totalfreedom.totalfreedommod.blocking.BlockBlocker;
@ -22,7 +20,6 @@ import me.totalfreedom.totalfreedommod.bridge.EssentialsBridge;
import me.totalfreedom.totalfreedommod.bridge.FAWEBridge;
import me.totalfreedom.totalfreedommod.bridge.LibsDisguisesBridge;
import me.totalfreedom.totalfreedommod.bridge.TFGuildsBridge;
import me.totalfreedom.totalfreedommod.bridge.VanishBridge;
import me.totalfreedom.totalfreedommod.bridge.WorldEditBridge;
import me.totalfreedom.totalfreedommod.bridge.WorldGuardBridge;
import me.totalfreedom.totalfreedommod.caging.Cager;
@ -45,6 +42,8 @@ import me.totalfreedom.totalfreedommod.rank.RankManager;
import me.totalfreedom.totalfreedommod.shop.Shop;
import me.totalfreedom.totalfreedommod.shop.Votifier;
import me.totalfreedom.totalfreedommod.sql.SQLite;
import me.totalfreedom.totalfreedommod.staff.ActivityLog;
import me.totalfreedom.totalfreedommod.staff.StaffList;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import me.totalfreedom.totalfreedommod.util.MethodTimer;
@ -135,7 +134,7 @@ public class TotalFreedomMod extends JavaPlugin
public SignBlocker snp;
public EntityWiper ew;
public Sitter st;
public VanishBridge vb;
public VanishHandler vh;
public AMP amp;
//public HubWorldRestrictions hwr;
@ -233,7 +232,7 @@ public class TotalFreedomMod extends JavaPlugin
snp = new SignBlocker();
ew = new EntityWiper();
st = new Sitter();
vb = new VanishBridge();
vh = new VanishHandler();
amp = new AMP();
// Single admin utils

View File

@ -0,0 +1,83 @@
package me.totalfreedom.totalfreedommod;
import me.totalfreedom.totalfreedommod.util.FLog;
import net.md_5.bungee.api.ChatMessageType;
import net.md_5.bungee.api.chat.TextComponent;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.scheduler.BukkitRunnable;
public class VanishHandler extends FreedomService
{
@Override
public void onStart()
{
}
@Override
public void onStop()
{
}
@EventHandler(priority = EventPriority.HIGH)
public void onPlayerJoin(PlayerJoinEvent event)
{
Player player = event.getPlayer();
for (Player p : server.getOnlinePlayers())
{
if (!plugin.sl.isAdmin(player) && plugin.sl.isVanished(p.getName()))
{
player.hidePlayer(plugin, p);
}
}
for (Player p : server.getOnlinePlayers())
{
if (!plugin.sl.isAdmin(p) && plugin.sl.isVanished(player.getName()))
{
p.hidePlayer(plugin, player);
}
}
if (plugin.sl.isVanished(player.getName()))
{
plugin.esb.setVanished(player.getName(), true);
FLog.info(player.getName() + " joined while still vanished.");
plugin.sl.messageAllAdmins(ChatColor.YELLOW + player.getName() + " has joined silently.");
event.setJoinMessage(null);
new BukkitRunnable()
{
@Override
public void run()
{
if (!plugin.sl.isVanished(player.getName()))
{
this.cancel();
}
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(ChatColor.GOLD + "You are hidden from other players."));
}
}.runTaskTimer(plugin, 0L, 4L);
}
}
@EventHandler
public void onPlayerLeave(PlayerQuitEvent event)
{
Player player = event.getPlayer();
if (plugin.sl.isVanished(player.getName()))
{
event.setQuitMessage(null);
FLog.info(player.getName() + " left while still vanished.");
plugin.sl.messageAllAdmins(ChatColor.YELLOW + player.getName() + " has left silently.");
}
}
}

View File

@ -1,8 +1,8 @@
package me.totalfreedom.totalfreedommod.blocking.command;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

View File

@ -10,8 +10,8 @@ import me.totalfreedom.bukkittelnet.api.TelnetPreLoginEvent;
import me.totalfreedom.bukkittelnet.api.TelnetRequestDataTagsEvent;
import me.totalfreedom.bukkittelnet.session.ClientSession;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.util.FLog;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;

View File

@ -1,64 +0,0 @@
package me.totalfreedom.totalfreedommod.bridge;
import de.myzelyam.api.vanish.PlayerHideEvent;
import de.myzelyam.api.vanish.PlayerShowEvent;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.player.PlayerData;
import me.totalfreedom.totalfreedommod.rank.Displayable;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
public class VanishBridge extends FreedomService
{
@Override
public void onStart()
{
}
@Override
public void onStop()
{
}
@EventHandler
public void onPlayerUnvanish(PlayerShowEvent event)
{
Player player = event.getPlayer();
Displayable display = plugin.rm.getDisplay(player);
String tag = display.getColoredTag();
if (event.isSilent())
{
plugin.al.messageAllAdmins(ChatColor.GOLD + player.getName() + " silently unvanished.");
}
else
{
plugin.al.messageAllAdmins(ChatColor.GOLD + player.getName() + " unvanished and is now visible to all players.");
FUtil.bcastMsg(plugin.rm.craftLoginMessage(event.getPlayer(), null));
plugin.dc.messageChatChannel("**" + player.getName() + " joined the server" + "**");
}
PlayerData playerData = plugin.pl.getData(player);
if (playerData.getTag() != null)
{
tag = FUtil.colorize(playerData.getTag());
}
playerData.setTag(tag);
}
@EventHandler
public void onPlayerVanish(PlayerHideEvent event)
{
Player player = event.getPlayer();
if (event.isSilent())
{
plugin.al.messageAllAdmins(ChatColor.GOLD + player.getName() + " vanished and is now only visible to admins.");
}
else
{
plugin.dc.messageChatChannel("**" + player.getName() + " left the server" + "**");
}
}
}

View File

@ -3,9 +3,9 @@ package me.totalfreedom.totalfreedommod.command;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.player.PlayerData;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;

View File

@ -1,7 +1,7 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

View File

@ -35,7 +35,7 @@ public class Command_deop extends FreedomCommand
if (player.getName().toLowerCase().contains(targetName) || player.getDisplayName().toLowerCase().contains(targetName)
|| player.getName().contains(targetName) || player.getDisplayName().contains(targetName))
{
if (player.isOp() && !plugin.sl.isVanished(player))
if (player.isOp() && !plugin.sl.isVanished(player.getName()))
{
matchedPlayerNames.add(player.getName());
player.setOp(false);

View File

@ -1,11 +1,11 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.banning.Ban;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.punishments.Punishment;
import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.StringUtils;

View File

@ -43,7 +43,7 @@ public class Command_invis extends FreedomCommand
for (Player player : server.getOnlinePlayers())
{
if (player.hasPotionEffect(PotionEffectType.INVISIBILITY) && !plugin.sl.isVanished(player))
if (player.hasPotionEffect(PotionEffectType.INVISIBILITY) && !plugin.sl.isVanished(player.getName()))
{
players.add(player.getName());
if (clear && !plugin.sl.isStaff(player))

View File

@ -1,12 +1,12 @@
package me.totalfreedom.totalfreedommod.command;
import de.myzelyam.api.vanish.VanishAPI;
import java.util.ArrayList;
import java.util.List;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.rank.Displayable;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.staff.StaffList;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.util.FUtil;
import net.md_5.bungee.api.ChatColor;
import org.apache.commons.lang.StringUtils;
@ -18,7 +18,6 @@ import org.bukkit.entity.Player;
@CommandParameters(description = "Lists the real names of all online players.", usage = "/<command> [-s | -i | -f | -v]", aliases = "who,lsit")
public class Command_list extends FreedomCommand
{
public boolean run(final CommandSender sender, final Player playerSender, final Command cmd, final String commandLabel, final String[] args, final boolean senderIsConsole)
{
if (args.length > 1)
@ -96,7 +95,7 @@ public class Command_list extends FreedomCommand
}
else
{
onlineStats.append(ChatColor.BLUE).append("There are ").append(ChatColor.RED).append(server.getOnlinePlayers().size() - VanishAPI.getInvisiblePlayers().size())
onlineStats.append(ChatColor.BLUE).append("There are ").append(ChatColor.RED).append(server.getOnlinePlayers().size() - StaffList.vanished.size())
.append(ChatColor.BLUE)
.append(" out of a maximum ")
.append(ChatColor.RED)
@ -109,11 +108,11 @@ public class Command_list extends FreedomCommand
{
continue;
}
if (listFilter == ListFilter.STAFF && plugin.sl.isVanished(p))
if (listFilter == ListFilter.STAFF && plugin.sl.isVanished(p.getName()))
{
continue;
}
if (listFilter == ListFilter.VANISHED_STAFF && !plugin.sl.isVanished(p))
if (listFilter == ListFilter.VANISHED_STAFF && !plugin.sl.isVanished(p.getName()))
{
continue;
}
@ -125,7 +124,7 @@ public class Command_list extends FreedomCommand
{
continue;
}
if (listFilter == ListFilter.PLAYERS && plugin.sl.isVanished(p))
if (listFilter == ListFilter.PLAYERS && plugin.sl.isVanished(p.getName()))
{
continue;
}

View File

@ -4,10 +4,10 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.player.PlayerData;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.apache.commons.lang.StringUtils;
import org.bukkit.ChatColor;

View File

@ -41,11 +41,11 @@ public class Command_nickfilter extends FreedomCommand
player = getPlayerByDisplayName(displayName);
if (player == null || plugin.sl.isVanished(player) && !plugin.sl.isStaff(sender))
if (player == null || plugin.sl.isVanished(player.getName()) && !plugin.sl.isStaff(sender))
{
player = getPlayerByDisplayNameAlt(displayName);
if (player == null || !plugin.sl.isVanished(player) && !plugin.sl.isStaff(sender))
if (player == null || !plugin.sl.isVanished(player.getName()) && !plugin.sl.isStaff(sender))
{
sender.sendMessage(ChatColor.GRAY + "Can't find player by nickname: " + displayName);
return true;

View File

@ -36,7 +36,7 @@ public class Command_op extends FreedomCommand
if (player.getName().toLowerCase().contains(targetName) || player.getDisplayName().toLowerCase().contains(targetName)
|| player.getName().contains(targetName) || player.getDisplayName().contains(targetName))
{
if (!player.isOp() && !plugin.sl.isVanished(player))
if (!player.isOp() && !plugin.sl.isVanished(player.getName()))
{
matchedPlayerNames.add(player.getName());
player.setOp(true);

View File

@ -3,8 +3,8 @@ package me.totalfreedom.totalfreedommod.command;
import java.time.Instant;
import java.util.Date;
import java.util.List;
import me.totalfreedom.totalfreedommod.staff.ActivityLogEntry;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.staff.ActivityLogEntry;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;

View File

@ -104,7 +104,7 @@ public class Command_potion extends FreedomCommand
{
target = getPlayer(args[4]);
if (target == null || plugin.sl.isVanished(target) && !plugin.sl.isStaff(sender))
if (target == null || plugin.sl.isVanished(target.getName()) && !plugin.sl.isStaff(sender))
{
msg(FreedomCommand.PLAYER_NOT_FOUND, ChatColor.RED);
return true;

View File

@ -4,8 +4,8 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.apache.commons.lang.math.NumberUtils;
import org.bukkit.Bukkit;

View File

@ -5,10 +5,10 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.apache.commons.lang.StringUtils;
import org.bukkit.ChatColor;

View File

@ -48,7 +48,7 @@ public class Command_tag extends FreedomCommand
for (final Player player : server.getOnlinePlayers())
{
if (plugin.sl.isVanished(player) && !plugin.sl.isStaff(sender))
if (plugin.sl.isVanished(player.getName()) && !plugin.sl.isStaff(sender))
{
continue;
}

View File

@ -15,7 +15,7 @@ import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable;
import static me.totalfreedom.totalfreedommod.util.FUtil.playerMsg;
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.ONLY_IN_GAME)
@CommandPermissions(level = Rank.TRIAL_MOD, source = SourceType.ONLY_IN_GAME)
@CommandParameters(description = "Vanish/unvanish yourself.", usage = "/<command> [-s[ilent]]", aliases = "v")
public class Command_vanish extends FreedomCommand
{
@ -34,7 +34,7 @@ public class Command_vanish extends FreedomCommand
}
}
if (plugin.al.isVanished(playerSender.getName()))
if (plugin.sl.isVanished(playerSender.getName()))
{
if (silent)
{
@ -59,18 +59,18 @@ public class Command_vanish extends FreedomCommand
for (Player player : server.getOnlinePlayers())
{
if (plugin.al.isAdmin(player))
if (plugin.sl.isAdmin(player))
{
playerMsg(player, ChatColor.YELLOW + sender.getName() + " has unvanished and is now visible to everyone.");
}
if (!plugin.al.isAdmin(player))
if (!plugin.sl.isAdmin(player))
{
player.showPlayer(plugin, playerSender);
}
}
plugin.esb.setVanished(playerSender.getName(), false);
playerSender.setPlayerListName(StringUtils.substring(displayName, 0, 16));
plugin.al.vanished.remove(playerSender.getName());
plugin.sl.vanished.remove(playerSender.getName());
}
else
{
@ -79,7 +79,7 @@ public class Command_vanish extends FreedomCommand
@Override
public void run()
{
if (plugin.al.isVanished(playerSender.getName()))
if (plugin.sl.isVanished(playerSender.getName()))
{
playerSender.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(ChatColor.GOLD + "You are hidden from other players."));
}
@ -101,11 +101,11 @@ public class Command_vanish extends FreedomCommand
for (Player player : server.getOnlinePlayers())
{
{
if (plugin.al.isAdmin(player))
if (plugin.sl.isAdmin(player))
{
playerMsg(player, ChatColor.YELLOW + sender.getName() + " has vanished and is now only visible to admins.");
}
if (!plugin.al.isAdmin(player))
if (!plugin.sl.isAdmin(player))
{
player.hidePlayer(plugin, playerSender);
}

View File

@ -40,7 +40,7 @@ public class Command_whohas extends FreedomCommand
for (final Player player : server.getOnlinePlayers())
{
if (!plugin.sl.isStaff(sender) && plugin.sl.isVanished(player))
if (!plugin.sl.isStaff(sender) && plugin.sl.isVanished(player.getName()))
{
continue;
}

View File

@ -10,9 +10,9 @@ import java.util.Timer;
import java.util.TimerTask;
import lombok.Getter;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.player.PlayerData;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.apache.commons.lang.StringUtils;
import org.bukkit.Bukkit;
@ -316,7 +316,7 @@ public abstract class FreedomCommand implements CommandExecutor, TabCompleter
Player player = Bukkit.getPlayer(name);
if (player != null)
{
if (nullVanished && plugin.sl.isVanished(player) && !plugin.sl.isStaff(sender))
if (nullVanished && plugin.sl.isVanished(player.getName()) && !plugin.sl.isStaff(sender))
{
return null;
}

View File

@ -14,10 +14,10 @@ import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import javax.security.auth.login.LoginException;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.player.PlayerData;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import net.dv8tion.jda.api.AccountType;

View File

@ -1,8 +1,8 @@
package me.totalfreedom.totalfreedommod.discord;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.player.PlayerData;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import net.dv8tion.jda.api.events.message.priv.PrivateMessageReceivedEvent;
import net.dv8tion.jda.api.hooks.ListenerAdapter;

View File

@ -12,17 +12,17 @@ import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.httpd.NanoHTTPD.Response;
import me.totalfreedom.totalfreedommod.httpd.module.HTTPDModule;
import me.totalfreedom.totalfreedommod.httpd.module.Module_activitylog;
import me.totalfreedom.totalfreedommod.httpd.module.Module_staff;
import me.totalfreedom.totalfreedommod.httpd.module.Module_bans;
import me.totalfreedom.totalfreedommod.httpd.module.Module_file;
import me.totalfreedom.totalfreedommod.httpd.module.Module_help;
import me.totalfreedom.totalfreedommod.httpd.module.Module_indefbans;
import me.totalfreedom.totalfreedommod.httpd.module.Module_list;
import me.totalfreedom.totalfreedommod.httpd.module.Module_logfile;
import me.totalfreedom.totalfreedommod.httpd.module.Module_logs;
import me.totalfreedom.totalfreedommod.httpd.module.Module_indefbans;
import me.totalfreedom.totalfreedommod.httpd.module.Module_players;
import me.totalfreedom.totalfreedommod.httpd.module.Module_punishments;
import me.totalfreedom.totalfreedommod.httpd.module.Module_schematic;
import me.totalfreedom.totalfreedommod.httpd.module.Module_staff;
import me.totalfreedom.totalfreedommod.util.FLog;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang.StringUtils;

View File

@ -2,10 +2,10 @@ package me.totalfreedom.totalfreedommod.httpd.module;
import java.io.File;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.staff.ActivityLog;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.httpd.HTTPDaemon;
import me.totalfreedom.totalfreedommod.httpd.NanoHTTPD;
import me.totalfreedom.totalfreedommod.staff.ActivityLog;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
public class Module_activitylog extends HTTPDModule
{

View File

@ -1,8 +1,8 @@
package me.totalfreedom.totalfreedommod.httpd.module;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.httpd.NanoHTTPD;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
public class Module_bans extends HTTPDModule
{

View File

@ -2,10 +2,10 @@ package me.totalfreedom.totalfreedommod.httpd.module;
import java.io.File;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.banning.IndefiniteBanList;
import me.totalfreedom.totalfreedommod.httpd.HTTPDaemon;
import me.totalfreedom.totalfreedommod.httpd.NanoHTTPD;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
public class Module_indefbans extends HTTPDModule
{

View File

@ -2,9 +2,9 @@ package me.totalfreedom.totalfreedommod.httpd.module;
import java.util.Collection;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.httpd.NanoHTTPD;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
@ -40,7 +40,7 @@ public class Module_list extends HTTPDModule
for (Player player : Bukkit.getOnlinePlayers())
{
if (plugin.sl.isVanished(player))
if (plugin.sl.isVanished(player.getName()))
{
continue;
}
@ -128,7 +128,7 @@ public class Module_list extends HTTPDModule
for (Player player : onlinePlayers)
{
if (plugin.sl.isVanished(player))
if (plugin.sl.isVanished(player.getName()))
{
continue;
}

View File

@ -7,12 +7,12 @@ import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.httpd.HTMLGenerationTools;
import me.totalfreedom.totalfreedommod.httpd.HTTPDPageBuilder;
import me.totalfreedom.totalfreedommod.httpd.HTTPDaemon;
import me.totalfreedom.totalfreedommod.httpd.NanoHTTPD;
import me.totalfreedom.totalfreedommod.httpd.NanoHTTPD.Response;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.util.FLog;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringEscapeUtils;

View File

@ -1,9 +1,9 @@
package me.totalfreedom.totalfreedommod.httpd.module;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.httpd.NanoHTTPD;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
@ -36,7 +36,7 @@ public class Module_players extends HTTPDModule
// All online players
for (Player player : Bukkit.getOnlinePlayers())
{
if (!plugin.sl.isVanished(player))
if (!plugin.sl.isVanished(player.getName()))
{
players.add(player.getName());
if (plugin.sl.isStaff(player) && !plugin.sl.isAdminImpostor(player))

View File

@ -2,10 +2,10 @@ package me.totalfreedom.totalfreedommod.httpd.module;
import java.io.File;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.httpd.HTTPDaemon;
import me.totalfreedom.totalfreedommod.httpd.NanoHTTPD;
import me.totalfreedom.totalfreedommod.punishments.PunishmentList;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
public class Module_punishments extends HTTPDModule
{

View File

@ -14,7 +14,6 @@ import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.httpd.HTMLGenerationTools;
import me.totalfreedom.totalfreedommod.httpd.HTTPDPageBuilder;
import me.totalfreedom.totalfreedommod.httpd.HTTPDaemon;
@ -22,6 +21,7 @@ import me.totalfreedom.totalfreedommod.httpd.NanoHTTPD;
import me.totalfreedom.totalfreedommod.httpd.NanoHTTPD.Method;
import me.totalfreedom.totalfreedommod.httpd.NanoHTTPD.Response;
import me.totalfreedom.totalfreedommod.player.PlayerData;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.util.FLog;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringEscapeUtils;

View File

@ -1,8 +1,8 @@
package me.totalfreedom.totalfreedommod.httpd.module;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.httpd.NanoHTTPD;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
public class Module_staff extends HTTPDModule
{

View File

@ -9,9 +9,9 @@ import java.util.List;
import java.util.Map;
import lombok.Getter;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.OfflinePlayer;

View File

@ -5,7 +5,6 @@ import net.md_5.bungee.api.ChatColor;
public enum Rank implements Displayable
{
IMPOSTOR("an", "Impostor", Type.PLAYER, "Imp", ChatColor.YELLOW, null, false),
NON_OP("a", "Non-Op", Type.PLAYER, "", ChatColor.WHITE, null, false),
OP("an", "Operator", Type.PLAYER, "OP", ChatColor.GREEN, null, false),

View File

@ -1,10 +1,10 @@
package me.totalfreedom.totalfreedommod.rank;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import me.totalfreedom.totalfreedommod.player.PlayerData;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.apache.commons.lang.StringUtils;
import org.bukkit.ChatColor;
@ -250,7 +250,7 @@ public class RankManager extends FreedomService
// Broadcast login message
if (isAdmin || FUtil.isDeveloper(player.getName()) || plugin.pl.getData(player).isMasterBuilder() || plugin.pl.getData(player).isDonator())
{
if (!plugin.sl.isVanished(player))
if (!plugin.sl.isVanished(player.getName()))
{
FUtil.bcastMsg(craftLoginMessage(player, null));
}

View File

@ -8,9 +8,9 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.MessageFormat;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.banning.Ban;
import me.totalfreedom.totalfreedommod.player.PlayerData;
import me.totalfreedom.totalfreedommod.staff.StaffMember;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;

View File

@ -2,7 +2,6 @@ package me.totalfreedom.totalfreedommod.staff;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import de.myzelyam.api.vanish.VanishAPI;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
@ -32,7 +31,7 @@ public class StaffList extends FreedomService
private final Map<String, StaffMember> ipTable = Maps.newHashMap();
public final List<String> verifiedNoStaff = new ArrayList<>();
public final Map<String, List<String>> verifiedNoStaffIps = Maps.newHashMap();
public final List<String> vanished = new ArrayList<>();
public static final List<String> vanished = new ArrayList<>();
@Override
public void onStart()

View File

@ -146,7 +146,7 @@ public class FUtil
List<String> names = new ArrayList<>();
for (Player player : Bukkit.getOnlinePlayers())
{
if (!TotalFreedomMod.plugin().sl.isVanished(player))
if (!TotalFreedomMod.plugin().sl.isVanished(player.getName()))
{
names.add(player.getName());
}