mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Fix dupe bug
This commit is contained in:
parent
1408065768
commit
bec54d93ac
@ -1,6 +1,10 @@
|
||||
Version 2.1.167
|
||||
Add McMMOPlayerPreXpGainEvent event for plugins to modify given exp
|
||||
Add SkillActivationPerkEvent
|
||||
Fixed a serious dupe bug
|
||||
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
|
||||
|
@ -645,7 +645,10 @@ public class EntityListener implements Listener {
|
||||
@EventHandler(ignoreCancelled = true)
|
||||
public void onEntityDeath(EntityDeathEvent event) {
|
||||
LivingEntity entity = event.getEntity();
|
||||
mcMMO.getTransientEntityTracker().removeSummon(entity, null, false);
|
||||
|
||||
if(mcMMO.getTransientEntityTracker().isTransientSummon(entity)) {
|
||||
mcMMO.getTransientEntityTracker().removeSummon(entity, null, false);
|
||||
}
|
||||
|
||||
/* WORLD BLACKLIST CHECK */
|
||||
if(WorldBlacklist.isWorldBlacklisted(event.getEntity().getWorld())) {
|
||||
|
@ -124,6 +124,16 @@ public class TransientEntityTracker {
|
||||
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
|
||||
* If the player isn't registered this will return null
|
||||
|
Loading…
Reference in New Issue
Block a user