mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-03-01 15:51:03 +01:00
Disable death drop now schedules the items to be given back 10 ticks later.
This commit is contained in:
parent
45d98f8682
commit
7421089678
@ -3,6 +3,7 @@ package net.Indyuce.mmoitems.listener;
|
|||||||
import io.lumine.mythic.lib.MythicLib;
|
import io.lumine.mythic.lib.MythicLib;
|
||||||
import io.lumine.mythic.lib.api.DamageType;
|
import io.lumine.mythic.lib.api.DamageType;
|
||||||
import io.lumine.mythic.lib.api.item.NBTItem;
|
import io.lumine.mythic.lib.api.item.NBTItem;
|
||||||
|
import io.lumine.mythic.utils.Schedulers;
|
||||||
import net.Indyuce.mmoitems.MMOItems;
|
import net.Indyuce.mmoitems.MMOItems;
|
||||||
import net.Indyuce.mmoitems.MMOUtils;
|
import net.Indyuce.mmoitems.MMOUtils;
|
||||||
import net.Indyuce.mmoitems.api.ItemAttackResult;
|
import net.Indyuce.mmoitems.api.ItemAttackResult;
|
||||||
@ -123,8 +124,10 @@ public class PlayerListener implements Listener {
|
|||||||
SoulboundInfo.read(player);
|
SoulboundInfo.read(player);
|
||||||
|
|
||||||
if (deathItems.containsKey(player)) {
|
if (deathItems.containsKey(player)) {
|
||||||
player.getInventory().addItem(deathItems.get(player).toArray(new ItemStack[0]));
|
Schedulers.sync().runLater( () -> {
|
||||||
deathItems.remove(player);
|
player.getInventory().addItem(deathItems.get(player).toArray(new ItemStack[0]));
|
||||||
|
deathItems.remove(player);
|
||||||
|
}, 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user