mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Fix dupe bug
This commit is contained in:
parent
1408065768
commit
bec54d93ac
@ -1,6 +1,10 @@
|
|||||||
Version 2.1.167
|
Version 2.1.167
|
||||||
Add McMMOPlayerPreXpGainEvent event for plugins to modify given exp
|
Fixed a serious dupe bug
|
||||||
Add SkillActivationPerkEvent
|
Add McMMOPlayerPreXpGainEvent event for plugins to modify given exp (thanks electronicboy)
|
||||||
|
Add SkillActivationPerkEvent (thanks electronicboy)
|
||||||
|
|
||||||
|
NOTE:
|
||||||
|
This bug was introduced in 2.1.165, update immediately if you are on 2.1.165 or 2.1.166
|
||||||
|
|
||||||
|
|
||||||
Version 2.1.166
|
Version 2.1.166
|
||||||
|
@ -645,7 +645,10 @@ public class EntityListener implements Listener {
|
|||||||
@EventHandler(ignoreCancelled = true)
|
@EventHandler(ignoreCancelled = true)
|
||||||
public void onEntityDeath(EntityDeathEvent event) {
|
public void onEntityDeath(EntityDeathEvent event) {
|
||||||
LivingEntity entity = event.getEntity();
|
LivingEntity entity = event.getEntity();
|
||||||
|
|
||||||
|
if(mcMMO.getTransientEntityTracker().isTransientSummon(entity)) {
|
||||||
mcMMO.getTransientEntityTracker().removeSummon(entity, null, false);
|
mcMMO.getTransientEntityTracker().removeSummon(entity, null, false);
|
||||||
|
}
|
||||||
|
|
||||||
/* WORLD BLACKLIST CHECK */
|
/* WORLD BLACKLIST CHECK */
|
||||||
if(WorldBlacklist.isWorldBlacklisted(event.getEntity().getWorld())) {
|
if(WorldBlacklist.isWorldBlacklisted(event.getEntity().getWorld())) {
|
||||||
|
@ -124,6 +124,16 @@ public class TransientEntityTracker {
|
|||||||
addToChunkLookupCache(trackedTamingEntity);
|
addToChunkLookupCache(trackedTamingEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if a living entity is a summon
|
||||||
|
*
|
||||||
|
* @param livingEntity target livinig entity
|
||||||
|
* @return true if target living entity is a summon
|
||||||
|
*/
|
||||||
|
public synchronized boolean isTransientSummon(@NotNull LivingEntity livingEntity) {
|
||||||
|
return getChunkLookupCache().contains(livingEntity);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the tracked taming entities for a player
|
* Get the tracked taming entities for a player
|
||||||
* If the player isn't registered this will return null
|
* If the player isn't registered this will return null
|
||||||
|
Loading…
Reference in New Issue
Block a user