mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-26 12:16:30 +01:00
Fixed npe in restricted blocks
This commit is contained in:
parent
a67808188f
commit
5b4601198f
@ -246,7 +246,8 @@ public class Block implements Listener {
|
||||
IslandWorld world = worldManager.getIslandWorld(block.getWorld());
|
||||
|
||||
if(!player.hasPermission("fabledskyblock.bypass.netherplace") && !islandManager.isIslandWorldUnlocked(island, IslandWorld.Nether)){
|
||||
for(String s : Objects.requireNonNull(configLoad.getConfigurationSection("Island.Restrict.NetherBlocks")).getKeys(false)){
|
||||
if(configLoad.getConfigurationSection("Island.Restrict.NetherBlocks") != null) {
|
||||
for(String s : configLoad.getConfigurationSection("Island.Restrict.NetherBlocks").getKeys(false)){
|
||||
if(s.equalsIgnoreCase(block.getType().toString())){
|
||||
if(configLoad.getBoolean("Island.Restrict.NetherBlocks." + s, false)){
|
||||
plugin.getMessageManager().sendMessage(player, Objects.requireNonNull(plugin.getFileManager().getConfig(new File(plugin.getDataFolder(), "language.yml"))
|
||||
@ -256,9 +257,11 @@ public class Block implements Listener {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!player.hasPermission("fabledskyblock.bypass.endplace") && !islandManager.isIslandWorldUnlocked(island, IslandWorld.End)){
|
||||
for(String s : Objects.requireNonNull(configLoad.getConfigurationSection("Island.Restrict.EndBlocks")).getKeys(false)){
|
||||
if(configLoad.getConfigurationSection("Island.Restrict.EndBlocks") != null) {
|
||||
for(String s : configLoad.getConfigurationSection("Island.Restrict.EndBlocks").getKeys(false)){
|
||||
if(s.equalsIgnoreCase(block.getType().toString())){
|
||||
if(configLoad.getBoolean("Island.Restrict.EndBlocks." + s)){
|
||||
plugin.getMessageManager().sendMessage(player, Objects.requireNonNull(plugin.getFileManager().getConfig(new File(plugin.getDataFolder(), "language.yml"))
|
||||
@ -268,6 +271,7 @@ public class Block implements Listener {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (configLoad.getBoolean("Island.WorldBorder.Block") && block.getType() == Material.DISPENSER) {
|
||||
if (!islandManager.isLocationAtIsland(island, blockLoc, world)) {
|
||||
|
Loading…
Reference in New Issue
Block a user