Merge branch 'master' of ssh://184.154.0.242:7999/min/mineplex

This commit is contained in:
Mini-Chiss 2015-08-28 16:18:49 -07:00
commit c8c569281b
73 changed files with 209 additions and 374 deletions

View File

@ -53,6 +53,7 @@ public class MotdManager implements Listener, Runnable
_secondRepository = new RedisDataRepository<GlobalMotd>(new ConnectionData("10.33.53.16", 6379, ConnectionType.MASTER, "ServerStatus"), new ConnectionData("10.33.53.16", 6377, ConnectionType.SLAVE, "ServerStatus"),
Region.ALL, GlobalMotd.class, "globalMotd");
//String motdLine = "§f§l◄ §c§lMaintenance§f§l ►";
String motdLine = "§f§l◄ §a§lCarl the Creeper§f§l ►";
//String motdLine = " §f§l◄ §a§lCarl the Creeper§f§l ▬ §c§l75% OFF SALE§f§l ►";
//String motdLine = " §d§lRank Sale §a§l40% Off");

View File

@ -85,6 +85,7 @@ public class PlayerStats implements Listener, Runnable
}
playerInfo.setSessionId(_repository.updatePlayerStats(playerInfo.getId(), ipInfo.id));
_playerCache.addPlayer(playerInfo);
}
finally
{
@ -130,6 +131,7 @@ public class PlayerStats implements Listener, Runnable
timeout++;
}
System.out.println(playerInfo.getName() + ":" + playerInfo.getSessionId());
_repository.updatePlayerSession(playerInfo.getSessionId());
}
});

View File

@ -10,6 +10,7 @@
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value=""/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${BUILD_FILES}/common.xml"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>

View File

@ -26,31 +26,41 @@ public enum Rank
YOUTUBE("YouTube", ChatColor.RED),
TWITCH("Twitch", ChatColor.DARK_PURPLE),
LEGEND("Legend", ChatColor.GREEN),
HERO("Hero", ChatColor.LIGHT_PURPLE),
ULTRA("Ultra", ChatColor.AQUA),
LEGEND("Legend", ChatColor.GREEN, true),
HERO("Hero", ChatColor.LIGHT_PURPLE, true),
ULTRA("Ultra", ChatColor.AQUA, true),
ALL("", ChatColor.WHITE);
private ChatColor Color;
private ChatColor _color;
private boolean _donor;
public String Name;
Rank(String name, ChatColor color)
{
Color = color;
_color = color;
Name = name;
_donor = false;
}
public boolean Has(Rank rank)
Rank(String name, ChatColor color, boolean donor)
{
return Has(null, rank, false);
_color = color;
Name = name;
_donor = donor;
}
public boolean Has(Player player, Rank rank, boolean inform)
public boolean has(Rank rank)
{
return Has(player, rank, null, inform);
return has(null, rank, false);
}
public boolean Has(Player player, Rank rank, Rank[] specific, boolean inform)
public boolean has(Player player, Rank rank, boolean inform)
{
return has(player, rank, null, inform);
}
public boolean has(Player player, Rank rank, Rank[] specific, boolean inform)
{
//Specific Rank
if (specific != null)
@ -79,7 +89,7 @@ public enum Rank
return false;
}
public String GetTag(boolean bold, boolean uppercase)
public String getTag(boolean bold, boolean uppercase)
{
if (Name.equalsIgnoreCase("ALL"))
return "";
@ -88,12 +98,17 @@ public enum Rank
if (uppercase)
name = Name.toUpperCase();
if (bold) return Color + C.Bold + name;
else return Color + name;
if (bold) return _color + C.Bold + name;
else return _color + name;
}
public ChatColor GetColor()
public ChatColor getColor()
{
return Color;
return _color;
}
public boolean isDonor()
{
return _donor;
}
}

View File

@ -95,15 +95,15 @@ public class F
public static String help(String cmd, String body, Rank rank)
{
return rank.GetColor() + cmd + " " + C.mBody + body + " " + rank(rank);
return rank.getColor() + cmd + " " + C.mBody + body + " " + rank(rank);
}
public static String rank(Rank rank)
{
if (rank == Rank.ALL)
return rank.GetColor() + "Player";
return rank.getColor() + "Player";
return rank.GetTag(false, false);
return rank.getTag(false, false);
}
public static String value(String variable, String value)

View File

@ -185,7 +185,7 @@ public class CoreClientManager extends MiniPlugin
_clientsProcessing.decrementAndGet();
}
if (Bukkit.hasWhitelist() && !Get(event.getName()).GetRank().Has(Rank.MODERATOR))
if (Bukkit.hasWhitelist() && !Get(event.getName()).GetRank().has(Rank.MODERATOR))
{
for (OfflinePlayer player : Bukkit.getWhitelistedPlayers())
{
@ -363,7 +363,7 @@ public class CoreClientManager extends MiniPlugin
// Reserved Slot Check
if (Bukkit.getOnlinePlayers().size() >= Bukkit.getServer().getMaxPlayers())
{
if (client.GetRank().Has(event.getPlayer(), Rank.ULTRA, false))
if (client.GetRank().has(event.getPlayer(), Rank.ULTRA, false))
{
event.allow();
event.setResult(PlayerLoginEvent.Result.ALLOWED);
@ -542,7 +542,7 @@ public class CoreClientManager extends MiniPlugin
if (client == null)
return false;
return client.GetRank().Has(rank);
return client.GetRank().has(rank);
}
public int getCachedClientAccountId(UUID uuid)

View File

@ -29,7 +29,7 @@ public class UpdateRank extends CommandBase<CoreClientManager>
if (Plugin.Get(caller).GetRank() == Rank.JNR_DEV && !testServer)
{
F.main(Plugin.getName(), F.elem(Rank.JNR_DEV.GetTag(true, true)) + "s are only permitted to set ranks on test servers!");
F.main(Plugin.getName(), F.elem(Rank.JNR_DEV.getTag(true, true)) + "s are only permitted to set ranks on test servers!");
return;
}
@ -62,7 +62,7 @@ public class UpdateRank extends CommandBase<CoreClientManager>
if (rank == Rank.ADMIN || rank == Rank.YOUTUBE || rank == Rank.TWITCH || rank == Rank.MODERATOR || rank == Rank.JNR_DEV || rank == Rank.HELPER || rank == Rank.ALL || rank == Rank.MAPDEV || rank == Rank.SNR_MODERATOR)
{
if (!testServer && rank.Has(Rank.ADMIN) && !Plugin.hasRank(caller, Rank.LT))
if (!testServer && rank.has(Rank.ADMIN) && !Plugin.hasRank(caller, Rank.LT))
{
UtilPlayer.message(caller, F.main(Plugin.getName(), ChatColor.RED + "" + ChatColor.BOLD + "Insufficient privileges!"));
return;

View File

@ -203,7 +203,7 @@ public enum AchievementCategory
String displayName = _statDisplays[i].getDisplayName();
// Skip showing Losses, Kills, Deaths for other players
if (!clientManager.Get(player).GetRank().Has(Rank.MODERATOR) && !player.equals(target) && (displayName.contains("Losses") || displayName.contains("Kills") || displayName.contains("Deaths") || displayName.equals("Time In Game") || displayName.equals("Games Played")))
if (!clientManager.Get(player).GetRank().has(Rank.MODERATOR) && !player.equals(target) && (displayName.contains("Losses") || displayName.contains("Kills") || displayName.contains("Deaths") || displayName.equals("Time In Game") || displayName.equals("Games Played")))
continue;
int statNumber = 0;

View File

@ -187,15 +187,15 @@ public class AchievementManager extends MiniPlugin
if (sender.getName().equalsIgnoreCase("B2_mp"))
return 101;
if (rank.Has(Rank.MODERATOR))
if (rank.has(Rank.MODERATOR))
level = Math.max(level, 5);
if (rank.Has(Rank.SNR_MODERATOR))
if (rank.has(Rank.SNR_MODERATOR))
level = Math.max(level, 15);
if (rank.Has(Rank.JNR_DEV))
if (rank.has(Rank.JNR_DEV))
level = Math.max(level, 25);
if (rank.Has(Rank.ADMIN))
if (rank.has(Rank.ADMIN))
level = Math.max(level, 30 + get(sender, Achievement.GLOBAL_GEM_HUNTER).getLevel());
if (rank.Has(Rank.OWNER))
if (rank.has(Rank.OWNER))
level = Math.max(level, 50 + get(sender, Achievement.GLOBAL_GEM_HUNTER).getLevel());
if (sender.getName().equalsIgnoreCase("Phinary"))

View File

@ -259,7 +259,7 @@ public class AntiHack extends MiniPlugin
//Inform
for (Player admin : UtilServer.getPlayers())
if (_clientManager.Get(admin).GetRank().Has(Rank.MODERATOR) && _preferences.Get(admin).ShowMacReports)
if (_clientManager.Get(admin).GetRank().has(Rank.MODERATOR) && _preferences.Get(admin).ShowMacReports)
{
UtilPlayer.message(admin, "#" + total + ": " + C.cRed + C.Bold + player.getName() + " suspected for " + type + ".");
}
@ -335,7 +335,7 @@ public class AntiHack extends MiniPlugin
boolean handled = false;
for (Player staff : UtilServer.getPlayers())
{
if (_clientManager.Get(staff).GetRank().Has(Rank.MODERATOR))
if (_clientManager.Get(staff).GetRank().has(Rank.MODERATOR))
{
UtilPlayer.message(staff, C.cAqua + C.Scramble + "A" + ChatColor.RESET + C.cRed + C.Bold + " MAC > " + ChatColor.RESET + C.cYellow + report);
UtilPlayer.message(staff, C.cAqua + C.Scramble + "A" + ChatColor.RESET + C.cRed + C.Bold + " MAC > " + ChatColor.RESET + C.cGold + player.getName() + C.cYellow + " has extreme violation. Please investigate.");

View File

@ -669,19 +669,19 @@ public class BonusManager extends MiniClientPlugin<BonusClientData> implements I
BonusAmount data = new BonusAmount();
if (rank.Has(Rank.MODERATOR))
if (rank.has(Rank.MODERATOR))
{
data.setCoins(35000);
}
if (rank.Has(Rank.LEGEND))
if (rank.has(Rank.LEGEND))
{
data.setCoins(30000);
}
else if (rank.Has(Rank.HERO))
else if (rank.has(Rank.HERO))
{
data.setCoins(15000);
}
else if (rank.Has(Rank.ULTRA))
else if (rank.has(Rank.ULTRA))
{
data.setCoins(7500);
}

View File

@ -176,7 +176,7 @@ public class Chat extends MiniPlugin
if (_silenced == 0)
return false;
if (_clientManager.Get(player).GetRank().Has(player, Rank.MODERATOR, false))
if (_clientManager.Get(player).GetRank().has(player, Rank.MODERATOR, false))
return false;
if (_silenced == -1)
@ -210,7 +210,7 @@ public class Chat extends MiniPlugin
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onSignChange(SignChangeEvent event)
{
if (_clientManager.Get(event.getPlayer()).GetRank().Has(Rank.ADMIN)) return;
if (_clientManager.Get(event.getPlayer()).GetRank().has(Rank.ADMIN)) return;
// Prevent silenced players from using signs
if (SilenceCheck(event.getPlayer()))
@ -317,13 +317,13 @@ public class Chat extends MiniPlugin
UtilPlayer.message(sender, C.cYellow + "Buy a Rank at " + C.cGreen + "www.mineplex.com/shop" + C.cYellow + " to remove this limit!");
event.setCancelled(true);
}
else if (!_clientManager.Get(sender).GetRank().Has(Rank.MODERATOR) &&
else if (!_clientManager.Get(sender).GetRank().has(Rank.MODERATOR) &&
!Recharge.Instance.use(sender, "Chat Message", 400, false, false))
{
UtilPlayer.message(sender, F.main("Chat", "You are sending messages too fast."));
event.setCancelled(true);
}
else if (!_clientManager.Get(sender).GetRank().Has(Rank.HELPER) &&
else if (!_clientManager.Get(sender).GetRank().has(Rank.HELPER) &&
msgContainsHack(event.getMessage()))
{
UtilPlayer.message(sender, F.main("Chat",
@ -337,12 +337,12 @@ public class Chat extends MiniPlugin
MessageData lastMessage = _playerLastMessage.get(sender.getUniqueId());
long chatSlowTime = 1000L * _chatSlow;
long timeDiff = System.currentTimeMillis() - lastMessage.getTimeSent();
if (timeDiff < chatSlowTime && !_clientManager.Get(sender).GetRank().Has(Rank.HELPER))
if (timeDiff < chatSlowTime && !_clientManager.Get(sender).GetRank().has(Rank.HELPER))
{
UtilPlayer.message(sender, F.main("Chat", "Chat slow enabled. Please wait " + F.time(UtilTime.convertString(chatSlowTime - timeDiff, 1, UtilTime.TimeUnit.FIT))));
event.setCancelled(true);
}
else if (!_clientManager.Get(sender).GetRank().Has(Rank.MODERATOR) &&
else if (!_clientManager.Get(sender).GetRank().has(Rank.MODERATOR) &&
UtilText.isStringSimilar(event.getMessage(), lastMessage.getMessage(), 0.8f))
{
UtilPlayer.message(sender, F.main("Chat", "This message is too similar to your previous message."));

View File

@ -62,7 +62,7 @@ public class CommandCenter implements Listener
{
event.setCancelled(true);
if (ClientManager.Get(event.getPlayer()).GetRank().Has(event.getPlayer(), command.GetRequiredRank(), command.GetSpecificRanks(), true))
if (ClientManager.Get(event.getPlayer()).GetRank().has(event.getPlayer(), command.GetRequiredRank(), command.GetSpecificRanks(), true))
{
if (!Recharge.Instance.use(event.getPlayer(), "Command", 500, false, false))
{
@ -76,19 +76,6 @@ public class CommandCenter implements Listener
}
}
@EventHandler
public void onTabComplete(TabCompleteEvent event)
{
ICommand command = Commands.get(event.getCommand().toLowerCase());
if (command != null)
{
List<String> suggestions = command.onTabComplete(event.getSender(), event.getCommand(), event.getArgs());
if (suggestions != null)
event.setSuggestions(suggestions);
}
}
public void AddCommand(ICommand command)
{

View File

@ -59,7 +59,7 @@ public abstract class MultiCommandBase<PluginType extends MiniPlugin> extends Co
ICommand command = Commands.get(commandName);
if (command != null && CommandCenter.ClientManager.Get(caller).GetRank().Has(caller, command.GetRequiredRank(), command.GetSpecificRanks(), true))
if (command != null && CommandCenter.ClientManager.Get(caller).GetRank().has(caller, command.GetRequiredRank(), command.GetSpecificRanks(), true))
{
command.SetAliasUsed(commandName);

View File

@ -30,9 +30,9 @@ public abstract class DisguiseInsentient extends DisguiseLiving
{
if (rank != null)
{
if (rank.Has(Rank.ULTRA))
if (rank.has(Rank.ULTRA))
{
name = rank.GetTag(true, true) + " " + ChatColor.RESET + name;
name = rank.getTag(true, true) + " " + ChatColor.RESET + name;
}
}

View File

@ -251,7 +251,7 @@ public class FriendManager extends MiniDbClientPlugin<FriendData>
public void showFriends(Player caller)
{
boolean isStaff = ClientManager.Get(caller).GetRank().Has(Rank.HELPER);
boolean isStaff = ClientManager.Get(caller).GetRank().has(Rank.HELPER);
boolean gotAFriend = false;
List<FriendStatus> friendStatuses = Get(caller).getFriends();
Collections.sort(friendStatuses, _friendSorter);

View File

@ -166,11 +166,11 @@ public class GadgetManager extends MiniPlugin
@EventHandler
public void onPlayerJoin(PlayerJoinEvent event)
{
if (_clientManager.Get(event.getPlayer()).GetRank().Has(Rank.MODERATOR))
if (_clientManager.Get(event.getPlayer()).GetRank().has(Rank.MODERATOR))
{
for (GadgetType gadgetType : _gadgets.keySet())
{
if (gadgetType == GadgetType.Particle && _clientManager.Get(event.getPlayer()).GetRank().Has(Rank.ADMIN))
if (gadgetType == GadgetType.Particle && _clientManager.Get(event.getPlayer()).GetRank().has(Rank.ADMIN))
{
for (Gadget gadget : _gadgets.get(gadgetType))
{

View File

@ -82,7 +82,7 @@ public class MorphBlaze extends MorphGadget
@EventHandler
public void HeroOwner(PlayerJoinEvent event)
{
if (Manager.getClientManager().Get(event.getPlayer()).GetRank().Has(Rank.HERO))
if (Manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.HERO))
{
Manager.getDonationManager().Get(event.getPlayer().getName()).AddUnknownSalesPackagesOwned(GetName());
}

View File

@ -170,7 +170,7 @@ public class MorphCreeper extends MorphGadget
@EventHandler
public void HeroOwner(PlayerJoinEvent event)
{
if (Manager.getClientManager().Get(event.getPlayer()).GetRank().Has(Rank.HERO))
if (Manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.HERO))
{
Manager.getDonationManager().Get(event.getPlayer().getName()).AddUnknownSalesPackagesOwned(GetName());
}

View File

@ -83,7 +83,7 @@ public class MorphPig extends MorphGadget
@EventHandler
public void HeroOwner(PlayerJoinEvent event)
{
if (Manager.getClientManager().Get(event.getPlayer()).GetRank().Has(Rank.ULTRA))
if (Manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.ULTRA))
{
Manager.getDonationManager().Get(event.getPlayer().getName()).AddUnknownSalesPackagesOwned(GetName());
}

View File

@ -46,7 +46,7 @@ public class ParticleLegend extends ParticleGadget
@EventHandler
public void legendOwner(PlayerJoinEvent event)
{
if (Manager.getClientManager().Get(event.getPlayer()).GetRank().Has(Rank.LEGEND))
if (Manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.LEGEND))
{
Manager.getDonationManager().Get(event.getPlayer().getName()).AddUnknownSalesPackagesOwned(GetName());
}

View File

@ -88,7 +88,7 @@ public class IgnoreManager extends MiniDbClientPlugin<IgnoreData>
@EventHandler
public void onChat(AsyncPlayerChatEvent event)
{
if (ClientManager.Get(event.getPlayer()).GetRank().Has(Rank.HELPER))
if (ClientManager.Get(event.getPlayer()).GetRank().has(Rank.HELPER))
return;
Iterator<Player> itel = event.getRecipients().iterator();

View File

@ -191,7 +191,7 @@ public class MessageManager extends MiniClientPlugin<ClientMessage>
// My attempt at trying to mitigate some of the spam bots - Phinary
// Triggers if they are whispering a new player
if (!GetClientManager().Get(from).GetRank().Has(Rank.HELPER) && Get(from).LastTo != null
if (!GetClientManager().Get(from).GetRank().has(Rank.HELPER) && Get(from).LastTo != null
&& !Get(from).LastTo.equalsIgnoreCase(to.getName()))
{
long delta = System.currentTimeMillis() - Get(from).LastToTime;
@ -252,7 +252,7 @@ public class MessageManager extends MiniClientPlugin<ClientMessage>
{
if (!to.equals(staff) && !from.equals(staff))
{
if (_clientManager.Get(staff).GetRank().Has(Rank.HELPER))
if (_clientManager.Get(staff).GetRank().has(Rank.HELPER))
{
UtilPlayer.message(staff, F.rank(_clientManager.Get(from).GetRank()) + " " + from.getName() + C.cPurple
+ " -> " + F.rank(_clientManager.Get(to).GetRank()) + " " + to.getName() + " " + C.cPurple + message);
@ -369,7 +369,7 @@ public class MessageManager extends MiniClientPlugin<ClientMessage>
{
if (!to.equals(staff))
{
if (_clientManager.Get(staff).GetRank().Has(Rank.HELPER))
if (_clientManager.Get(staff).GetRank().has(Rank.HELPER))
{
UtilPlayer.message(staff,
@ -447,7 +447,7 @@ public class MessageManager extends MiniClientPlugin<ClientMessage>
{
if (!target.equals(staff))
{
if (_clientManager.Get(staff).GetRank().Has(Rank.HELPER))
if (_clientManager.Get(staff).GetRank().has(Rank.HELPER))
{
UtilPlayer.message(staff,

View File

@ -48,7 +48,7 @@ public class AdminCommand extends CommandBase<MessageManager>
boolean staff = false;
for (Player to : UtilServer.getPlayers())
{
if (Plugin.GetClientManager().Get(to).GetRank().Has(Rank.HELPER))
if (Plugin.GetClientManager().Get(to).GetRank().has(Rank.HELPER))
{
if (!to.equals(caller))
UtilPlayer.message(to, F.rank(Plugin.GetClientManager().Get(caller).GetRank()) + " " + caller.getName() + " " + C.cPurple + message);

View File

@ -24,7 +24,7 @@ public class MessageAdminCommand extends CommandBase<MessageManager>
}
else
{
if (!Plugin.GetClientManager().Get(caller).GetRank().Has(caller, Rank.HELPER, true))
if (!Plugin.GetClientManager().Get(caller).GetRank().has(caller, Rank.HELPER, true))
return;
if (args.length == 0)

View File

@ -24,7 +24,7 @@ public class ResendAdminCommand extends CommandBase<MessageManager>
}
else
{
if (!Plugin.GetClientManager().Get(caller).GetRank().Has(caller, Rank.HELPER, true))
if (!Plugin.GetClientManager().Get(caller).GetRank().has(caller, Rank.HELPER, true))
return;
String lastTo = Plugin.Get(caller).LastAdminTo;

View File

@ -42,7 +42,7 @@ public class LagMeter extends MiniPlugin
@EventHandler
public void onPlayerCommandPreProcess(PlayerCommandPreprocessEvent event)
{
if (_clientManager.Get(event.getPlayer()).GetRank().Has(Rank.MODERATOR))
if (_clientManager.Get(event.getPlayer()).GetRank().has(Rank.MODERATOR))
{
if (event.getMessage().trim().equalsIgnoreCase("/lag"))
{

View File

@ -110,7 +110,7 @@ public class MountDragon extends DragonMount
@EventHandler
public void HeroOwner(PlayerJoinEvent event)
{
if (Manager.getClientManager().Get(event.getPlayer()).GetRank().Has(Rank.HERO))
if (Manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.HERO))
{
Manager.getDonationManager().Get(event.getPlayer().getName()).AddUnknownSalesPackagesOwned(GetName());
}

View File

@ -55,7 +55,7 @@ public class NotificationManager extends MiniPlugin
{
Rank rank = _clientManager.Get(player).GetRank();
if (rank.Has(Rank.LEGEND))
if (rank.has(Rank.LEGEND))
continue;
if (rank == Rank.ALL)
@ -81,7 +81,7 @@ public class NotificationManager extends MiniPlugin
{
Rank rank = _clientManager.Get(player).GetRank();
if (rank.Has(Rank.LEGEND))
if (rank.has(Rank.LEGEND))
continue;
UtilPlayer.message(player, _summerLine);

View File

@ -82,7 +82,7 @@ public class Party
for (Rank rank : Rank.values())
{
if (rank != Rank.ALL)
_scoreboard.registerNewTeam(rank.Name).setPrefix(rank.GetTag(true, false) + ChatColor.RESET + " ");
_scoreboard.registerNewTeam(rank.Name).setPrefix(rank.getTag(true, false) + ChatColor.RESET + " ");
else
_scoreboard.registerNewTeam(rank.Name).setPrefix("");
}

View File

@ -70,7 +70,7 @@ public class PersonalServerManager extends MiniPlugin
if (!Recharge.Instance.use(event.getPlayer(), "Host Server Melon", 30000, false, false))
return;
if (_clientManager.Get(event.getPlayer()).GetRank().Has(Rank.LEGEND))
if (_clientManager.Get(event.getPlayer()).GetRank().has(Rank.LEGEND))
{
showHostMessage(event.getPlayer());
}
@ -124,7 +124,7 @@ public class PersonalServerManager extends MiniPlugin
Rank rank = _clientManager.Get(player).GetRank();
if (eventServer || rank.Has(Rank.SNR_MODERATOR) || rank == Rank.YOUTUBE || rank == Rank.TWITCH)
if (eventServer || rank.has(Rank.SNR_MODERATOR) || rank == Rank.YOUTUBE || rank == Rank.TWITCH)
{
ram = 2048;
cpu = 4;

View File

@ -13,9 +13,9 @@ public enum DisplayType
switch (this)
{
case RANKED:
return rank.Has(Rank.ULTRA);
return rank.has(Rank.ULTRA);
case NOT_RANKED:
return !rank.Has(Rank.ULTRA);
return !rank.has(Rank.ULTRA);
default:
return true;
}

View File

@ -39,7 +39,7 @@ public class PollCommand extends CommandBase<PollManager>
return;
}
if (args[0].equalsIgnoreCase("list") && CommandCenter.GetClientManager().Get(caller).GetRank().Has(Rank.MODERATOR))
if (args[0].equalsIgnoreCase("list") && CommandCenter.GetClientManager().Get(caller).GetRank().has(Rank.MODERATOR))
{
if (args.length == 1)
{

View File

@ -58,28 +58,28 @@ public class ServerCommand extends CommandBase<Portal>
if (servUp.contains("HERO"))
{
if (playerRank.Has(Rank.HERO))
if (playerRank.has(Rank.HERO))
Plugin.sendPlayerToServer(player, args[0]);
else
deniedAccess = true;
}
else if (servUp.contains("ULTRA") || servUp.contains("BETA"))
{
if (playerRank.Has(Rank.ULTRA))
if (playerRank.has(Rank.ULTRA))
Plugin.sendPlayerToServer(player, args[0]);
else
deniedAccess = true;
}
else if (servUp.contains("STAFF"))
{
if (playerRank.Has(Rank.HELPER))
if (playerRank.has(Rank.HELPER))
Plugin.sendPlayerToServer(player, args[0]);
else
deniedAccess = true;
}
else if (servUp.contains("TEST"))
{
if (playerRank.Has(Rank.MODERATOR))
if (playerRank.has(Rank.MODERATOR))
Plugin.sendPlayerToServer(player, args[0]);
else
deniedAccess = true;

View File

@ -116,7 +116,7 @@ public class Portal extends MiniPlugin
{
public void run()
{
if (server.getPlayerCount() < server.getMaxPlayerCount() || playerRank.Has(Rank.ULTRA))
if (server.getPlayerCount() < server.getMaxPlayerCount() || playerRank.has(Rank.ULTRA))
{
sendPlayer(player, serverName);
}

View File

@ -261,14 +261,14 @@ public class PreferencesPage extends ShopPageBase<PreferencesManager, Preference
buildPreference(42, Material.SLIME_BALL, "Hub Forcefield", userPreferences.HubForcefield, _toggleHubForcefield);
buildPreference(44, Material.SADDLE, "Hub Ignore Velocity", userPreferences.IgnoreVelocity, _toggleHubIgnoreVelocity);
}
if (getClientManager().Get(getPlayer()).GetRank().Has(Rank.ADMIN) || getClientManager().Get(getPlayer()).GetRank() == Rank.JNR_DEV)
if (getClientManager().Get(getPlayer()).GetRank().has(Rank.ADMIN) || getClientManager().Get(getPlayer()).GetRank() == Rank.JNR_DEV)
{
buildPreference(36, Material.NETHER_STAR, "Hub Invisibility", userPreferences.Invisibility, _toggleHubInvisibility);
buildPreference(38, Material.SLIME_BALL, "Hub Forcefield", userPreferences.HubForcefield, _toggleHubForcefield);
buildPreference(42, Material.PAPER, "Mac Reports", userPreferences.ShowMacReports, _toggleMacReports);
buildPreference(44, Material.SADDLE, "Hub Ignore Velocity", userPreferences.IgnoreVelocity, _toggleHubIgnoreVelocity);
}
else if (getClientManager().Get(getPlayer()).GetRank().Has(Rank.MODERATOR))
else if (getClientManager().Get(getPlayer()).GetRank().has(Rank.MODERATOR))
{
buildPreference(38, Material.PAPER, "Mac Reports", userPreferences.ShowMacReports, _toggleMacReports);
buildPreference(42, Material.SADDLE, "Hub Ignore Velocity", userPreferences.IgnoreVelocity, _toggleHubIgnoreVelocity);

View File

@ -214,7 +214,7 @@ public class Punish extends MiniPlugin
{
for (Player player : UtilServer.getPlayers())
{
if (_clientManager.Get(player).GetRank().Has(Rank.HELPER) || player.getName().equals(punishee))
if (_clientManager.Get(player).GetRank().has(Rank.HELPER) || player.getName().equals(punishee))
{
player.sendMessage(msg);
}

View File

@ -137,7 +137,7 @@ public class PunishPage extends CraftInventoryCustom implements Listener
examplePrefixNote + "Give Warning if 0 Past Offences and 0 Warnings.",
}, 1, false, true), new PunishButton(this, Category.ChatOffense, 1, false, getDuration(Category.ChatOffense, 1, offenseMap)));
if (_plugin.GetClients().Get(_player).GetRank().Has(Rank.MODERATOR))
if (_plugin.GetClients().Get(_player).GetRank().has(Rank.MODERATOR))
{
AddButton(28, new ShopItem(Material.INK_SACK, (byte)11, "Severity 2", new String[] {
ChatColor.RESET + "Past Offences: " + ChatColor.YELLOW + offenseMap.get(Category.ChatOffense).get(2),
@ -221,7 +221,7 @@ public class PunishPage extends CraftInventoryCustom implements Listener
examplePrefixEx + " Player Radar",
}, 1, false, true), new PunishButton(this, Category.Hacking, 1, true, getDuration(Category.Hacking, 1, offenseMap)));
if (_plugin.GetClients().Get(_player).GetRank().Has(Rank.MODERATOR))
if (_plugin.GetClients().Get(_player).GetRank().has(Rank.MODERATOR))
{
AddButton(32, new ShopItem(Material.INK_SACK, (byte)11, "Severity 2",new String[]
@ -274,7 +274,7 @@ public class PunishPage extends CraftInventoryCustom implements Listener
}, 1, false, true), new PunishButton(this, Category.Warning, 1, false, 0));
if (_plugin.GetClients().Get(_player).GetRank().Has(Rank.MODERATOR))
if (_plugin.GetClients().Get(_player).GetRank().has(Rank.MODERATOR))
{
AddButton(34, new ShopItem(Material.REDSTONE_BLOCK, (byte)0, "Permanent Ban", new String[] {
ChatColor.RESET + "Ban Duration: " + ChatColor.YELLOW + "Permanent",

View File

@ -391,7 +391,7 @@ public class RewardManager
//Dont give Rank Upgrade if already has Legend
if (rarity == RewardRarity.MYTHICAL)
{
if (!canGiveMythical || _clientManager.Get(player).GetRank().Has(Rank.LEGEND))
if (!canGiveMythical || _clientManager.Get(player).GetRank().has(Rank.LEGEND))
{
rarity = RewardRarity.LEGENDARY;
}

View File

@ -58,7 +58,7 @@ public class RankReward extends Reward
@Override
public boolean canGiveReward(Player player)
{
return !_clientManager.Get(player).GetRank().Has(Rank.LEGEND);
return !_clientManager.Get(player).GetRank().has(Rank.LEGEND);
}
@Override

View File

@ -39,7 +39,7 @@ public class PlayerScoreboard
for (Rank rank : Rank.values())
{
if (rank != Rank.ALL)
_scoreboard.registerNewTeam(rank.Name).setPrefix(rank.GetTag(true, true) + ChatColor.RESET + " ");
_scoreboard.registerNewTeam(rank.Name).setPrefix(rank.getTag(true, true) + ChatColor.RESET + " ");
else
_scoreboard.registerNewTeam(rank.Name).setPrefix("");
}
@ -54,12 +54,12 @@ public class PlayerScoreboard
String rankName = _manager.getClients().Get(player).GetRank().Name;
String otherRankName = _manager.getClients().Get(otherPlayer).GetRank().Name;
if (!_manager.getClients().Get(player).GetRank().Has(Rank.ULTRA) && _manager.getDonation().Get(player.getName()).OwnsUltraPackage())
if (!_manager.getClients().Get(player).GetRank().has(Rank.ULTRA) && _manager.getDonation().Get(player.getName()).OwnsUltraPackage())
{
rankName = Rank.ULTRA.Name;
}
if (!_manager.getClients().Get(otherPlayer).GetRank().Has(Rank.ULTRA) && _manager.getDonation().Get(otherPlayer.getName()).OwnsUltraPackage())
if (!_manager.getClients().Get(otherPlayer).GetRank().has(Rank.ULTRA) && _manager.getDonation().Get(otherPlayer.getName()).OwnsUltraPackage())
{
otherRankName = Rank.ULTRA.Name;
}

View File

@ -14,7 +14,7 @@ public class ScoreboardElementRank extends ScoreboardElement
{
ArrayList<String> output = new ArrayList<String>();
if (manager.getClients().Get(player).GetRank().Has(Rank.ULTRA))
if (manager.getClients().Get(player).GetRank().has(Rank.ULTRA))
{
output.add(manager.getClients().Get(player).GetRank().Name);
}

View File

@ -56,7 +56,7 @@ public class ServerConfiguration extends MiniPlugin
@EventHandler
public void onPlayerLogin(PlayerLoginEvent event)
{
if (_serverGroup.getStaffOnly() && !_clientManager.Get(event.getPlayer().getName()).GetRank().Has(event.getPlayer(), Rank.HELPER, false))
if (_serverGroup.getStaffOnly() && !_clientManager.Get(event.getPlayer().getName()).GetRank().has(event.getPlayer(), Rank.HELPER, false))
event.disallow(Result.KICK_OTHER, "This is a staff only server.");
}

View File

@ -1,184 +0,0 @@
package mineplex.core.stats;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.jooq.Configuration;
import org.jooq.DSLContext;
import org.jooq.Delete;
import org.jooq.Insert;
import org.jooq.SQLDialect;
import org.jooq.TransactionalRunnable;
import org.jooq.Update;
import org.jooq.impl.DSL;
import mineplex.core.account.ILoginProcessor;
import mineplex.core.database.DBPool;
import mineplex.database.Tables;
import org.jooq.types.ULong;
public class SecondaryStatHandler implements ILoginProcessor
{
private StatsManager _statsManager;
private StatsRepository _repository;
public SecondaryStatHandler(StatsManager statsManager, StatsRepository repository)
{
_statsManager = statsManager;
_repository = repository;
}
@Override
public String getName()
{
return "Secondary Stat Handler";
}
@Override
public void processLoginResultSet(String playerName, int accountId, ResultSet resultSet) throws SQLException
{
PlayerStats oldPlayerStats = _statsManager.Get(playerName);
PlayerStats newPlayerStats = _repository.loadClientInformation(resultSet);
if (newPlayerStats.getStatsNames().size() == 0 && oldPlayerStats.getStatsNames().size() != 0)
{
try
{
DSLContext context = DSL.using(DBPool.ACCOUNT, SQLDialect.MYSQL);
final List<Insert> inserts = new ArrayList<>();
for (String statName : oldPlayerStats.getStatsNames())
{
Integer statId = _statsManager.getStatId(statName);
Insert insert = context
.insertInto(Tables.accountStat)
.set(Tables.accountStat.accountId, accountId)
.set(Tables.accountStat.statId, statId)
.set(Tables.accountStat.value, ULong.valueOf(Math.max(oldPlayerStats.getStat(statName), 0L)));
inserts.add(insert);
}
context.transaction(new TransactionalRunnable()
{
@Override
public void run(Configuration config) throws Exception
{
DSL.using(config).batch(inserts).execute();
}
});
}
catch (Exception e)
{
e.printStackTrace();
}
}
else
{
_statsManager.replacePlayerHack(playerName, newPlayerStats);
if (oldPlayerStats.getStatsNames().size() != 0)
{
try
{
final DSLContext context = DSL.using(DBPool.ACCOUNT, SQLDialect.MYSQL);
final List<Update> updates = new ArrayList<>();
final List<Insert> inserts = new ArrayList<>();
boolean foundNegativeStat = false;
boolean foundLessThanStat = false;
for (String statName : oldPlayerStats.getStatsNames())
{
Integer statId = _statsManager.getStatId(statName);
Insert insert = context
.insertInto(Tables.accountStat)
.set(Tables.accountStat.accountId, accountId)
.set(Tables.accountStat.statId, statId)
.set(Tables.accountStat.value, ULong.valueOf(Math.max(oldPlayerStats.getStat(statName), 0L)));
inserts.add(insert);
Update update = context
.update(Tables.accountStat)
.set(Tables.accountStat.value, ULong.valueOf(Math.max(oldPlayerStats.getStat(statName), 0L)))
.where(Tables.accountStat.accountId.eq(accountId))
.and(Tables.accountStat.statId.eq(statId));
updates.add(update);
if (oldPlayerStats.getStat(statName) < 0)
{
foundNegativeStat = true;
}
else if (newPlayerStats.getStat(statName) < oldPlayerStats.getStat(statName))
{
foundLessThanStat = true;
}
}
if (foundNegativeStat && foundLessThanStat)
{
context.transaction(new TransactionalRunnable()
{
@Override
public void run(Configuration config) throws Exception
{
int[] updateResult = context.batch(updates).execute();
for (int i = 0; i < updateResult.length; i++)
{
if (updateResult[i] > 0)
inserts.set(i, null);
}
inserts.removeAll(Collections.singleton(null));
context.batch(inserts).execute();
System.out.println("Updating");
}
});
}
/*
final List<Delete> deletes = new ArrayList<>();
for (String statName : oldPlayerStats.getStatsNames())
{
Delete delete = context.delete(Tables.accountStats)
.where(Tables.accountStats.accountId.equal(accountId));
deletes.add(delete);
}
context.transaction(new TransactionalRunnable()
{
@Override
public void run(Configuration config) throws Exception
{
DSL.using(config).batch(deletes).execute();
}
});
*/
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
}
@Override
public String getQuery(int accountId, String uuid, String name)
{
return "SELECT stats.name, value FROM accountStat INNER JOIN stats ON stats.id = accountStat.statId WHERE accountStat.accountId = '" + accountId + "';";
}
}

View File

@ -57,8 +57,6 @@ public class StatsManager extends MiniDbClientPlugin<PlayerStats>
{
_stats.put(stat.Name, stat.Id);
}
clientManager.addStoredProcedureLoginProcessor(new SecondaryStatHandler(this, _repository));
}
public void incrementStat(final Player player, final String statName, final long value)
@ -221,6 +219,6 @@ public class StatsManager extends MiniDbClientPlugin<PlayerStats>
@Override
public String getQuery(int accountId, String uuid, String name)
{
return "SELECT stats.name, value FROM accountStats INNER JOIN stats ON stats.id = accountStats.statId WHERE accountStats.accountId = '" + accountId + "';";
return "SELECT stats.name, value FROM accountStat INNER JOIN stats ON stats.id = accountStat.statId WHERE accountStat.accountId = '" + accountId + "';";
}
}

View File

@ -4,6 +4,7 @@ import java.io.File;
import java.util.Collection;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.server.ServerListPingEvent;
import org.bukkit.plugin.java.JavaPlugin;
@ -163,8 +164,18 @@ public class ServerStatusManager extends MiniPlugin
int ram = (int) ((Runtime.getRuntime().maxMemory() - Runtime.getRuntime().freeMemory()) / 1048576);
int maxRam = (int) (Runtime.getRuntime().maxMemory() / 1048576);
int donorsOnline = 0;
for (Player player : Bukkit.getOnlinePlayers())
{
if (_clientManager.Get(player).GetRank().isDonor())
{
donorsOnline++;
}
}
return new MinecraftServer(_name, group, motd, address, port, playerCount,
maxPlayerCount, tps, ram, maxRam, _startUpDate);
maxPlayerCount, tps, ram, maxRam, _startUpDate, donorsOnline);
}
public String getCurrentServerName()

View File

@ -23,15 +23,15 @@ public class TeleportCommand extends MultiCommandBase<Teleport>
protected void Help(Player caller, String[] args)
{
//Caller to Player
if (args.length == 1 && CommandCenter.GetClientManager().Get(caller).GetRank().Has(caller, Rank.MODERATOR, true))
if (args.length == 1 && CommandCenter.GetClientManager().Get(caller).GetRank().has(caller, Rank.MODERATOR, true))
Plugin.playerToPlayer(caller, caller.getName(), args[0]);
//Player to Player
else if (args.length == 2 && CommandCenter.GetClientManager().Get(caller).GetRank().Has(caller, Rank.ADMIN, true))
else if (args.length == 2 && CommandCenter.GetClientManager().Get(caller).GetRank().has(caller, Rank.ADMIN, true))
Plugin.playerToPlayer(caller, args[0], args[1]);
//Caller to Loc
else if (args.length == 3 && CommandCenter.GetClientManager().Get(caller).GetRank().Has(caller, Rank.ADMIN, true))
else if (args.length == 3 && CommandCenter.GetClientManager().Get(caller).GetRank().has(caller, Rank.ADMIN, true))
Plugin.playerToLoc(caller, caller.getName(), args[0], args[1], args[2]);
//Player to world
@ -39,7 +39,7 @@ public class TeleportCommand extends MultiCommandBase<Teleport>
Plugin.playerToLoc(caller, args[0], args[1], args[2], args[3], args[4]);
//Player to Loc
else if (args.length == 4 && CommandCenter.GetClientManager().Get(caller).GetRank().Has(caller, Rank.ADMIN, true))
else if (args.length == 4 && CommandCenter.GetClientManager().Get(caller).GetRank().has(caller, Rank.ADMIN, true))
Plugin.playerToLoc(caller, args[0], args[1], args[2], args[3]);
else
{

View File

@ -195,7 +195,7 @@ public class Enjin extends MiniPlugin implements CommandExecutor
}
else
{
_commandQueue.add(new QueuedCommand(sender, command, label, args));
//_commandQueue.add(new QueuedCommand(sender, command, label, args));
System.out.println("[" + _dateFormat.format(new Date()) + "] ERROR processing " + name + " " + amount + " gems. Queuing for run later.");
}
}
@ -215,7 +215,7 @@ public class Enjin extends MiniPlugin implements CommandExecutor
}
else
{
_commandQueue.add(new QueuedCommand(sender, command, label, args));
//_commandQueue.add(new QueuedCommand(sender, command, label, args));
System.out.println("[" + _dateFormat.format(new Date()) + "] ERROR processing " + name + " " + amount + " coins. Queuing for run later.");
}
}
@ -244,7 +244,7 @@ public class Enjin extends MiniPlugin implements CommandExecutor
else
{
// Add arg so we don't add back to windows api call
_commandQueue.add(new QueuedCommand(sender, command, label, new String[] { args[0], args[1], args[2], "noaccountchange" }));
//_commandQueue.add(new QueuedCommand(sender, command, label, new String[] { args[0], args[1], args[2], "noaccountchange" }));
System.out.println("[" + _dateFormat.format(new Date()) + "] ERROR processing " + name + " " + amount + " Treasure Keys. Queuing for run later.");
}
}
@ -267,7 +267,7 @@ public class Enjin extends MiniPlugin implements CommandExecutor
else
{
// Add arg so we don't add back to windows api call
_commandQueue.add(new QueuedCommand(sender, command, label, new String[] { args[0], args[1], args[2], "noaccountchange" }));
//_commandQueue.add(new QueuedCommand(sender, command, label, new String[] { args[0], args[1], args[2], "noaccountchange" }));
System.out.println("[" + _dateFormat.format(new Date()) + "] ERROR processing " + name + " " + amount + " Treasure Keys. Queuing for run later.");
}
}
@ -275,7 +275,7 @@ public class Enjin extends MiniPlugin implements CommandExecutor
}
else
{
_commandQueue.add(new QueuedCommand(sender, command, label, args));
//_commandQueue.add(new QueuedCommand(sender, command, label, args));
System.out.println("[" + _dateFormat.format(new Date()) + "] ERROR processing " + name + " " + amount + " Treasure Keys. Queuing for run later.");
}
}
@ -297,7 +297,7 @@ public class Enjin extends MiniPlugin implements CommandExecutor
else
{
// Add arg so we don't add back to windows api call
_commandQueue.add(new QueuedCommand(sender, command, label, new String[] { args[0], args[1], args[2], "noaccountchange" }));
//_commandQueue.add(new QueuedCommand(sender, command, label, new String[] { args[0], args[1], args[2], "noaccountchange" }));
System.out.println("[" + _dateFormat.format(new Date()) + "] ERROR processing " + name + " " + amount + " Treasure Chests. Queuing for run later.");
}
}
@ -318,7 +318,7 @@ public class Enjin extends MiniPlugin implements CommandExecutor
else
{
// Add arg so we don't add back to windows api call
_commandQueue.add(new QueuedCommand(sender, command, label, new String[] { args[0], args[1], args[2], "noaccountchange" }));
//_commandQueue.add(new QueuedCommand(sender, command, label, new String[] { args[0], args[1], args[2], "noaccountchange" }));
System.out.println("[" + _dateFormat.format(new Date()) + "] ERROR processing " + name + " " + amount + " Treasure Chests. Queuing for run later.");
}
}
@ -336,7 +336,7 @@ public class Enjin extends MiniPlugin implements CommandExecutor
{
public void run()
{
if (_clientManager.Get(name).GetRank() == Rank.ALL || !_clientManager.Get(name).GetRank().Has(rank) || _clientManager.Get(name).GetRank() == rank)
if (_clientManager.Get(name).GetRank() == Rank.ALL || !_clientManager.Get(name).GetRank().has(rank) || _clientManager.Get(name).GetRank() == rank)
{
_clientManager.SaveRank(name, playerUUID, rank, perm);
System.out.println("[" + _dateFormat.format(new Date()) + "] " + name + " received " + rank + " " + (perm ? "permanently." : "for 1 month."));
@ -376,7 +376,7 @@ public class Enjin extends MiniPlugin implements CommandExecutor
else
{
// Add arg so we don't add back to windows api call
_commandQueue.add(new QueuedCommand(sender, command, label, new String[] { args[0], args[1], args[2], "noaccountchange" }));
//_commandQueue.add(new QueuedCommand(sender, command, label, new String[] { args[0], args[1], args[2], "noaccountchange" }));
System.out.println("[" + _dateFormat.format(new Date()) + "] ERROR processing " + name + " " + packageName + ". Queuing for run later.");
}
}
@ -384,7 +384,7 @@ public class Enjin extends MiniPlugin implements CommandExecutor
}
else
{
_commandQueue.add(new QueuedCommand(sender, command, label, args));
//_commandQueue.add(new QueuedCommand(sender, command, label, args));
System.out.println("[" + _dateFormat.format(new Date()) + "] ERROR processing " + name + " " + amount + " Treasure Keys. Queuing for run later.");
}
}

View File

@ -6,11 +6,11 @@
<classpathentry combineaccessrules="false" kind="src" path="/Mineplex.Core"/>
<classpathentry combineaccessrules="false" kind="src" path="/Mineplex.Minecraft.Game.Core"/>
<classpathentry combineaccessrules="false" kind="src" path="/Mineplex.Minecraft.Game.ClassCombat"/>
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/commons-codec-1.6.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/Mineplex.Core.Common"/>
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/commons-io-2.4.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/Mineplex.ServerData"/>
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/jooq-3.5.2.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/Mineplex.Database"/>
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/commons-codec-1.6.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@ -366,7 +366,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
// Reserved Slot Check
if (Bukkit.getOnlinePlayers().size() - Bukkit.getServer().getMaxPlayers() >= 20)
{
if (!client.GetRank().Has(Rank.ULTRA))
if (!client.GetRank().has(Rank.ULTRA))
{
Bukkit.getScheduler().scheduleSyncDelayedTask(getPlugin(), new Runnable()
{
@ -389,7 +389,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
// Give developers operator on their servers
boolean testServer = _plugin.getConfig().getString("serverstatus.group").equalsIgnoreCase("Testing");
if (_clientManager.Get(event.getPlayer()).GetRank().Has(Rank.OWNER) || (testServer && (_clientManager.Get(event.getPlayer()).GetRank().Has(Rank.DEVELOPER) || _clientManager.Get(event.getPlayer()).GetRank() == Rank.JNR_DEV)))
if (_clientManager.Get(event.getPlayer()).GetRank().has(Rank.OWNER) || (testServer && (_clientManager.Get(event.getPlayer()).GetRank().has(Rank.DEVELOPER) || _clientManager.Get(event.getPlayer()).GetRank() == Rank.JNR_DEV)))
event.getPlayer().setOp(true);
else
event.getPlayer().setOp(false);
@ -448,7 +448,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
for (Rank rank : Rank.values())
{
if (rank != Rank.ALL)
board.registerNewTeam(rank.Name).setPrefix(rank.GetTag(true, true) + ChatColor.RESET + " ");
board.registerNewTeam(rank.Name).setPrefix(rank.getTag(true, true) + ChatColor.RESET + " ");
else
board.registerNewTeam(rank.Name).setPrefix("");
}
@ -461,12 +461,12 @@ public class HubManager extends MiniClientPlugin<HubClient>
String rankName = _clientManager.Get(player).GetRank().Name;
String otherRankName = _clientManager.Get(otherPlayer).GetRank().Name;
if (!_clientManager.Get(player).GetRank().Has(Rank.ULTRA) && _donationManager.Get(player.getName()).OwnsUltraPackage())
if (!_clientManager.Get(player).GetRank().has(Rank.ULTRA) && _donationManager.Get(player.getName()).OwnsUltraPackage())
{
rankName = Rank.ULTRA.Name;
}
if (!_clientManager.Get(otherPlayer).GetRank().Has(Rank.ULTRA) && _donationManager.Get(otherPlayer.getName()).OwnsUltraPackage())
if (!_clientManager.Get(otherPlayer).GetRank().has(Rank.ULTRA) && _donationManager.Get(otherPlayer.getName()).OwnsUltraPackage())
{
otherRankName = Rank.ULTRA.Name;
}
@ -499,7 +499,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
public void playerPrivateMessage(PrivateMessageEvent event)
{
//Dont Let PM Near Spawn!
if (UtilMath.offset2d(GetSpawn(), event.getSender().getLocation()) == 0 && !_clientManager.Get(event.getSender()).GetRank().Has(Rank.HELPER))
if (UtilMath.offset2d(GetSpawn(), event.getSender().getLocation()) == 0 && !_clientManager.Get(event.getSender()).GetRank().has(Rank.HELPER))
{
UtilPlayer.message(event.getSender(), F.main("Chat", "You must leave spawn before you can Private Message!"));
event.setCancelled(true);
@ -513,7 +513,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
return;
//Dont Let Chat Near Spawn!
if (UtilMath.offset2d(GetSpawn(), event.getPlayer().getLocation()) == 0 && !_clientManager.Get(event.getPlayer()).GetRank().Has(Rank.HELPER))
if (UtilMath.offset2d(GetSpawn(), event.getPlayer().getLocation()) == 0 && !_clientManager.Get(event.getPlayer()).GetRank().has(Rank.HELPER))
{
UtilPlayer.message(event.getPlayer(), F.main("Chat", "You must leave spawn before you can chat!"));
event.setCancelled(true);
@ -540,10 +540,10 @@ public class HubManager extends MiniClientPlugin<HubClient>
//Rank Prefix
String rankStr = "";
if (rank != Rank.ALL)
rankStr = rank.GetTag(true, true) + " ";
rankStr = rank.getTag(true, true) + " ";
if (ownsUltra && !rank.Has(Rank.ULTRA))
rankStr = Rank.ULTRA.GetTag(true, true) + " ";
if (ownsUltra && !rank.has(Rank.ULTRA))
rankStr = Rank.ULTRA.getTag(true, true) + " ";
//Party Chat
if (event.getMessage().charAt(0) == '@')
@ -737,7 +737,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
//Display Rank
obj.getScore(C.cGold + C.Bold + "Rank").setScore(line--);
if (GetClients().Get(player).GetRank().Has(Rank.ULTRA))
if (GetClients().Get(player).GetRank().has(Rank.ULTRA))
obj.getScore(GetClients().Get(player).GetRank().Name).setScore(line--);
else if (GetDonation().Get(player.getName()).OwnsUnknownPackage("SuperSmashMobs ULTRA") ||
GetDonation().Get(player.getName()).OwnsUnknownPackage("Survival Games ULTRA") ||
@ -906,7 +906,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
@EventHandler
public void ignoreVelocity(PlayerVelocityEvent event)
{
if (_clientManager.Get(event.getPlayer()).GetRank().Has(Rank.MODERATOR) && _preferences.Get(event.getPlayer()).IgnoreVelocity)
if (_clientManager.Get(event.getPlayer()).GetRank().has(Rank.MODERATOR) && _preferences.Get(event.getPlayer()).IgnoreVelocity)
{
event.setCancelled(true);
}

View File

@ -162,7 +162,7 @@ public class DisguiseCommand extends CommandBase<HubManager> implements Listener
otherRank = other.GetRank();
} catch(NullPointerException exception)
{}
if(otherRank.Has(Rank.TWITCH))
if(otherRank.has(Rank.TWITCH))
{
UtilPlayer.message(caller, C.cRed + C.Bold + "You can't disguise as staff!");
return;

View File

@ -42,7 +42,7 @@ public class ForcefieldManager extends MiniPlugin
for (Player player : UtilServer.getPlayers())
{
if (Manager.getPreferences().Get(player).HubForcefield && (Manager.GetClients().Get(player).GetRank().Has(Rank.ADMIN) || Manager.GetClients().Get(player).GetRank() == Rank.JNR_DEV))
if (Manager.getPreferences().Get(player).HubForcefield && (Manager.GetClients().Get(player).GetRank().has(Rank.ADMIN) || Manager.GetClients().Get(player).GetRank() == Rank.JNR_DEV))
{
for (Player other : UtilServer.getPlayers())
{
@ -56,7 +56,7 @@ public class ForcefieldManager extends MiniPlugin
if (UtilMath.offset(other, player) > range)
continue;
if (Manager.GetClients().Get(other).GetRank().Has(Rank.ADMIN) || Manager.GetClients().Get(other).GetRank() == Rank.JNR_DEV)
if (Manager.GetClients().Get(other).GetRank().has(Rank.ADMIN) || Manager.GetClients().Get(other).GetRank() == Rank.JNR_DEV)
continue;
if (Recharge.Instance.use(other, "Forcefield Bump", 500, false, false))

View File

@ -738,7 +738,7 @@ public class ServerManager extends MiniPlugin
if (partyPlayer == null)
continue;
if (_clientManager.Get(partyPlayer).GetRank().Has(Rank.ULTRA) || _donationManager.Get(partyPlayer.getName()).OwnsUnknownPackage(serverType + " ULTRA"))
if (_clientManager.Get(partyPlayer).GetRank().has(Rank.ULTRA) || _donationManager.Get(partyPlayer.getName()).OwnsUnknownPackage(serverType + " ULTRA"))
continue;
slots++;
@ -747,7 +747,7 @@ public class ServerManager extends MiniPlugin
}
else
{
if (!_clientManager.Get(player).GetRank().Has(Rank.ULTRA) && !_donationManager.Get(player.getName()).OwnsUnknownPackage(serverType + " ULTRA"))
if (!_clientManager.Get(player).GetRank().has(Rank.ULTRA) && !_donationManager.Get(player.getName()).OwnsUnknownPackage(serverType + " ULTRA"))
slots++;
}

View File

@ -68,7 +68,7 @@ public class LobbyMenu extends ShopPageBase<ServerManager, LobbyShop> implements
if (serverInfo.CurrentPlayers >= serverInfo.MaxPlayers)
{
if (!getClient().GetRank().Has(Rank.ULTRA))
if (!getClient().GetRank().has(Rank.ULTRA))
lore.add(openFull);
else
lore.add(openFullUltra);

View File

@ -114,7 +114,7 @@ public class ServerNpcPage extends ShopPageBase<ServerManager, ServerNpcShop> im
private ShopItem buildShopItem(ServerInfo serverInfo, int slotsNeeded)
{
boolean ownsUltraPackage = getDonationManager().Get(getPlayer().getName()).OwnsUnknownPackage(serverInfo.ServerType + " ULTRA") || getClient().GetRank().Has(Rank.ULTRA);
boolean ownsUltraPackage = getDonationManager().Get(getPlayer().getName()).OwnsUnknownPackage(serverInfo.ServerType + " ULTRA") || getClient().GetRank().has(Rank.ULTRA);
Material status = Material.REDSTONE_BLOCK;
List<String> lore = new ArrayList<String>();
@ -201,7 +201,7 @@ public class ServerNpcPage extends ShopPageBase<ServerManager, ServerNpcShop> im
boolean beta = serverList.size() > 0 && serverList.get(0).Name.contains("BETA");
boolean tournament = serverList.size() > 0 && serverList.get(0).Name.contains("T_");
boolean privateServer = serverList.size() > 0 && serverList.get(0).ServerType.equals("Player");
boolean ownsUltraPackage = getClient().GetRank().Has(Rank.ULTRA) || (serverList.size() > 0 && getDonationManager().Get(getPlayer().getName()).OwnsUnknownPackage(serverList.get(0).ServerType + " ULTRA"));
boolean ownsUltraPackage = getClient().GetRank().has(Rank.ULTRA) || (serverList.size() > 0 && getDonationManager().Get(getPlayer().getName()).OwnsUnknownPackage(serverList.get(0).ServerType + " ULTRA"));
long portalTime = getPlugin().getMillisecondsUntilPortal(getPlayer(), beta);
if (portalTime > 0)
@ -414,7 +414,7 @@ public class ServerNpcPage extends ShopPageBase<ServerManager, ServerNpcShop> im
System.out.println("Selecting server :" + serverInfo.Name);
int slots = getPlugin().getRequiredSlots(player, serverInfo.ServerType);
if (serverInfo.getAvailableSlots() < slots && !(getDonationManager().Get(getPlayer().getName()).OwnsUnknownPackage(serverInfo.ServerType + " ULTRA") || getClient().GetRank().Has(Rank.ULTRA)))
if (serverInfo.getAvailableSlots() < slots && !(getDonationManager().Get(getPlayer().getName()).OwnsUnknownPackage(serverInfo.ServerType + " ULTRA") || getClient().GetRank().has(Rank.ULTRA)))
{
playDenySound(player);
return;

View File

@ -550,7 +550,7 @@ public class ClientClass
if (skillName == null || skill == null || expectedType == null)
return false;
if (!skillName.isEmpty() && (skill == null || skill.GetSkillType() != expectedType || (!skill.IsFree() && !_donor.OwnsUnknownPackage("Champions " + skillName) && !_client.GetRank().Has(Rank.ULTRA) && !_donor.OwnsUnknownPackage("Competitive ULTRA"))))
if (!skillName.isEmpty() && (skill == null || skill.GetSkillType() != expectedType || (!skill.IsFree() && !_donor.OwnsUnknownPackage("Champions " + skillName) && !_client.GetRank().has(Rank.ULTRA) && !_donor.OwnsUnknownPackage("Competitive ULTRA"))))
return false;
} catch (NullPointerException ex)

View File

@ -48,7 +48,7 @@ public class ClassShopManager extends MiniPlugin
public boolean hasAchievements(Player player)
{
if (_clientManager.Get(player).GetRank().Has(Rank.HELPER))
if (_clientManager.Get(player).GetRank().has(Rank.HELPER))
return true;
return _achievementManager.hasCategory(player, new Achievement[]

View File

@ -403,7 +403,7 @@ public class SkillPage extends ShopPageBase<ClassShopManager, ClassCombatShop>
private boolean isSkillLocked(ISkill skill)
{
if (skill.IsFree() || getClientManager().Get(getPlayer().getName()).GetRank().Has(Rank.ULTRA) || getDonationManager().Get(getPlayer().getName()).OwnsUnknownPackage("Champions ULTRA") || getDonationManager().Get(getPlayer().getName()).OwnsUnknownPackage("Champions " + skill.GetName()))
if (skill.IsFree() || getClientManager().Get(getPlayer().getName()).GetRank().has(Rank.ULTRA) || getDonationManager().Get(getPlayer().getName()).OwnsUnknownPackage("Champions ULTRA") || getDonationManager().Get(getPlayer().getName()).OwnsUnknownPackage("Champions " + skill.GetName()))
return false;
return true;
@ -411,7 +411,7 @@ public class SkillPage extends ShopPageBase<ClassShopManager, ClassCombatShop>
private boolean isItemLocked(Item item)
{
if (item.isFree() || getClientManager().Get(getPlayer().getName()).GetRank().Has(Rank.ULTRA) || getDonationManager().Get(getPlayer().getName()).OwnsUnknownPackage("Champions ULTRA") || getDonationManager().Get(getPlayer().getName()).OwnsUnknownPackage("Champions " + item.GetName()))
if (item.isFree() || getClientManager().Get(getPlayer().getName()).GetRank().has(Rank.ULTRA) || getDonationManager().Get(getPlayer().getName()).OwnsUnknownPackage("Champions ULTRA") || getDonationManager().Get(getPlayer().getName()).OwnsUnknownPackage("Champions " + item.GetName()))
return false;
return true;

View File

@ -43,6 +43,9 @@ public class MinecraftServer
private int _port;
public int getPort() { return _port; }
private int _donorsOnline;
public int getDonorsOnline() { return _donorsOnline; }
private long _startUpDate;
/**
@ -59,19 +62,20 @@ public class MinecraftServer
* @param maxRam
*/
public MinecraftServer(String name, String group, String motd, String publicAddress, int port,
int playerCount, int maxPlayerCount, int tps, int ram, int maxRam, long startUpDate)
int playerCount, int maxPlayerCount, int tps, int ram, int maxRam, long startUpDate, int donorsOnline)
{
this._name = name;
this._group = group;
this._motd = motd;
this._playerCount = playerCount;
this._maxPlayerCount = maxPlayerCount;
this._tps = tps;
this._ram = ram;
this._maxRam = maxRam;
this._publicAddress = publicAddress;
this._port = port;
this._startUpDate = startUpDate;
_name = name;
_group = group;
_motd = motd;
_playerCount = playerCount;
_maxPlayerCount = maxPlayerCount;
_tps = tps;
_ram = ram;
_maxRam = maxRam;
_publicAddress = publicAddress;
_port = port;
_donorsOnline = donorsOnline;
_startUpDate = startUpDate;
}
/**

View File

@ -47,7 +47,7 @@ public class CustomerSupport extends MiniPlugin
@EventHandler
public void Join(PlayerJoinEvent event)
{
if (!_clientManager.Get(event.getPlayer()).GetRank().Has(Rank.MODERATOR))
if (!_clientManager.Get(event.getPlayer()).GetRank().has(Rank.MODERATOR))
{
event.getPlayer().kickPlayer("Only for staff.");
return;

View File

@ -785,7 +785,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
{
if (Bukkit.getServer().hasWhitelist())
{
if (_clientManager.Get(event.getPlayer().getName()).GetRank().Has(event.getPlayer(), Rank.MODERATOR, false))
if (_clientManager.Get(event.getPlayer().getName()).GetRank().has(event.getPlayer(), Rank.MODERATOR, false))
{
event.allow();
event.setResult(PlayerLoginEvent.Result.ALLOWED);
@ -816,13 +816,13 @@ public class ArcadeManager extends MiniPlugin implements IRelation
// Reserved Slot Check
if (Bukkit.getOnlinePlayers().size() >= Bukkit.getServer().getMaxPlayers())
{
if (_clientManager.Get(event.getPlayer().getName()).GetRank().Has(event.getPlayer(), Rank.HELPER, false))
if (_clientManager.Get(event.getPlayer().getName()).GetRank().has(event.getPlayer(), Rank.HELPER, false))
{
event.allow();
event.setResult(PlayerLoginEvent.Result.ALLOWED);
return;
}
else if (_clientManager.Get(event.getPlayer().getName()).GetRank().Has(event.getPlayer(), Rank.ULTRA, false)
else if (_clientManager.Get(event.getPlayer().getName()).GetRank().has(event.getPlayer(), Rank.ULTRA, false)
|| _donationManager.Get(event.getPlayer().getName()).OwnsUnknownPackage(_serverConfig.ServerType + " ULTRA"))
{
@ -859,9 +859,9 @@ public class ArcadeManager extends MiniPlugin implements IRelation
boolean testServer = _plugin.getConfig().getString("serverstatus.group").equalsIgnoreCase("Testing");
boolean eventTestServer = _plugin.getConfig().getString("serverstatus.name").equalsIgnoreCase("SMTestServer-1");
if (_clientManager.Get(event.getPlayer()).GetRank().Has(Rank.OWNER)
|| (testServer && (_clientManager.Get(event.getPlayer()).GetRank().Has(Rank.DEVELOPER) || _clientManager.Get(event.getPlayer()).GetRank() == Rank.JNR_DEV))
|| eventTestServer && _clientManager.Get(event.getPlayer()).GetRank().Has(Rank.JNR_DEV))
if (_clientManager.Get(event.getPlayer()).GetRank().has(Rank.OWNER)
|| (testServer && (_clientManager.Get(event.getPlayer()).GetRank().has(Rank.DEVELOPER) || _clientManager.Get(event.getPlayer()).GetRank() == Rank.JNR_DEV))
|| eventTestServer && _clientManager.Get(event.getPlayer()).GetRank().has(Rank.JNR_DEV))
event.getPlayer().setOp(true);
else
event.getPlayer().setOp(false);

View File

@ -154,7 +154,7 @@ public class DisguiseCommand extends CommandBase<ArcadeManager> implements Liste
otherRank = other.GetRank();
} catch(NullPointerException exception)
{}
if(otherRank.Has(Rank.TWITCH))
if(otherRank.has(Rank.TWITCH))
{
UtilPlayer.message(caller, C.cRed + C.Bold + "You can't disguise as staff!");
return;

View File

@ -82,13 +82,13 @@ public class EventModule extends MiniPlugin
if (!event.getMessage().toLowerCase().startsWith("/sethost "))
return;
boolean allowed = Manager.GetClients().Get(event.getPlayer()).GetRank().Has(event.getPlayer(), Rank.JNR_DEV, true);
boolean allowed = Manager.GetClients().Get(event.getPlayer()).GetRank().has(event.getPlayer(), Rank.JNR_DEV, true);
if (!allowed)
{
allowed = _plugin.getConfig().getString("serverstatus.name").equalsIgnoreCase("SMTestServer-1") &&
Manager.GetClients().Get(event.getPlayer()).GetRank().Has(event.getPlayer(), Rank.SNR_MODERATOR, true);
Manager.GetClients().Get(event.getPlayer()).GetRank().has(event.getPlayer(), Rank.SNR_MODERATOR, true);
}
if (!allowed)

View File

@ -1053,7 +1053,7 @@ public class Wizards extends SoloGame
@EventHandler
public void onChat(PlayerChatEvent event)
{
if (Manager.GetClients().Get(event.getPlayer()).GetRank().Has(Rank.ADMIN))
if (Manager.GetClients().Get(event.getPlayer()).GetRank().has(Rank.ADMIN))
{
if (event.getMessage().equalsIgnoreCase("spells"))
{

View File

@ -42,7 +42,7 @@ public class MenuPage extends BasePage
addButton(4, getOwnerHead(), new PlayerHeadButton(getPlugin(), this));
boolean host = _manager.isHost(getPlayer());
boolean disableChangeButtons = !getClientManager().Get(getPlayer()).GetRank().Has(Rank.YOUTUBE) && getPlugin().isGameInProgress();
boolean disableChangeButtons = !getClientManager().Get(getPlayer()).GetRank().has(Rank.YOUTUBE) && getPlugin().isGameInProgress();
{
// Change Buttons - If a game is in progress and user isn't Youtube+ rank, they cannot

View File

@ -62,7 +62,7 @@ public class GameChatManager implements Listener
CoreClient cc = Manager.GetClients().Get(sender);
rank = cc.getDisguisedRank();
if(!cc.GetRank().Has(Rank.JNR_DEV))
if(!cc.GetRank().has(Rank.JNR_DEV))
{
disguiseTag = ChatColor.BLACK + " ";
}
@ -97,10 +97,10 @@ public class GameChatManager implements Listener
else
{
if (rank != Rank.ALL)
rankStr = rank.GetTag(true, true) + " ";
rankStr = rank.getTag(true, true) + " ";
if (ownsUltra && !rank.Has(Rank.ULTRA))
rankStr = Rank.ULTRA.GetTag(true, true) + " ";
if (ownsUltra && !rank.has(Rank.ULTRA))
rankStr = Rank.ULTRA.getTag(true, true) + " ";
}
if (event.getMessage().charAt(0) == '@')
@ -158,7 +158,7 @@ public class GameChatManager implements Listener
{
Player receiver = recipientIterator.next();
if (!Manager.GetServerConfig().Tournament && Manager.GetClients().Get(receiver).GetRank().Has(Rank.MODERATOR))
if (!Manager.GetServerConfig().Tournament && Manager.GetClients().Get(receiver).GetRank().has(Rank.MODERATOR))
continue;
GameTeam recTeam = Manager.GetGame().GetTeam(receiver);

View File

@ -923,7 +923,7 @@ public class GameFlagManager implements Listener
if (event.isCancelled())
return;
if (Manager.GetClients().Get(event.getPlayer()).GetRank().Has(Rank.DEVELOPER))
if (Manager.GetClients().Get(event.getPlayer()).GetRank().has(Rank.DEVELOPER))
return;
Game game = Manager.GetGame();

View File

@ -169,7 +169,7 @@ public class GameHostManager implements Listener
// Admins update
for (Player player : UtilServer.getPlayers())
{
if (player.equals(_host) || _adminList.contains(player.getName()) || Manager.GetClients().Get(player).GetRank().Has(Rank.ADMIN))
if (player.equals(_host) || _adminList.contains(player.getName()) || Manager.GetClients().Get(player).GetRank().has(Rank.ADMIN))
{
if (Manager.GetGame() == null || Manager.GetGame().GetState() == GameState.Recruit)
giveAdminItem(player);
@ -378,7 +378,7 @@ public class GameHostManager implements Listener
if (!isPrivateServer())
return;
if (!Manager.GetClients().Get(event.getPlayer()).GetRank().Has(event.getPlayer(), Rank.JNR_DEV, true) && !event.getPlayer().isOp())
if (!Manager.GetClients().Get(event.getPlayer()).GetRank().has(event.getPlayer(), Rank.JNR_DEV, true) && !event.getPlayer().isOp())
return;
giveAdmin(event.getPlayer());
@ -482,7 +482,7 @@ public class GameHostManager implements Listener
public boolean isAdmin(Player player, boolean includeStaff)
{
return player.equals(_host) || _adminList.contains(player.getName()) || (includeStaff && Manager.GetClients().Get(player).GetRank().Has(Rank.ADMIN));
return player.equals(_host) || _adminList.contains(player.getName()) || (includeStaff && Manager.GetClients().Get(player).GetRank().has(Rank.ADMIN));
}
public boolean isHost(Player player)
@ -585,7 +585,7 @@ public class GameHostManager implements Listener
if (_hostRank == null)
return false;
return _hostRank.Has(rank);
return _hostRank.has(rank);
}
public ArrayList<GameType> getAvailableGames(Player player)

View File

@ -178,7 +178,7 @@ public class GameLobbyManager implements Listener, IPacketHandler
}
else
{
scoreboard.registerNewTeam(rank.Name).setPrefix(rank.GetTag(true, true) + ChatColor.RESET + " " + ChatColor.WHITE);
scoreboard.registerNewTeam(rank.Name).setPrefix(rank.getTag(true, true) + ChatColor.RESET + " " + ChatColor.WHITE);
}
if (Manager.GetGame() != null && !Manager.GetGame().GetTeamList().isEmpty())
@ -197,7 +197,7 @@ public class GameLobbyManager implements Listener, IPacketHandler
}
else
{
scoreboard.registerNewTeam(rank.Name + team.GetName().toUpperCase()).setPrefix(rank.GetTag(true, true) + ChatColor.RESET + " " + team.GetColor());
scoreboard.registerNewTeam(rank.Name + team.GetName().toUpperCase()).setPrefix(rank.getTag(true, true) + ChatColor.RESET + " " + team.GetColor());
}
}
}
@ -1066,7 +1066,7 @@ public class GameLobbyManager implements Listener, IPacketHandler
(ent.GetKit().GetAvailability() == KitAvailability.Achievement &&
Manager.GetAchievement().hasCategory(player, ent.GetKit().getAchievementRequirement())) || //Achievement
donor.OwnsUnknownPackage(Manager.GetGame().GetType().GetKitGameName() + " " + ent.GetKit().GetName()) || //Green
Manager.GetClients().Get(player).GetRank().Has(Rank.MAPDEV) || //STAFF
Manager.GetClients().Get(player).GetRank().has(Rank.MAPDEV) || //STAFF
donor.OwnsUnknownPackage(Manager.GetServerConfig().ServerType + " ULTRA") || //Single Ultra (Old)
Manager.GetServerConfig().Tournament) //Tournament
{
@ -1188,7 +1188,7 @@ public class GameLobbyManager implements Listener, IPacketHandler
teamName = "";
String rankName = Manager.GetClients().Get(player).GetRank().Name;
boolean rankIsUltra = !Manager.GetClients().Get(player).GetRank().Has(Rank.ULTRA) && Manager.GetDonation().Get(player.getName()).OwnsUnknownPackage(Manager.GetServerConfig().ServerType + " ULTRA");
boolean rankIsUltra = !Manager.GetClients().Get(player).GetRank().has(Rank.ULTRA) && Manager.GetDonation().Get(player.getName()).OwnsUnknownPackage(Manager.GetServerConfig().ServerType + " ULTRA");
if (rankIsUltra)
{

View File

@ -139,11 +139,11 @@ public class GameLootManager implements Listener
{
double chance = Math.min(0.5, 0.1 + (System.currentTimeMillis() - _startTime)/3600000d);
if (Manager.GetClients().Get(player).GetRank().Has(Rank.ULTRA))
if (Manager.GetClients().Get(player).GetRank().has(Rank.ULTRA))
{
if (Manager.GetClients().Get(player).GetRank().Has(Rank.HERO))
if (Manager.GetClients().Get(player).GetRank().has(Rank.HERO))
{
if (Manager.GetClients().Get(player).GetRank().Has(Rank.LEGEND))
if (Manager.GetClients().Get(player).GetRank().has(Rank.LEGEND))
{
chance *= 1.6;
}

View File

@ -336,7 +336,7 @@ public class GamePlayerManager implements Listener
donor.OwnsUnknownPackage(Manager.GetGame().GetType().GetKitGameName() + " " + kit.GetName()) || //Green
Manager.GetClients().Get(player).GetRank().Has(Rank.MAPDEV) || //STAFF
Manager.GetClients().Get(player).GetRank().has(Rank.MAPDEV) || //STAFF
donor.OwnsUnknownPackage(Manager.GetServerConfig().ServerType + " ULTRA") || //Single Ultra (Old)
@ -380,7 +380,7 @@ public class GamePlayerManager implements Listener
Player player = event.getPlayer();
if (Manager.GetClients().Get(player).GetRank().Has(Rank.MODERATOR))
if (Manager.GetClients().Get(player).GetRank().has(Rank.MODERATOR))
return;
if (event.getMessage().toLowerCase().startsWith("/tp"))

View File

@ -122,7 +122,7 @@ public class GameStatManager implements Listener
@EventHandler
public void statBoostCommand(PlayerCommandPreprocessEvent event)
{
if (event.getMessage().startsWith("/statboost ") && Manager.GetClients().Get(event.getPlayer()).GetRank().Has(Rank.OWNER))
if (event.getMessage().startsWith("/statboost ") && Manager.GetClients().Get(event.getPlayer()).GetRank().has(Rank.OWNER))
{
event.setCancelled(true);

View File

@ -78,7 +78,7 @@ public class IdleManager implements Listener
if (getArcadeManager().GetGame().GetState() != GameState.Recruit && !getArcadeManager().GetGame().IsAlive(player))
continue;
if (getArcadeManager().GetClients().Get(player).GetRank().Has(Rank.MODERATOR))
if (getArcadeManager().GetClients().Get(player).GetRank().has(Rank.MODERATOR))
continue;
//Start Beeps