Fixed two things.
This commit is contained in:
parent
1c52bd4f64
commit
f0e0d41c42
@ -358,7 +358,7 @@ public class Draw extends SoloGame
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (_drawers.HasPlayer(event.getPlayer()))
|
||||
else
|
||||
{
|
||||
if (event.getMessage().toLowerCase().contains(_round.Word.toLowerCase()))
|
||||
{
|
||||
|
@ -3,6 +3,7 @@ package nautilus.game.arcade.kit.perks;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Entity;
|
||||
@ -39,6 +40,8 @@ public class PerkHorsePet extends Perk
|
||||
{
|
||||
C.cGray + "You have a loyal horse companion.",
|
||||
});
|
||||
|
||||
Bukkit.getPluginManager().registerEvents(this, Manager.getPlugin());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -81,6 +84,9 @@ public class PerkHorsePet extends Perk
|
||||
if (event.getType() != UpdateType.SEC)
|
||||
return;
|
||||
|
||||
if (!Manager.GetGame().IsLive())
|
||||
return;
|
||||
|
||||
//Respawn
|
||||
Iterator<Player> respawnIterator = _deathTime.keySet().iterator();
|
||||
while (respawnIterator.hasNext())
|
||||
@ -142,6 +148,9 @@ public class PerkHorsePet extends Perk
|
||||
@EventHandler
|
||||
public void heal(UpdateEvent event)
|
||||
{
|
||||
if (!Manager.GetGame().IsLive())
|
||||
return;
|
||||
|
||||
if (event.getType() != UpdateType.SLOW)
|
||||
return;
|
||||
|
||||
@ -155,6 +164,9 @@ public class PerkHorsePet extends Perk
|
||||
@EventHandler
|
||||
public void death(PlayerDeathEvent event)
|
||||
{
|
||||
if (!Manager.GetGame().IsLive())
|
||||
return;
|
||||
|
||||
Horse horse = _horseMap.remove(event.getEntity());
|
||||
|
||||
if (horse == null)
|
||||
@ -166,6 +178,9 @@ public class PerkHorsePet extends Perk
|
||||
@EventHandler
|
||||
public void damageRider(CustomDamageEvent event)
|
||||
{
|
||||
if (!Manager.GetGame().IsLive())
|
||||
return;
|
||||
|
||||
if (!(event.GetDamageeEntity() instanceof Horse))
|
||||
return;
|
||||
|
||||
@ -200,7 +215,6 @@ public class PerkHorsePet extends Perk
|
||||
if (!Manager.GetGame().IsLive())
|
||||
{
|
||||
event.setCancelled(true);
|
||||
event.getPlayer().teleport(event.getPlayer().getLocation());
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user