diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 27371dec..7c264dd8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,7 +3,7 @@ image: gradle:alpine variables: name: "FabledSkyBlock" path: "/builds/$CI_PROJECT_PATH" - version: "Build-79" + version: "Build-79.1" before_script: - export GRADLE_USER_HOME=`pwd`/.gradle diff --git a/FabledSkyBlock/Core/src/main/java/com/songoda/skyblock/listeners/Block.java b/FabledSkyBlock/Core/src/main/java/com/songoda/skyblock/listeners/Block.java index be37fedc..74ef049b 100644 --- a/FabledSkyBlock/Core/src/main/java/com/songoda/skyblock/listeners/Block.java +++ b/FabledSkyBlock/Core/src/main/java/com/songoda/skyblock/listeners/Block.java @@ -250,6 +250,9 @@ public class Block implements Listener { if (!configLoad.getBoolean("Island.Block.Level.Enable")) return; + if (event.getBlock().getType() == Materials.END_PORTAL_FRAME.parseMaterial() + && event.getPlayer().getItemInHand().getType() == Materials.ENDER_EYE.parseMaterial()) return; + // Fix a bug in Paper 1.8.8 when using ViaVersion on a 1.12.2 client. // BUG: Player can infinitely increase their level by placing a block at their feet. // It doesn't take the block away but still increments the level. diff --git a/FabledSkyBlock/Core/src/main/java/com/songoda/skyblock/listeners/Interact.java b/FabledSkyBlock/Core/src/main/java/com/songoda/skyblock/listeners/Interact.java index 3bf65e92..fd4381c0 100644 --- a/FabledSkyBlock/Core/src/main/java/com/songoda/skyblock/listeners/Interact.java +++ b/FabledSkyBlock/Core/src/main/java/com/songoda/skyblock/listeners/Interact.java @@ -44,7 +44,6 @@ import org.bukkit.inventory.InventoryHolder; import org.bukkit.inventory.ItemStack; import java.io.File; -import java.util.Set; public class Interact implements Listener { @@ -514,6 +513,7 @@ public class Interact implements Listener { } ItemStack is = event.getPlayer().getItemInHand(); + boolean hasEye = ((block.getData() >> 2) & 1) == 1; if (is == null || is.getType() == Material.AIR) { if (stackableManager != null && stackableManager.isStacked(block.getLocation())) { @@ -528,6 +528,7 @@ public class Interact implements Listener { } player.getInventory().addItem(new ItemStack(Materials.END_PORTAL_FRAME.parseMaterial(), 1)); + if (hasEye) player.getInventory().addItem(new ItemStack(Materials.ENDER_EYE.parseMaterial(), 1)); player.updateInventory(); FileManager.Config config = skyblock.getFileManager().getConfig(new File(skyblock.getDataFolder(), "config.yml")); diff --git a/FabledSkyBlock/Core/src/main/java/com/songoda/skyblock/listeners/Portal.java b/FabledSkyBlock/Core/src/main/java/com/songoda/skyblock/listeners/Portal.java index ce76b623..1c0df2d7 100644 --- a/FabledSkyBlock/Core/src/main/java/com/songoda/skyblock/listeners/Portal.java +++ b/FabledSkyBlock/Core/src/main/java/com/songoda/skyblock/listeners/Portal.java @@ -122,7 +122,7 @@ public class Portal implements Listener { } else if (System.currentTimeMillis() - tick.getLast() >= 1000) { tick.setLast(System.currentTimeMillis()); } - if (tick.getTick() >= 300) { + if (tick.getTick() >= 100) { messageManager.sendMessage(player, fileManager.getConfig(new File(skyblock.getDataFolder(), "language.yml")).getFileConfiguration() .getString("Island.Portal.Stuck.Message"));