From d0af768a91fdf179138ca1fda3f3c9c34429c201 Mon Sep 17 00:00:00 2001 From: Grzegorz Duraj <39887909+xGlenor@users.noreply.github.com> Date: Wed, 21 Jul 2021 16:08:49 +0200 Subject: [PATCH] Update PSEntityListener (Protection against damage to the item in the frame) (#127) * Update PSEntityListener (Protection against damage to the item in the frame) #124 Co-authored-by: xtomyserrax --- pom.xml | 2 +- .../Phaed/PreciousStones/listeners/PSEntityListener.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 1caf7258..0392dd01 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ net.sacredlabyrinth.Phaed PreciousStones - 1.17.1.1 + 1.17.1.2 PreciousStones https://github.com/elBukkit/PreciousStones diff --git a/src/main/java/net/sacredlabyrinth/Phaed/PreciousStones/listeners/PSEntityListener.java b/src/main/java/net/sacredlabyrinth/Phaed/PreciousStones/listeners/PSEntityListener.java index c72ecf4f..6fb09225 100644 --- a/src/main/java/net/sacredlabyrinth/Phaed/PreciousStones/listeners/PSEntityListener.java +++ b/src/main/java/net/sacredlabyrinth/Phaed/PreciousStones/listeners/PSEntityListener.java @@ -457,7 +457,7 @@ public void onEntityDamage(EntityDamageEvent event) { return; } - if (event.getEntity().getType().equals(EntityType.ITEM_FRAME)) { + if (event.getEntity().getType().equals(EntityType.ITEM_FRAME) || event.getEntity().getType().equals(EntityType.GLOW_ITEM_FRAME)) { Player player = Helper.getDamagingPlayer(event); if (player != null && !plugin.getPermissionsManager().has(player, "preciousstones.bypass.item-frame-take")) {