Don't give the item when a game is in progress.

This commit is contained in:
TadahTech 2016-07-23 22:36:53 -05:00
parent 133376fb94
commit ceccf2d2ac
4 changed files with 8 additions and 6 deletions

View File

@ -36,8 +36,6 @@ public class PartyEventListener implements Listener
{ {
Player player = event.getPlayer(); Player player = event.getPlayer();
player.getInventory().setItem(PartyManager.INTERFACE_SLOT, PartyManager.INTERFACE_ITEM);
String partyName = _plugin.getInviteManager().getPartyWaiting(player.getUniqueId()); String partyName = _plugin.getInviteManager().getPartyWaiting(player.getUniqueId());
if (partyName == null) if (partyName == null)

View File

@ -108,7 +108,7 @@ public class PartyMethodManager
_plugin.getInviteManager().sendAcceptOrDeny(possible, caller.getName()); _plugin.getInviteManager().sendAcceptOrDeny(possible, caller.getName());
return; return;
} }
//Only perform this when I actually need too. //Only perform this when I actually need to.
boolean can = Bukkit.getMaxPlayers() >= _plugin.getPlugin().getServer().getOnlinePlayers().size(); boolean can = Bukkit.getMaxPlayers() >= _plugin.getPlugin().getServer().getOnlinePlayers().size();
if(!can) if(!can)
{ {

View File

@ -515,6 +515,9 @@ public class HubManager extends MiniClientPlugin<HubClient>
//Add Self to Other //Add Self to Other
otherPlayer.getScoreboard().getTeam(rankName).addPlayer(player); otherPlayer.getScoreboard().getTeam(rankName).addPlayer(player);
} }
//only give it in the hub
player.getInventory().setItem(PartyManager.INTERFACE_SLOT, PartyManager.INTERFACE_ITEM);
} }
@EventHandler @EventHandler

View File

@ -1,7 +1,5 @@
package nautilus.game.arcade.managers; package nautilus.game.arcade.managers;
import java.util.ArrayList;
import mineplex.core.common.Rank; import mineplex.core.common.Rank;
import mineplex.core.common.util.C; import mineplex.core.common.util.C;
import mineplex.core.common.util.F; import mineplex.core.common.util.F;
@ -9,6 +7,7 @@ import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilTabTitle; import mineplex.core.common.util.UtilTabTitle;
import mineplex.core.common.util.UtilTime; import mineplex.core.common.util.UtilTime;
import mineplex.core.party.PartyManager;
import mineplex.core.recharge.Recharge; import mineplex.core.recharge.Recharge;
import mineplex.core.updater.UpdateType; import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent; import mineplex.core.updater.event.UpdateEvent;
@ -23,7 +22,6 @@ import nautilus.game.arcade.game.Game.GameState;
import nautilus.game.arcade.game.GameTeam; import nautilus.game.arcade.game.GameTeam;
import nautilus.game.arcade.kit.Kit; import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.kit.ProgressingKit; import nautilus.game.arcade.kit.ProgressingKit;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.Location; import org.bukkit.Location;
@ -41,6 +39,8 @@ import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerRespawnEvent; import org.bukkit.event.player.PlayerRespawnEvent;
import org.bukkit.scheduler.BukkitRunnable; import org.bukkit.scheduler.BukkitRunnable;
import java.util.ArrayList;
public class GamePlayerManager implements Listener public class GamePlayerManager implements Listener
{ {
ArcadeManager Manager; ArcadeManager Manager;
@ -154,6 +154,7 @@ public class GamePlayerManager implements Listener
player.sendMessage(F.main("Kit", "No default kit found for " + C.cGreenB + Manager.GetGame().GetName())); player.sendMessage(F.main("Kit", "No default kit found for " + C.cGreenB + Manager.GetGame().GetName()));
} }
}.runTaskLater(Manager.getPlugin(), 10L); }.runTaskLater(Manager.getPlugin(), 10L);
player.getInventory().setItem(PartyManager.INTERFACE_SLOT, PartyManager.INTERFACE_ITEM);
return; return;
} }