Jelajahi Sumber

fixed skyblock earth hook

MasterCake 5 tahun lalu
induk
melakukan
849d23e048

+ 1 - 1
src/main/resources/plugin.yml

@@ -2,7 +2,7 @@ name: CustomOreGen
 version: ${project.version}
 description: Controls the Ore-Generator
 author: Linus122
-softdepend: [PlaceholderAPI, ASkyBlock, AcidIsland, uSkyBlock, SkyBlock, BentoBox, IslandWorld, SuperiorSkyblock2]
+softdepend: [PlaceholderAPI, ASkyBlock, AcidIsland, uSkyBlock, SkyBlock, BentoBox, IslandWorld, SuperiorSkyblock2, FabledSkyBlock]
 main: xyz.spaceio.customoregen.CustomOreGen
 api-version: 1.13
 commands:

+ 0 - 15
src/xyz/spaceio/customoregen/CustomOreGen.java

@@ -1,22 +1,16 @@
 package xyz.spaceio.customoregen;
 
-import java.io.File;
-import java.io.FileOutputStream;
 import java.io.IOException;
-import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Optional;
-import java.util.Set;
 import java.util.UUID;
 import java.util.stream.Collectors;
 
 import org.bukkit.Bukkit;
 import org.bukkit.Location;
-import org.bukkit.Material;
 import org.bukkit.OfflinePlayer;
 import org.bukkit.World;
 import org.bukkit.command.ConsoleCommandSender;
@@ -29,18 +23,9 @@ import com.google.gson.reflect.TypeToken;
 import de.Linus122.SpaceIOMetrics.Metrics;
 import xyz.spaceio.configutils.ConfigHandler;
 import xyz.spaceio.configutils.JSONConfig;
-import xyz.spaceio.hooks.HookASkyBlock;
-import xyz.spaceio.hooks.HookAcidIsland;
-import xyz.spaceio.hooks.HookBentoBox;
 import xyz.spaceio.hooks.HookInfo;
-import xyz.spaceio.hooks.HookIslandWorld;
-import xyz.spaceio.hooks.HookPlotSquared;
-import xyz.spaceio.hooks.HookSkyblockEarth;
-import xyz.spaceio.hooks.HookSpaceSkyblock;
-import xyz.spaceio.hooks.HookSuperiorSkyblock;
 import xyz.spaceio.hooks.SkyblockAPIHook;
 import xyz.spaceio.misc.NamePlaceholder;
-import xyz.spaceio.hooks.HookuSkyBlock;
 
 public class CustomOreGen extends JavaPlugin {
 

+ 4 - 4
src/xyz/spaceio/hooks/HookFabledSkyblock.java

@@ -7,8 +7,8 @@ import org.bukkit.Bukkit;
 import org.bukkit.Location;
 import org.bukkit.OfflinePlayer;
 
-import me.goodandevil.skyblock.SkyBlock;
-import me.goodandevil.skyblock.island.Island;
+import com.songoda.skyblock.SkyBlock;
+import com.songoda.skyblock.island.Island;
 
 
 public class HookFabledSkyblock implements SkyblockAPIHook{
@@ -29,7 +29,7 @@ public class HookFabledSkyblock implements SkyblockAPIHook{
 			if(api.getIslandManager().getIsland(skyblockPlayer) != null) {
 				Island is =  api.getIslandManager().getIsland(skyblockPlayer);
 				if(is.getLevel() != null) {
-					return is.getLevel().getLevel();
+					return (int) is.getLevel().getLevel();
 				}
 			}
 		}
@@ -54,7 +54,7 @@ public class HookFabledSkyblock implements SkyblockAPIHook{
 	public String[] getSkyBlockWorldNames() {
 		if(api.getWorldManager() != null) {
 			// a method for getting the islands is missing, so using what we have
-			return Bukkit.getWorlds().stream().filter(w -> api.getWorldManager().isIslandWorld(w)).toArray(String[]::new);
+			return Bukkit.getWorlds().stream().filter(w -> api.getWorldManager().isIslandWorld(w)).map(w -> w.getName()).toArray(String[]::new);
 		}
 		return null;
 	}