Fixed Telekinesis performance (finally)

This commit is contained in:
Auxilor 2020-12-19 18:15:40 +00:00
parent 420a7ea322
commit 316c16030d
2 changed files with 2 additions and 3 deletions

View File

@ -59,8 +59,6 @@ public class Telekinesis extends EcoEnchant {
.addItems(drops) .addItems(drops)
.forceTelekinesis() .forceTelekinesis()
.push(); .push();
player.updateInventory();
} }
// For exp drops, blockdropitemevent doesn't cover xp // For exp drops, blockdropitemevent doesn't cover xp

View File

@ -33,7 +33,8 @@ public class FastCollatedDropQueue extends InternalDropQueue {
@Override @Override
public void push() { public void push() {
CollatedDrops collatedDrops = COLLATED_MAP.containsKey(player) ? COLLATED_MAP.get(player).addDrops(items).setLocation(loc) : new CollatedDrops(items, loc, xp); CollatedDrops fetched = COLLATED_MAP.get(player);
CollatedDrops collatedDrops = fetched == null ? new CollatedDrops(items, loc, xp) : fetched.addDrops(items).setLocation(loc);
COLLATED_MAP.put(player, collatedDrops); COLLATED_MAP.put(player, collatedDrops);
} }