it compiles now

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

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