Merge remote-tracking branch 'refs/remotes/origin/develop' into update/moba-cosmetics

This commit is contained in:
Sam 2017-08-11 14:10:29 +01:00
commit 2000d8ee12
4 changed files with 12 additions and 3 deletions

View File

@ -66,7 +66,7 @@ public class CastleSiegeHorseManager implements Listener
@EventHandler
public void horseInteract(PlayerInteractEntityEvent event)
{
if (!(event.getRightClicked() instanceof Horse))
if (!(event.getRightClicked() instanceof Horse) || !_host.IsLive())
{
return;
}

View File

@ -22,6 +22,7 @@ import org.bukkit.event.Listener;
import org.bukkit.event.entity.ItemSpawnEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerPickupItemEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
@ -371,6 +372,12 @@ public class CastleSiegeNew extends TeamGame
}
}
@EventHandler
public void playerQuit(PlayerQuitEvent event)
{
_wolves.remove(event.getPlayer());
}
@Override
public void EndCheck()
{

View File

@ -114,7 +114,7 @@ public class GamePlayerManager implements Listener
if (kit instanceof ProgressingKit)
{
ProgressingKit progressingKit = (ProgressingKit) kit;
if (progressingKit.isDefault(player.getUniqueId()))
if (progressingKit.canEquipKit(player) && progressingKit.isDefault(player.getUniqueId()))
{
progressingKit.onSelected(player.getUniqueId());
return;

View File

@ -302,13 +302,15 @@ public class ProgressingKitManager implements Listener
{
UtilServer.getPlayersCollection().forEach(player ->
{
UUID id = player.getUniqueId();
for (Kit kit : _manager.GetGame().GetKits())
{
//Set default kit
if (kit instanceof ProgressingKit)
{
ProgressingKit progressingKit = (ProgressingKit) kit;
if (progressingKit.isDefault(player.getUniqueId()))
if (progressingKit.canEquipKit(player) && progressingKit.isDefault(id))
{
progressingKit.onSelected(player.getUniqueId());
break;