Merge remote-tracking branch 'refs/remotes/origin/develop' into update/moba-cosmetics
This commit is contained in:
commit
2000d8ee12
@ -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;
|
||||
}
|
||||
|
@ -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()
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user