mirror of
https://github.com/amalthea-mc/ShopChest.git
synced 2024-11-08 19:51:05 +00:00
Fixed error when extending shop in unowned ASkyBlock island
This commit is contained in:
parent
36ea51b593
commit
0e1fc781f5
@ -202,9 +202,13 @@ public class ChestProtectListener implements Listener {
|
||||
if (externalPluginsAllowed && plugin.hasASkyBlock() && config.enable_askyblock_integration) {
|
||||
Island island = ASkyBlockAPI.getInstance().getIslandAt(b.getLocation());
|
||||
if (island != null) {
|
||||
if (island.getOwner() == null) {
|
||||
externalPluginsAllowed = island.getMembers().contains(p.getUniqueId());
|
||||
} else {
|
||||
externalPluginsAllowed = island.getMembers().contains(p.getUniqueId()) || island.getOwner().equals(p.getUniqueId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (externalPluginsAllowed && plugin.hasIslandWorld() && config.enable_islandworld_integration && IslandWorldApi.isInitialized()) {
|
||||
if (b.getWorld().getName().equals(IslandWorldApi.getIslandWorld().getName())) {
|
||||
|
Loading…
Reference in New Issue
Block a user