sponge: Fix unlock drops being triggered on non-death drops.

This commit is contained in:
bloodshot 2020-12-02 02:13:32 -05:00
parent bdcfc6b76c
commit 0192a2daf5
1 changed files with 4 additions and 0 deletions

View File

@ -542,6 +542,10 @@ public class PlayerEventHandler {
@Listener(order = Order.FIRST, beforeModifications = true)
public void onPlayerDeathDropItem(DropItemEvent.Destruct event, @First Player player) {
if (player.get(Keys.HEALTH).get() > 0) {
return;
}
final GDClaim claim = this.dataStore.getClaimAt(player.getLocation());
final GDPlayerData playerData = this.dataStore.getOrCreatePlayerData(player.getWorld(), player.getUniqueId());
if (GDOptions.PLAYER_ITEM_DROP_LOCK || GDOptions.PVP_ITEM_DROP_LOCK) {