mirror of
https://github.com/BentoBoxWorld/Limits.git
synced 2024-11-22 18:46:02 +01:00
Merge branch 'develop' of https://github.com/BentoBoxWorld/Limits.git into develop
This commit is contained in:
commit
62ce0cebae
@ -1,4 +1,6 @@
|
|||||||
# Limits
|
# Limits
|
||||||
|
[![Build Status](https://ci.codemc.org/buildStatus/icon?job=BentoBoxWorld/Limits)](https://ci.codemc.org/job/BentoBoxWorld/job/Limits/)
|
||||||
|
|
||||||
Add-on for BentoBox to limit island blocks and entities in GameModes like BSkyBlock and AcidIsland. This add-on will work
|
Add-on for BentoBox to limit island blocks and entities in GameModes like BSkyBlock and AcidIsland. This add-on will work
|
||||||
in any game mode world.
|
in any game mode world.
|
||||||
|
|
||||||
|
@ -119,9 +119,8 @@ public class EntityLimitListener implements Listener {
|
|||||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
public void onBlock(HangingPlaceEvent e) {
|
public void onBlock(HangingPlaceEvent e) {
|
||||||
Player player = e.getPlayer();
|
Player player = e.getPlayer();
|
||||||
boolean bypass = player.isOp() || player.hasPermission(addon.getPlugin().getIWM().getPermissionPrefix(e.getEntity().getWorld()) + "mod.bypass");
|
|
||||||
|
|
||||||
addon.getIslands().getIslandAt(e.getEntity().getLocation()).ifPresent(island -> {
|
addon.getIslands().getIslandAt(e.getEntity().getLocation()).ifPresent(island -> {
|
||||||
|
boolean bypass = player.isOp() || player.hasPermission(addon.getPlugin().getIWM().getPermissionPrefix(e.getEntity().getWorld()) + "mod.bypass");
|
||||||
// Check if entity can be hung
|
// Check if entity can be hung
|
||||||
if (!island.isSpawn() && atLimit(island, bypass, e.getEntity())) {
|
if (!island.isSpawn() && atLimit(island, bypass, e.getEntity())) {
|
||||||
// Not allowed
|
// Not allowed
|
||||||
|
Loading…
Reference in New Issue
Block a user