Merge branch 'update/the-smoothest-release-we-will-never-have' into develop

This commit is contained in:
cnr 2016-09-02 00:12:12 -05:00
commit ae0d30558c
5 changed files with 25 additions and 10 deletions

View File

@ -37,7 +37,7 @@ public class PartyInvitesMenu extends PartyMenu
private final int INV_SIZE = 54;
private final int SLOTS_PER_PAGE = 27;
private final int STARTING_SLOT = 18;
private final int STARTING_SLOT = 19;
private final int BACK_BUTTON_SLOT = 0;
private final int DENY_ALL_BUTTON_SLOW = 4;
private final int FILTER_BUTTON_SLOT = 8;

View File

@ -243,7 +243,7 @@ public class WorldManager extends MiniPlugin
for (Player player : Manager.GetSpawn().getWorld().getPlayers())
{
if (UtilMath.offset(player.getLocation(), Manager.GetSpawn()) > 330)
if (UtilMath.offset(player.getLocation(), Manager.GetSpawn()) > 350)
{
player.eject();
player.leaveVehicle();

View File

@ -19,6 +19,6 @@ public class CancelNextGameCommand extends CommandBase<ArcadeManager>
@Override
public void Execute(Player caller, String[] args)
{
Plugin.getNextBestGameManager().cancel(caller, null);
Plugin.getNextBestGameManager().cancel(caller, Plugin.getPartyManager().getParty(caller));
}
}

View File

@ -41,7 +41,7 @@ public class GameRewardManager implements Listener
boolean DoubleGem = false;
boolean TimeReward = true;
public GameRewardManager(ArcadeManager manager)
{
Manager = manager;
@ -248,7 +248,7 @@ public class GameRewardManager implements Listener
{
changeName(player, oldName);
}
}
private void changeName(Player player, String newName)

View File

@ -19,6 +19,8 @@ import nautilus.game.arcade.game.Game;
import nautilus.game.arcade.game.Game.GameState;
import nautilus.game.arcade.game.GameTeam.PlayerState;
import nautilus.game.arcade.game.games.minestrike.Minestrike;
import nautilus.game.arcade.game.games.paintball.Paintball;
import nautilus.game.arcade.game.games.wither.WitherGame;
import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.chat.ClickEvent;
import net.md_5.bungee.api.chat.HoverEvent;
@ -238,7 +240,10 @@ public class NextBestGameManager implements Listener
@EventHandler
public void onDeath(PlayerStateChangeEvent event)
{
if(event.GetGame() instanceof Minestrike)
if(event.GetGame() instanceof Minestrike
|| event.GetGame() instanceof WitherGame
|| event.GetGame() instanceof Paintball
|| event.GetGame().Manager.GetHost() != null)
{
return;
}
@ -328,7 +333,7 @@ public class NextBestGameManager implements Listener
owner.sendMessage(" ");
new CountdownRunnable(party);
_tasks.put(player.getUniqueId(), new CountdownRunnable(party));
} else
{
owner.sendMessage(" ");
@ -357,6 +362,16 @@ public class NextBestGameManager implements Listener
return;
}
if(getGame() == null)
{
return;
}
if(getGame().IsAlive(player))
{
return;
}
if (inHand == null || (inHand.getType() != Material.REDSTONE_BLOCK && inHand.getType() != Material.EMERALD_BLOCK))
{
return;
@ -395,7 +410,7 @@ public class NextBestGameManager implements Listener
if (_partyManager.getPreferencesManager().get(owner).isActive(Preference.COUNTDOWN_ON_CLICK))
{
new CountdownRunnable(party);
_tasks.put(player.getUniqueId(), new CountdownRunnable(owner));
player.getInventory().setItem(INVENTORY_SLOT, CANCEL_ITEM);
} else
{
@ -414,7 +429,7 @@ public class NextBestGameManager implements Listener
if (_partyManager.getPreferencesManager().get(player).isActive(Preference.COUNTDOWN_ON_CLICK))
{
new CountdownRunnable(player);
_tasks.put(player.getUniqueId(), new CountdownRunnable(player));
player.getInventory().setItem(INVENTORY_SLOT, CANCEL_ITEM);
} else
{
@ -628,7 +643,7 @@ public class NextBestGameManager implements Listener
public void cancel(Player player, Party party)
{
CountdownRunnable task = _tasks.get(player.getUniqueId());
CountdownRunnable task = _tasks.remove(player.getUniqueId());
if (task == null)
{