mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2025-01-09 17:27:37 +01:00
Fixed portals & end portal frames
This commit is contained in:
parent
e5a7d41212
commit
f16b63792e
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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"));
|
||||
|
@ -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"));
|
||||
|
Loading…
Reference in New Issue
Block a user