incognito changes

This commit is contained in:
Ben 2016-04-05 00:38:27 +01:00
parent 7de23216f6
commit 7f92a3c048
15 changed files with 142 additions and 79 deletions

View File

@ -58,6 +58,7 @@ public class Chat extends MiniPlugin
private CoreClientManager _clientManager;
private PreferencesManager _preferences;
private AchievementManager _achievements;
private IncognitoManager _incognitoManager;
private String[] _hackusations = {"hack", "hax", "hacker", "hacking", "cheat", "cheater", "cheating", "forcefield", "flyhack", "flyhacking", "autoclick", "aimbot"};
private String _filterUrl = "https://chat.mineplex.com:8003/content/item/moderate";
@ -74,10 +75,11 @@ public class Chat extends MiniPlugin
private HashMap<UUID, MessageData> _playerLastMessage = new HashMap<UUID, MessageData>();
public Chat(JavaPlugin plugin, CoreClientManager clientManager, PreferencesManager preferences, AchievementManager achievements, String serverName)
public Chat(JavaPlugin plugin, IncognitoManager incognitoManager, CoreClientManager clientManager, PreferencesManager preferences, AchievementManager achievements, String serverName)
{
super("Chat", plugin);
_incognitoManager = incognitoManager;
_clientManager = clientManager;
_serverName = serverName;
_preferences = preferences;
@ -308,7 +310,7 @@ public class Chat extends MiniPlugin
Player sender = event.getPlayer();
if (IncognitoManager.Instance.Get(sender).Status)
if (_incognitoManager != null && _incognitoManager.Get(sender).Status)
{
UtilPlayer.message(sender, C.cYellow + "You can not chat while incognito.");
event.setCancelled(true);

View File

@ -2,24 +2,26 @@ package mineplex.core.incognito;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.player.AsyncPlayerPreLoginEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerKickEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.plugin.java.JavaPlugin;
import mineplex.core.MiniClientPlugin;
import com.google.common.base.Function;
import mineplex.core.MiniDbClientPlugin;
import mineplex.core.account.CoreClientManager;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer;
import mineplex.core.incognito.commands.IncognitoToggleCommand;
import mineplex.core.incognito.events.IncognitoHidePlayerEvent;
import mineplex.core.incognito.events.IncognitoStatusChangeEvent;
import mineplex.core.incognito.repository.IncognitoClient;
import mineplex.core.incognito.repository.IncognitoRepository;
@ -31,17 +33,13 @@ public class IncognitoManager extends MiniDbClientPlugin<IncognitoClient>
{
private CoreClientManager _clientManager;
private IncognitoRepository _repository;
public static IncognitoManager Instance;
public IncognitoManager(JavaPlugin plugin, CoreClientManager clientManager, PacketHandler packetHandler)
{
super("Incognito", plugin, clientManager);
_repository = new IncognitoRepository(this);
_clientManager = clientManager;
Instance = this;
}
public void addCommands()
@ -64,9 +62,23 @@ public class IncognitoManager extends MiniDbClientPlugin<IncognitoClient>
if (!enabled)
{
for (Player other : UtilServer.getPlayers())
if (event.doShow())
{
other.showPlayer(caller);
for (Player other : UtilServer.getPlayers())
{
other.showPlayer(caller);
}
}
}
else
{
IncognitoHidePlayerEvent customEvent = UtilServer.CallEvent(new IncognitoHidePlayerEvent(caller));
if (!customEvent.isCancelled())
{
UtilServer.getPlayersCollection().forEach(player -> {
player.hidePlayer(caller);
});
}
}
@ -75,28 +87,6 @@ public class IncognitoManager extends MiniDbClientPlugin<IncognitoClient>
return enabled;
}
@EventHandler(priority = EventPriority.LOWEST)
public void Update(UpdateEvent event)
{
if (event.getType() != UpdateType.FAST)
{
UtilServer.getPlayersCollection().forEach(player ->
{
UtilServer.getPlayersCollection().forEach(other ->
{
if (Get(other).Status && !_clientManager.hasRank(player, _clientManager.Get(other).GetRank()))
player.hidePlayer(other);
if (Get(player).Status)
{
if (!_clientManager.hasRank(other, _clientManager.Get(player).GetRank()))
other.hidePlayer(player);
}
});
});
}
}
@EventHandler(priority = EventPriority.HIGHEST)
public void Join(PlayerJoinEvent event)
{
@ -105,15 +95,23 @@ public class IncognitoManager extends MiniDbClientPlugin<IncognitoClient>
event.setJoinMessage(null);
informIncognito(event.getPlayer());
}
IncognitoHidePlayerEvent customEvent = UtilServer.CallEvent(new IncognitoHidePlayerEvent(event.getPlayer()));
UtilServer.getPlayersCollection().forEach(player -> {
if (Get(event.getPlayer()).Status && !_clientManager.hasRank(player, _clientManager.Get(event.getPlayer()).GetRank()))
if (!customEvent.isCancelled() && Get(event.getPlayer()).Status && !_clientManager.hasRank(player, _clientManager.Get(event.getPlayer()).GetRank()))
{
player.hidePlayer(event.getPlayer());
}
if (Get(player).Status)
{
if (!_clientManager.hasRank(event.getPlayer(), _clientManager.Get(player).GetRank()))
IncognitoHidePlayerEvent customEvent2 = UtilServer.CallEvent(new IncognitoHidePlayerEvent(player));
if (!customEvent2.isCancelled() && !_clientManager.hasRank(event.getPlayer(), _clientManager.Get(player).GetRank()))
{
event.getPlayer().hidePlayer(player);
}
}
});
}
@ -153,7 +151,7 @@ public class IncognitoManager extends MiniDbClientPlugin<IncognitoClient>
{
return _repository;
}
@Override
public String getQuery(int accountId, String uuid, String name)
{

View File

@ -13,6 +13,8 @@ public class IncognitoStatusChangeEvent extends Event
private boolean _cancelled;
private boolean _show = true;
public IncognitoStatusChangeEvent(Player player, boolean newState)
{
_player = player;
@ -49,4 +51,14 @@ public class IncognitoStatusChangeEvent extends Event
return handlers;
}
public void show(boolean show)
{
_show = show;
}
public boolean doShow()
{
return _show;
}
}

View File

@ -27,7 +27,12 @@ import mineplex.core.friend.data.FriendData;
import mineplex.core.friend.data.FriendStatus;
import mineplex.core.ignore.IgnoreManager;
import mineplex.core.incognito.IncognitoManager;
import mineplex.core.message.commands.*;
import mineplex.core.message.commands.AdminCommand;
import mineplex.core.message.commands.AnnounceCommand;
import mineplex.core.message.commands.MessageAdminCommand;
import mineplex.core.message.commands.MessageCommand;
import mineplex.core.message.commands.ResendAdminCommand;
import mineplex.core.message.commands.ResendCommand;
import mineplex.core.message.redis.AnnouncementHandler;
import mineplex.core.message.redis.MessageHandler;
import mineplex.core.message.redis.RedisMessage;
@ -45,6 +50,8 @@ public class MessageManager extends MiniClientPlugin<ClientMessage>
private CoreClientManager _clientManager;
private FriendManager _friendsManager;
private IgnoreManager _ignoreManager;
private IncognitoManager _incognitoManager;
private HashMap<UUID, BukkitRunnable> _messageTimeouts = new HashMap<UUID, BukkitRunnable>();
private PreferencesManager _preferences;
private Punish _punish;
@ -52,11 +59,12 @@ public class MessageManager extends MiniClientPlugin<ClientMessage>
private ArrayList<String> _randomMessage;
private String _serverName;
public MessageManager(JavaPlugin plugin, CoreClientManager clientManager, PreferencesManager preferences,
public MessageManager(JavaPlugin plugin, IncognitoManager incognitoManager, CoreClientManager clientManager, PreferencesManager preferences,
IgnoreManager ignoreManager, Punish punish, FriendManager friendManager, Chat chat)
{
super("Message", plugin);
_incognitoManager = incognitoManager;
_clientManager = clientManager;
_preferences = preferences;
_ignoreManager = ignoreManager;
@ -86,7 +94,7 @@ public class MessageManager extends MiniClientPlugin<ClientMessage>
addCommand(new AnnounceCommand(this));
//addCommand(new GlobalCommand(this));
addCommand(new AdminCommand(this));
addCommand(new AdminCommand(this, _incognitoManager));
}
@Override
@ -523,7 +531,7 @@ public class MessageManager extends MiniClientPlugin<ClientMessage>
// If this is a message inside the server
if (to != null)
{
if (IncognitoManager.Instance.Get(to).Status)
if (_incognitoManager.Get(to).Status)
{
UtilPlayer.message(sender, F.main("Online Player Search", F.elem("0") + " matches for [" + F.elem(target) + "]."));
return;

View File

@ -9,14 +9,18 @@ import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer;
import mineplex.core.incognito.IncognitoManager;
import mineplex.core.message.MessageManager;
import mineplex.core.visibility.VisibilityManager;
public class AdminCommand extends CommandBase<MessageManager>
{
public AdminCommand(MessageManager plugin)
private IncognitoManager _incognitoManager;
public AdminCommand(MessageManager plugin, IncognitoManager incognitoManager)
{
super(plugin, Rank.ALL, "a","admin");
_incognitoManager = incognitoManager;
}
@Override
@ -51,6 +55,11 @@ public class AdminCommand extends CommandBase<MessageManager>
{
if (Plugin.GetClientManager().Get(to).GetRank().has(Rank.HELPER))
{
if (_incognitoManager.Get(to).Status)
{
continue;
}
if (!to.equals(caller))
UtilPlayer.message(to, F.rank(Plugin.GetClientManager().Get(caller).GetRank()) + " " + caller.getName() + " " + C.cPurple + message);

View File

@ -120,12 +120,12 @@ public class Clans extends JavaPlugin
IgnoreManager ignoreManager = new IgnoreManager(this, _clientManager, preferenceManager, portal);
new IncognitoManager(this, _clientManager, packetHandler);
IncognitoManager incognito = new IncognitoManager(this, _clientManager, packetHandler);
StatsManager statsManager = new StatsManager(this, _clientManager);
AchievementManager achievementManager = new AchievementManager(statsManager, _clientManager, _donationManager);
Chat chat = new Chat(this, _clientManager, preferenceManager, achievementManager, serverStatusManager.getCurrentServerName());
new MessageManager(this, _clientManager, preferenceManager, ignoreManager, punish, new FriendManager(this, _clientManager, preferenceManager, portal), chat);
Chat chat = new Chat(this, incognito, _clientManager, preferenceManager, achievementManager, serverStatusManager.getCurrentServerName());
new MessageManager(this, incognito, _clientManager, preferenceManager, ignoreManager, punish, new FriendManager(this, _clientManager, preferenceManager, portal), chat);
new MemoryFix(this);
new FoodDupeFix(this);

View File

@ -74,7 +74,6 @@ import mineplex.core.updater.event.UpdateEvent;
import mineplex.game.clans.Clans;
import mineplex.game.clans.clans.ClanTips.TipType;
import mineplex.game.clans.clans.ClansUtility.ClanRelation;
import mineplex.game.clans.clans.ban.ClansBanManager;
import mineplex.game.clans.clans.commands.ClanManagementCommand;
import mineplex.game.clans.clans.commands.ClansAllyChatCommand;
import mineplex.game.clans.clans.commands.ClansChatCommand;
@ -99,7 +98,6 @@ import mineplex.game.clans.clans.redis.ClanLoadCommandHandler;
import mineplex.game.clans.clans.regions.ClansRegions;
import mineplex.game.clans.clans.scoreboard.ClansScoreboardManager;
import mineplex.game.clans.clans.siege.SiegeManager;
import mineplex.game.clans.clans.siege.outpost.OutpostManager;
import mineplex.game.clans.clans.staff.SilentChestOpen;
import mineplex.game.clans.clans.supplyDrop.SupplyDropManager;
import mineplex.game.clans.clans.tntGenerator.TntGeneratorManager;
@ -172,6 +170,7 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
private NetherManager _netherManager;
private DamageManager _damageManager;
private SiegeManager _siegeManager;
private IncognitoManager _incognitoManager;
private ClansBlacklist _blacklist;
@ -236,6 +235,7 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
/*_clansBans = clansBans;*/
_punish = punish;
_incognitoManager = new IncognitoManager(plugin, clientManager, packetHandler);
_serverName = serverName;
_clientManager = clientManager;
_combatManager = new CombatManager(plugin);
@ -603,7 +603,7 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
return;
}*/
if (IncognitoManager.Instance.Get(event.getPlayer()).Status)
if (_incognitoManager.Get(event.getPlayer()).Status)
{
return;
}
@ -632,7 +632,7 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
{
event.setQuitMessage(null);
if (IncognitoManager.Instance.Get(event.getPlayer()).Status)
if (_incognitoManager.Get(event.getPlayer()).Status)
{
return;
}
@ -657,7 +657,7 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
@EventHandler(priority = EventPriority.HIGHEST)
public void Kick(PlayerKickEvent event)
{
if (IncognitoManager.Instance.Get(event.getPlayer()).Status)
if (_incognitoManager.Get(event.getPlayer()).Status)
{
event.setLeaveMessage(null);
return;
@ -1370,4 +1370,9 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
{
return _siegeManager;
}
public IncognitoManager getIncognitoManager()
{
return _incognitoManager;
}
}

View File

@ -357,7 +357,7 @@ public class ClansCommand extends CommandBase<ClansManager>
}
Player target = UtilPlayer.searchOnline(caller, args[1], true);
if (target == null || IncognitoManager.Instance.Get(target).Status) return;
if (target == null || _clansManager.getIncognitoManager().Get(target).Status) return;
Plugin.getClanUtility().invite(caller, clan, target);
}

View File

@ -25,7 +25,7 @@ public class SilentChestOpen extends MiniPlugin
@EventHandler
public void onInteract(PlayerInteractEvent event)
{
if (!IncognitoManager.Instance.Get(event.getPlayer()).Status)
if (!_clansManager.getIncognitoManager().Get(event.getPlayer()).Status)
return;
if (!ClansManager.getInstance().getClientManager().hasRank(event.getPlayer(), Rank.CMOD))

View File

@ -152,7 +152,7 @@ public class MeridianScepter extends LegendaryItem
continue;
}
if (IncognitoManager.Instance.Get(closest).Status)
if (ClansManager.getInstance().getIncognitoManager().Get(closest).Status)
{
continue;
}

View File

@ -143,8 +143,8 @@ public class Hub extends JavaPlugin implements IRelation
IncognitoManager incognito = new IncognitoManager(this, clientManager, packetHandler);
new ServerManager(this, clientManager, donationManager, portal, partyManager, serverStatusManager, hubManager, new StackerManager(hubManager), queueManager);
Chat chat = new Chat(this, clientManager, preferenceManager, achievementManager, serverStatusManager.getCurrentServerName());
new MessageManager(this, clientManager, preferenceManager, ignoreManager, punish, friendManager, chat);
Chat chat = new Chat(this, incognito, clientManager, preferenceManager, achievementManager, serverStatusManager.getCurrentServerName());
new MessageManager(this, incognito, clientManager, preferenceManager, ignoreManager, punish, friendManager, chat);
new MemoryFix(this);
new FileUpdater(this, portal, serverStatusManager.getCurrentServerName(), serverStatusManager.getRegion());
new CustomTagFix(this, packetHandler);

View File

@ -9,8 +9,6 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.Random;
import mineplex.core.reward.RewardManager;
import mineplex.core.valentines.ValentinesGiftManager;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.GameMode;
@ -74,8 +72,8 @@ import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.event.GadgetCollideEntityEvent;
import mineplex.core.gadget.event.GadgetEnableEvent;
import mineplex.core.gadget.types.GadgetType;
import mineplex.core.giveaway.GiveawayManager;
import mineplex.core.hologram.HologramManager;
import mineplex.core.incognito.events.IncognitoHidePlayerEvent;
import mineplex.core.inventory.InventoryManager;
import mineplex.core.message.PrivateMessageEvent;
import mineplex.core.mount.MountManager;
@ -97,12 +95,14 @@ import mineplex.core.portal.Portal;
import mineplex.core.preferences.PreferencesManager;
import mineplex.core.projectile.ProjectileManager;
import mineplex.core.punish.Punish;
import mineplex.core.reward.RewardManager;
import mineplex.core.stats.StatsManager;
import mineplex.core.status.ServerStatusManager;
import mineplex.core.task.TaskManager;
import mineplex.core.treasure.TreasureManager;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.core.valentines.ValentinesGiftManager;
import mineplex.hub.commands.DisguiseCommand;
import mineplex.hub.commands.ForcefieldRadius;
import mineplex.hub.commands.GadgetToggle;
@ -574,6 +574,15 @@ public class HubManager extends MiniClientPlugin<HubClient>
event.setCancelled(true);
}
}
@EventHandler
public void Incog(IncognitoHidePlayerEvent event)
{
if (!_clientManager.hasRank(event.getPlayer(), Rank.ADMIN))
{
event.setCancelled(true);
}
}
@EventHandler
public void PlayerChat(AsyncPlayerChatEvent event)

View File

@ -2,6 +2,12 @@ package mineplex.staffServer;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_8_R3.CraftServer;
import org.bukkit.plugin.java.JavaPlugin;
import com.mojang.authlib.GameProfile;
import mineplex.core.account.CoreClientManager;
import mineplex.core.achievement.AchievementManager;
import mineplex.core.antihack.AntiHack;
@ -9,6 +15,7 @@ import mineplex.core.chat.Chat;
import mineplex.core.command.CommandCenter;
import mineplex.core.creature.Creature;
import mineplex.core.donation.DonationManager;
import mineplex.core.incognito.IncognitoManager;
import mineplex.core.inventory.InventoryManager;
import mineplex.core.memory.MemoryFix;
import mineplex.core.monitor.LagMeter;
@ -26,12 +33,6 @@ import mineplex.staffServer.customerSupport.CustomerSupport;
import mineplex.staffServer.salespackage.SalesPackageManager;
import net.minecraft.server.v1_8_R3.MinecraftServer;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_8_R3.CraftServer;
import org.bukkit.plugin.java.JavaPlugin;
import com.mojang.authlib.GameProfile;
public class StaffServer extends JavaPlugin
{
private String WEB_CONFIG = "webServer";
@ -60,7 +61,7 @@ public class StaffServer extends JavaPlugin
preferenceManager.GiveItem = false;
Portal portal = new Portal(this, clientManager, serverStatusManager.getCurrentServerName());
new Chat(this, clientManager, preferenceManager, new AchievementManager(new StatsManager(this, clientManager), clientManager, donationManager), serverStatusManager.getCurrentServerName());
new Chat(this, null, clientManager, preferenceManager, new AchievementManager(new StatsManager(this, clientManager), clientManager, donationManager), serverStatusManager.getCurrentServerName());
new MemoryFix(this);
new FileUpdater(this, portal, serverStatusManager.getCurrentServerName(), serverStatusManager.getRegion());
AntiHack.Initialize(this, punish, portal, preferenceManager, clientManager);

View File

@ -134,8 +134,8 @@ public class Arcade extends JavaPlugin
StatsManager statsManager = new StatsManager(this, _clientManager);
AchievementManager achievementManager = new AchievementManager(statsManager, _clientManager, _donationManager);
FriendManager friendManager = new FriendManager(this, _clientManager, preferenceManager, portal);
Chat chat = new Chat(this, _clientManager, preferenceManager, achievementManager, serverStatusManager.getCurrentServerName());
new MessageManager(this, _clientManager, preferenceManager, ignoreManager, punish, friendManager, chat);
Chat chat = new Chat(this, incognito, _clientManager, preferenceManager, achievementManager, serverStatusManager.getCurrentServerName());
new MessageManager(this, incognito, _clientManager, preferenceManager, ignoreManager, punish, friendManager, chat);
BlockRestore blockRestore = new BlockRestore(this);
@ -157,7 +157,7 @@ public class Arcade extends JavaPlugin
//Arcade Manager
PollManager pollManager = new PollManager(this, _clientManager, _donationManager);
_gameManager = new ArcadeManager(this, serverStatusManager, ReadServerConfig(), _clientManager, _donationManager, _damageManager, statsManager, achievementManager, disguiseManager, creature, teleport, new Blood(this), chat, portal, preferenceManager, inventoryManager, packetHandler, cosmeticManager, projectileManager, petManager, hologramManager, webServerAddress, pollManager, npcmanager, customDataManager, punish);
_gameManager = new ArcadeManager(this, serverStatusManager, ReadServerConfig(), _clientManager, _donationManager, _damageManager, statsManager, incognito, achievementManager, disguiseManager, creature, teleport, new Blood(this), chat, portal, preferenceManager, inventoryManager, packetHandler, cosmeticManager, projectileManager, petManager, hologramManager, webServerAddress, pollManager, npcmanager, customDataManager, punish);
new MemoryFix(this);
new CustomTagFix(this, packetHandler);

View File

@ -191,6 +191,8 @@ public class ArcadeManager extends MiniPlugin implements IRelation
private ResourcePackManager _resourcePackManager;
private CustomDataManager _customDataManager;
private Punish _punishmentManager;
private IncognitoManager _incognitoManager;
private TaskManager _taskManager;
private PacketHandler _packetHandler;
@ -212,7 +214,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
public ArcadeManager(Arcade plugin, ServerStatusManager serverStatusManager, GameServerConfig serverConfig,
CoreClientManager clientManager, DonationManager donationManager, DamageManager damageManager,
StatsManager statsManager, AchievementManager achievementManager, DisguiseManager disguiseManager, Creature creature, Teleport teleport, Blood blood, Chat chat,
StatsManager statsManager, IncognitoManager incognitoManager, AchievementManager achievementManager, DisguiseManager disguiseManager, Creature creature, Teleport teleport, Blood blood, Chat chat,
Portal portal, PreferencesManager preferences, InventoryManager inventoryManager, PacketHandler packetHandler,
CosmeticManager cosmeticManager, ProjectileManager projectileManager, PetManager petManager, HologramManager hologramManager, String webAddress, PollManager pollManager,
NpcManager npcManager, CustomDataManager customDataManager, Punish punish)
@ -224,6 +226,8 @@ public class ArcadeManager extends MiniPlugin implements IRelation
// Modules
_blockRestore = new BlockRestore(plugin);
_incognitoManager = incognitoManager;
_blood = blood;
_preferencesManager = preferences;
@ -616,7 +620,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
{
if (event.getNewState() && _game != null && _game.IsPlaying(event.getPlayer()) && _game.IsLive())
{
UtilPlayer.message(event.getPlayer(), F.main("Incognito", "You may not go incognito whilst in a game."));
addSpectator(event.getPlayer(), true);
event.setCancelled(true);
return;
}
@ -624,13 +628,28 @@ public class ArcadeManager extends MiniPlugin implements IRelation
if (event.getNewState())
{
UtilServer.broadcast(F.sys("Quit", event.getPlayer().getName()));
if (_game == null || _game.GetState() != GameState.Live)
{
_specList.add(event.getPlayer());
}
}
else
{
UtilServer.broadcast(F.sys("Join", event.getPlayer().getName()));
if (_game != null && isSpectator(event.getPlayer()))
{
if (_game.GetState() != GameState.Live)
{
_specList.remove(event.getPlayer());
}
event.show(false);
}
}
}
@EventHandler
public void MessageMOTD(ServerListPingEvent event)
{
@ -695,7 +714,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
{
String name = event.getPlayer().getName();
if (IncognitoManager.Instance.Get(event.getPlayer()).Status)
if (_incognitoManager.Get(event.getPlayer()).Status)
{
event.setJoinMessage(null);
return;
@ -714,7 +733,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
@EventHandler
public void MessageQuit(PlayerQuitEvent event)
{
if (IncognitoManager.Instance.Get(event.getPlayer()).Status)
if (_incognitoManager.Get(event.getPlayer()).Status)
{
event.setQuitMessage(null);
return;
@ -1123,7 +1142,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
public boolean IsObserver(Player player)
{
if (IncognitoManager.Instance.Get(player).Status)
if (_incognitoManager.Get(player).Status)
{
_specList.add(player);
}