Fix error when interacting with entities in <1.17 versions

This commit is contained in:
SydMontague 2021-08-13 15:51:22 +02:00
parent b1216b016f
commit 67ed74b006
2 changed files with 3 additions and 2 deletions

View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>net.craftcitizen</groupId>
<artifactId>imagemaps</artifactId>
<version>1.0.9</version>
<version>1.0.10</version>
<name>ImageMaps</name>
<description>Render Images onto maps!</description>

View File

@ -102,7 +102,8 @@ public class ImageMaps extends JavaPlugin implements Listener {
if (!isInvisibilitySupported())
return;
if (event.getRightClicked().getType() != EntityType.ITEM_FRAME && event.getRightClicked().getType() != EntityType.GLOW_ITEM_FRAME)
if (event.getRightClicked().getType() != EntityType.ITEM_FRAME &&
(!isGlowingSupported() || event.getRightClicked().getType() != EntityType.GLOW_ITEM_FRAME))
return;
ItemFrame frame = (ItemFrame) event.getRightClicked();