Fixed portals & end portal frames

This commit is contained in:
Lilac 2019-09-09 22:07:44 +01:00
parent e5a7d41212
commit f16b63792e
4 changed files with 7 additions and 3 deletions

View File

@ -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

View File

@ -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.

View File

@ -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"));

View File

@ -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"));