diff --git a/pom.xml b/pom.xml
index 146b0b1d..7f8e3f82 100644
--- a/pom.xml
+++ b/pom.xml
@@ -159,7 +159,7 @@
org.spigotmc
- spigot
+ spigot-api
1.20.1-R0.1-SNAPSHOT
provided
@@ -199,6 +199,27 @@
provided
+
+ com.mojang
+ authlib
+ 3.16.29
+ provided
+
+
+
+ io.netty
+ netty-all
+ 4.1.107.Final
+ provided
+
+
+
+ commons-lang
+ commons-lang
+ 2.6
+ compile
+
+
com.eatthepath
fast-uuid
diff --git a/src/main/java/com/craftaro/skyblock/island/Island.java b/src/main/java/com/craftaro/skyblock/island/Island.java
index 9b1c0edd..3907cdd1 100644
--- a/src/main/java/com/craftaro/skyblock/island/Island.java
+++ b/src/main/java/com/craftaro/skyblock/island/Island.java
@@ -113,7 +113,7 @@ public class Island {
this.level = new IslandLevel(getOwnerUUID(), this.plugin);
- File configFile = new File(this.plugin.getDataFolder().toString() + "/island-data");
+ File configFile = new File(this.plugin.getDataFolder() + "/island-data");
Config config = fileManager.getConfig(new File(configFile, this.ownerUUID + ".yml"));
@@ -191,7 +191,7 @@ public class Island {
Config settingsDataConfig = null;
- File settingDataFile = new File(this.plugin.getDataFolder().toString() + "/setting-data", getOwnerUUID().toString() + ".yml");
+ File settingDataFile = new File(this.plugin.getDataFolder() + "/setting-data", getOwnerUUID().toString() + ".yml");
if (fileManager.isFileExist(settingDataFile)) {
settingsDataConfig = fileManager.getConfig(settingDataFile);
@@ -203,13 +203,13 @@ public class Island {
for (BasicPermission permission : allPermissions) {
if (settingsDataConfig == null || settingsDataConfig.getFileConfiguration()
- .getString("Settings." + roleList.getFriendlyName() + "." + permission.getName()) == null) {
+ .getString("Settings." + roleList.getFriendlyName().toUpperCase() + "." + permission.getName()) == null) {
permissions.add(
new IslandPermission(permission, this.plugin.getSettings()
- .getBoolean("Settings." + roleList.getFriendlyName() + "." + permission.getName(), true)));
+ .getBoolean("Settings." + roleList.getFriendlyName().toUpperCase() + "." + permission.getName(), true)));
} else {
permissions.add(new IslandPermission(permission, settingsDataConfig.getFileConfiguration()
- .getBoolean("Settings." + roleList.getFriendlyName() + "." + permission.getName(), true)));
+ .getBoolean("Settings." + roleList.getFriendlyName().toUpperCase() + "." + permission.getName(), true)));
}
}
diff --git a/src/main/java/com/craftaro/skyblock/island/IslandManager.java b/src/main/java/com/craftaro/skyblock/island/IslandManager.java
index 363f00eb..9348830b 100644
--- a/src/main/java/com/craftaro/skyblock/island/IslandManager.java
+++ b/src/main/java/com/craftaro/skyblock/island/IslandManager.java
@@ -1530,9 +1530,7 @@ public class IslandManager {
public void updateFlight(Player player) {
// The player can fly in other worlds if they are in creative or have another
// plugin's fly permission.
- if (player.getGameMode() == GameMode.CREATIVE || player.getGameMode() == GameMode.SPECTATOR || player.hasPermission("essentials.fly") || player.hasPermission("cmi.command.fly")) {
- return;
- }
+
// Residence support
if (Bukkit.getServer().getPluginManager().getPlugin("Residence") != null) {
@@ -1562,7 +1560,7 @@ public class IslandManager {
boolean hasGlobalFlyPermission = player.hasPermission("fabledskyblock.*") || player.hasPermission("fabledskyblock.fly.*");
boolean hasOwnIslandFlyPermission = player.hasPermission("fabledskyblock.fly") && island.getRole(player) != null && island.getRole(player) != IslandRole.VISITOR;
- if (hasGlobalFlyPermission || hasOwnIslandFlyPermission) {
+ if (hasGlobalFlyPermission || hasOwnIslandFlyPermission || player.getGameMode() == GameMode.CREATIVE || player.getGameMode() == GameMode.SPECTATOR || player.hasPermission("essentials.fly") || player.hasPermission("cmi.command.fly")) {
WorldManager worldManager = this.plugin.getWorldManager();
boolean canFlyInWorld = worldManager.isIslandWorld(player.getWorld());
Bukkit.getServer().getScheduler().runTask(this.plugin, () -> player.setAllowFlight(canFlyInWorld));