Merge branch 'Myst_HALLOWEEN'
This commit is contained in:
commit
577c67cacd
@ -77,7 +77,7 @@ public class VoteButton implements GuiItem, Listener {
|
||||
new JsonMessage(" " + C.Bold + "Click to Open in Web Browser").click(ClickEvent.OPEN_URL, _url).sendToPlayer(getPlayer());
|
||||
new JsonMessage( " " + C.cGreen + C.Line + _url).click(ClickEvent.OPEN_URL, _url).sendToPlayer(getPlayer());
|
||||
UtilPlayer.message(getPlayer(), "");
|
||||
UtilPlayer.message(getPlayer(), "Please be patient. Votes may take a few minutes to register.");
|
||||
UtilPlayer.message(getPlayer(), " Please be patient. Votes may take a few minutes to register.");
|
||||
UtilPlayer.message(getPlayer(), "");
|
||||
UtilPlayer.message(getPlayer(), C.cGold + C.Bold + C.Strike + "=============================================");
|
||||
|
||||
|
@ -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()))
|
||||
{
|
||||
|
@ -110,9 +110,11 @@ public class PerkHammerThrow extends Perk implements IThrown
|
||||
{
|
||||
Item item = itemIterator.next();
|
||||
|
||||
if (item.getTicksLived() > 200 || !item.isValid())
|
||||
if (item == null || item.getTicksLived() > 200 || !item.isValid() || item.isDead())
|
||||
{
|
||||
if (item != null)
|
||||
item.remove();
|
||||
|
||||
itemIterator.remove();
|
||||
|
||||
Player player = _thrown.get(item);
|
||||
@ -120,9 +122,6 @@ public class PerkHammerThrow extends Perk implements IThrown
|
||||
if (!Manager.IsAlive(player))
|
||||
continue;
|
||||
|
||||
if (UtilPlayer.isSpectator(player))
|
||||
continue;
|
||||
|
||||
_thrown.get(item).getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.DIAMOND_AXE, (byte)0, 1, F.item("Thor Hammer")));
|
||||
}
|
||||
}
|
||||
|
@ -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