mirror of
https://github.com/songoda/UltimateStacker.git
synced 2024-11-23 10:35:22 +01:00
Fix Jobs hook [SD-9268]
Add jobs exp before removing entity stack
This commit is contained in:
parent
73b102619c
commit
5b62328bf2
@ -1,5 +1,6 @@
|
||||
package com.songoda.ultimatestacker.stackable.entity;
|
||||
|
||||
import com.google.common.base.Throwables;
|
||||
import com.songoda.core.compatibility.ServerVersion;
|
||||
import com.songoda.core.lootables.loot.Drop;
|
||||
import com.songoda.core.lootables.loot.DropUtils;
|
||||
@ -94,7 +95,6 @@ public class EntityStack extends ColdEntityStack {
|
||||
}
|
||||
|
||||
private void handleWholeStackDeath(LivingEntity killed, List<Drop> drops, boolean custom, int droppedExp, EntityDeathEvent event) {
|
||||
plugin.getEntityStackManager().removeStack(event.getEntity());
|
||||
plugin.getDataManager().deleteHost(this);
|
||||
|
||||
List<Drop> preStackedDrops = new ArrayList<>();
|
||||
@ -124,6 +124,7 @@ public class EntityStack extends ColdEntityStack {
|
||||
|
||||
if (killed.getKiller() == null) return;
|
||||
plugin.addExp(killed.getKiller(), this);
|
||||
plugin.getEntityStackManager().removeStack(event.getEntity());
|
||||
}
|
||||
|
||||
private void handleSingleStackDeath(LivingEntity killed, List<Drop> drops, int droppedExp, EntityDeathEvent event) {
|
||||
|
Loading…
Reference in New Issue
Block a user