mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-04-04 10:46:23 +02:00
Changes due to updates to EntityType returned by certain Entity events.
This commit is contained in:
parent
cea80f98e8
commit
0c1072f7cf
@ -147,7 +147,7 @@ public class mcEntityListener implements Listener
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onEntityDeath(EntityDeathEvent event)
|
public void onEntityDeath(EntityDeathEvent event)
|
||||||
{
|
{
|
||||||
Entity x = event.getEntity();
|
LivingEntity x = event.getEntity();
|
||||||
x.setFireTicks(0);
|
x.setFireTicks(0);
|
||||||
|
|
||||||
//Remove mob from mob spawner list
|
//Remove mob from mob spawner list
|
||||||
@ -157,16 +157,13 @@ public class mcEntityListener implements Listener
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Remove bleed track
|
//Remove bleed track
|
||||||
if(plugin.misc.bleedTracker.contains((LivingEntity)x))
|
if(plugin.misc.bleedTracker.contains(x))
|
||||||
plugin.misc.addToBleedRemovalQue((LivingEntity)x);
|
plugin.misc.addToBleedRemovalQue(x);
|
||||||
|
|
||||||
Archery.arrowRetrievalCheck(x, plugin);
|
Archery.arrowRetrievalCheck(x, plugin);
|
||||||
|
|
||||||
if(x instanceof Player){
|
if(x instanceof Player)
|
||||||
Player player = (Player)x;
|
Users.getProfile((Player)x).setBleedTicks(0);
|
||||||
Users.getProfile(player).setBleedTicks(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
@ -175,9 +172,7 @@ public class mcEntityListener implements Listener
|
|||||||
SpawnReason reason = event.getSpawnReason();
|
SpawnReason reason = event.getSpawnReason();
|
||||||
|
|
||||||
if(reason == SpawnReason.SPAWNER && !LoadProperties.xpGainsMobSpawners)
|
if(reason == SpawnReason.SPAWNER && !LoadProperties.xpGainsMobSpawners)
|
||||||
{
|
|
||||||
plugin.misc.mobSpawnerList.add(event.getEntity().getEntityId());
|
plugin.misc.mobSpawnerList.add(event.getEntity().getEntityId());
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler (priority = EventPriority.LOW)
|
@EventHandler (priority = EventPriority.LOW)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user