From d75c5d710a3de8d1ee9ad19bc18922da9d841b5e Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 30 Aug 2018 12:00:07 +0100 Subject: [PATCH] Added filter for the end to the beacon code --- .../java/com/sekwah/advancedportals/compat/CraftBukkit.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sekwah/advancedportals/compat/CraftBukkit.java b/src/main/java/com/sekwah/advancedportals/compat/CraftBukkit.java index d0b9040..64fba32 100644 --- a/src/main/java/com/sekwah/advancedportals/compat/CraftBukkit.java +++ b/src/main/java/com/sekwah/advancedportals/compat/CraftBukkit.java @@ -1,6 +1,7 @@ package com.sekwah.advancedportals.compat; import com.sekwah.advancedportals.AdvancedPortalsPlugin; +import org.bukkit.World; import org.bukkit.block.Block; import org.bukkit.entity.Player; @@ -144,7 +145,8 @@ public class CraftBukkit { * @param block */ public void setGatewayAgeHigh(Block block) { - if(this.endGatewayClass.isAssignableFrom(block.getState().getClass())) { + if(block.getWorld().getEnvironment() != World.Environment.THE_END && + this.endGatewayClass.isAssignableFrom(block.getState().getClass())) { try { Object tileEntity = this.getTileEntityMethod.invoke(this.getWorldHandleMethod.invoke(block.getWorld()), this.blockPositionConstructor.newInstance(block.getX(), block.getY(), block.getZ()));