diff --git a/src/main/java/me/goodandevil/skyblock/SkyBlock.java b/src/main/java/me/goodandevil/skyblock/SkyBlock.java index abbbcf51..1029658a 100644 --- a/src/main/java/me/goodandevil/skyblock/SkyBlock.java +++ b/src/main/java/me/goodandevil/skyblock/SkyBlock.java @@ -2,6 +2,10 @@ package me.goodandevil.skyblock; import java.io.File; +import me.goodandevil.skyblock.command.commands.SkyBlockCommand; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.command.ConsoleCommandSender; import org.bukkit.event.HandlerList; import org.bukkit.generator.ChunkGenerator; import org.bukkit.plugin.PluginManager; @@ -85,6 +89,12 @@ public class SkyBlock extends JavaPlugin { @Override public void onEnable() { + ConsoleCommandSender console = Bukkit.getConsoleSender(); + console.sendMessage(formatText("&a=============================")); + console.sendMessage(formatText("&7FabledSkyBlock " + this.getDescription().getVersion() + " by &5Songoda <3&7!")); + console.sendMessage(formatText("&7Action: &aEnabling&7...")); + console.sendMessage(formatText("&a=============================")); + instance = this; fileManager = new FileManager(this); @@ -151,11 +161,19 @@ public class SkyBlock extends JavaPlugin { pluginManager.registerEvents(new Generator(), this); pluginManager.registerEvents(new Creator(), this); + this.getCommand("skyblock").setExecutor(new SkyBlockCommand()); + SkyBlockAPI.setImplementation(instance); } @Override public void onDisable() { + ConsoleCommandSender console = Bukkit.getConsoleSender(); + console.sendMessage(formatText("&a=============================")); + console.sendMessage(formatText("&7FabledSkyBlock " + this.getDescription().getVersion() + " by &5Songoda <3&7!")); + console.sendMessage(formatText("&7Action: &cDisabling&7...")); + console.sendMessage(formatText("&a=============================")); + if (this.userCacheManager != null) { this.userCacheManager.onDisable(); } @@ -187,6 +205,10 @@ public class SkyBlock extends JavaPlugin { HandlerList.unregisterAll(this); } + private String formatText(String string){ + return ChatColor.translateAlternateColorCodes('&', string); + } + public static SkyBlock getInstance() { return instance; } diff --git a/src/main/java/me/goodandevil/skyblock/biome/BiomeManager.java b/src/main/java/me/goodandevil/skyblock/biome/BiomeManager.java index e9541035..6dbcd804 100644 --- a/src/main/java/me/goodandevil/skyblock/biome/BiomeManager.java +++ b/src/main/java/me/goodandevil/skyblock/biome/BiomeManager.java @@ -1,6 +1,7 @@ package me.goodandevil.skyblock.biome; import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; import java.util.List; import org.bukkit.Bukkit; @@ -28,46 +29,45 @@ public class BiomeManager { Bukkit.getServer().getScheduler().runTaskAsynchronously(skyblock, new Runnable() { @Override public void run() { + List chunks = new ArrayList<>(); Location location = island.getLocation(IslandWorld.Normal, IslandEnvironment.Island); + int radius = (int) Math.ceil(island.getRadius()); - for (Location locationList : LocationUtil.getLocations( - new Location(location.getWorld(), location.getBlockX() - island.getRadius(), 0, - location.getBlockZ() - island.getRadius()), - new Location(location.getWorld(), location.getBlockX() + island.getRadius(), 0, - location.getBlockZ() + island.getRadius()))) { - Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(skyblock, new Runnable() { - @Override - public void run() { - location.getWorld().setBiome(locationList.getBlockX(), locationList.getBlockZ(), biome); - } - }); + for(int x = location.getBlockX() - radius; x < location.getBlockX() + radius; x++){ + for(int z = location.getBlockX() - radius; z < location.getBlockX() + radius; z++){ + location.getWorld().setBiome(x, z, biome); + Chunk chunk = location.getWorld().getChunkAt(x >> 4, z >> 4); + if(!chunks.contains(chunk)) + chunks.add(chunk); + } } + + for(Chunk chunk : chunks) + updateBiome(island, chunk); } }); } - public void updateBiome(Island island, List chunks) { + public void updateBiome(Island island, Chunk chunk) { Class packetPlayOutMapChunkClass = NMSUtil.getNMSClass("PacketPlayOutMapChunk"); Class chunkClass = NMSUtil.getNMSClass("Chunk"); for (Player all : skyblock.getIslandManager().getPlayersAtIsland(island, IslandWorld.Normal)) { - for (Chunk chunkList : chunks) { - try { - if (NMSUtil.getVersionNumber() < 10) { - NMSUtil.sendPacket(all, - packetPlayOutMapChunkClass.getConstructor(chunkClass, boolean.class, int.class) - .newInstance(all.getLocation().getChunk().getClass().getMethod("getHandle") - .invoke(chunkList), true, 20)); - } else { - NMSUtil.sendPacket(all, - packetPlayOutMapChunkClass.getConstructor(chunkClass, int.class).newInstance(all - .getLocation().getChunk().getClass().getMethod("getHandle").invoke(chunkList), - 65535)); - } - } catch (InstantiationException | IllegalAccessException | IllegalArgumentException - | InvocationTargetException | NoSuchMethodException | SecurityException e) { - e.printStackTrace(); + try { + if (NMSUtil.getVersionNumber() < 10) { + NMSUtil.sendPacket(all, + packetPlayOutMapChunkClass.getConstructor(chunkClass, boolean.class, int.class) + .newInstance(all.getLocation().getChunk().getClass().getMethod("getHandle") + .invoke(chunk), true, 20)); + } else { + NMSUtil.sendPacket(all, + packetPlayOutMapChunkClass.getConstructor(chunkClass, int.class).newInstance(all + .getLocation().getChunk().getClass().getMethod("getHandle").invoke(chunk), + 65535)); } + } catch (InstantiationException | IllegalAccessException | IllegalArgumentException + | InvocationTargetException | NoSuchMethodException | SecurityException e) { + e.printStackTrace(); } } } diff --git a/src/main/java/me/goodandevil/skyblock/command/commands/SkyBlockCommand.java b/src/main/java/me/goodandevil/skyblock/command/commands/SkyBlockCommand.java new file mode 100644 index 00000000..c3bf33ae --- /dev/null +++ b/src/main/java/me/goodandevil/skyblock/command/commands/SkyBlockCommand.java @@ -0,0 +1,23 @@ +package me.goodandevil.skyblock.command.commands; + +import me.goodandevil.skyblock.SkyBlock; +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; + +public class SkyBlockCommand implements CommandExecutor { + + @Override + public boolean onCommand(CommandSender sender, Command command, String s, String[] strings) { + sender.sendMessage(""); + sender.sendMessage(formatText("FabledSkyBlock &7Version " + SkyBlock.getInstance().getDescription().getVersion() + " Created with <3 by &5&l&oSongoda")); + sender.sendMessage(formatText("&8 - &a/island help &7 - The default help command.")); + sender.sendMessage(""); + return true; + } + + private String formatText(String string){ + return ChatColor.translateAlternateColorCodes('&', string); + } +} diff --git a/src/main/java/me/goodandevil/skyblock/island/Island.java b/src/main/java/me/goodandevil/skyblock/island/Island.java index 5f51accd..3952a169 100644 --- a/src/main/java/me/goodandevil/skyblock/island/Island.java +++ b/src/main/java/me/goodandevil/skyblock/island/Island.java @@ -469,6 +469,14 @@ public class Island { return islandRoles; } + public IslandRole getRole(OfflinePlayer player){ + for (IslandRole role : IslandRole.values()) + if(getRole(role).contains(player.getUniqueId())) + return role; + + return IslandRole.Visitor; + } + public boolean setRole(IslandRole role, UUID uuid) { if (!(role == IslandRole.Visitor || role == IslandRole.Coop || role == IslandRole.Owner)) { if (!hasRole(role, uuid)) { @@ -594,7 +602,7 @@ public class Island { } } - return null; + return new IslandSetting(setting, true); //TODO: Default setting value } public List getSettings(IslandRole role) { diff --git a/src/main/java/me/goodandevil/skyblock/island/IslandManager.java b/src/main/java/me/goodandevil/skyblock/island/IslandManager.java index d8a562e6..ad74f73b 100644 --- a/src/main/java/me/goodandevil/skyblock/island/IslandManager.java +++ b/src/main/java/me/goodandevil/skyblock/island/IslandManager.java @@ -969,26 +969,19 @@ public class IslandManager { } } - return true; - } - } + if(player.hasPermission("skyblockearth.bypass." + setting.toLowerCase())) + return true; - island = getIslandAtLocation(location); + if(island.getSetting(island.getRole(player), setting).getStatus()) + return true; - if (island != null) { - if (player.hasPermission("skyblock.bypass." + setting.toLowerCase()) - || player.hasPermission("skyblock.bypass.*") || player.hasPermission("skyblock.*")) { - return true; - } else if (island.isCoopPlayer(player.getUniqueId())) { - if (!island.getSetting(IslandRole.Coop, setting).getStatus()) { - return false; - } - } else if (!island.getSetting(IslandRole.Visitor, setting).getStatus()) { - return false; - } - } + if(island.isCoopPlayer(player.getUniqueId()) && island.getSetting(IslandRole.Coop, setting).getStatus()) + return true; - return true; + if(island.getSetting(IslandRole.Visitor, setting).getStatus()) + return true; + + return false; } public boolean hasSetting(org.bukkit.Location location, IslandRole role, String setting) { diff --git a/src/main/java/me/goodandevil/skyblock/leaderboard/LeaderboardManager.java b/src/main/java/me/goodandevil/skyblock/leaderboard/LeaderboardManager.java index 04e5d325..242c631d 100644 --- a/src/main/java/me/goodandevil/skyblock/leaderboard/LeaderboardManager.java +++ b/src/main/java/me/goodandevil/skyblock/leaderboard/LeaderboardManager.java @@ -6,6 +6,8 @@ import java.util.Comparator; import java.util.List; import java.util.UUID; +import me.goodandevil.skyblock.island.Island; +import me.goodandevil.skyblock.island.IslandManager; import org.bukkit.Bukkit; import me.goodandevil.skyblock.SkyBlock; @@ -33,6 +35,7 @@ public class LeaderboardManager { public void resetLeaderboard() { VisitManager visitManager = skyblock.getVisitManager(); + visitManager.loadIslands(); List islandLevels = new ArrayList<>(); List islandVotes = new ArrayList<>(); @@ -44,29 +47,18 @@ public class LeaderboardManager { islandVotes.add(new LeaderboardPlayer(ownerUUID, visit.getVoters().size())); } - islandLevels.sort(new Comparator() { - @Override - public int compare(LeaderboardPlayer leaderboardPlayer1, LeaderboardPlayer leaderboardPlayer2) { - return Integer.valueOf(leaderboardPlayer2.getValue()).compareTo(leaderboardPlayer1.getValue()); - } - }); - - islandVotes.sort(new Comparator() { - @Override - public int compare(LeaderboardPlayer leaderboardPlayer1, LeaderboardPlayer leaderboardPlayer2) { - return Integer.valueOf(leaderboardPlayer2.getValue()).compareTo(leaderboardPlayer1.getValue()); - } - }); + islandLevels.sort(Comparator.comparingInt(LeaderboardPlayer::getValue).reversed()); + islandVotes.sort(Comparator.comparingInt(LeaderboardPlayer::getValue).reversed()); for (int i = 0; i < 10; i++) { - if (islandLevels.size() != 0 && i <= islandLevels.size() - 1) { - leaderboardStorage.add(new Leaderboard(Leaderboard.Type.Level, - visitManager.getIsland((UUID) islandLevels.get(i).getUUID()), i)); + if (!islandVotes.isEmpty() && i < islandVotes.size()) { + Leaderboard leaderboard = new Leaderboard(Leaderboard.Type.Votes, visitManager.getIsland(islandVotes.get(i).getUUID()), i); + leaderboardStorage.add(leaderboard); } - if (islandVotes.size() != 0 && i <= islandVotes.size() - 1) { - leaderboardStorage.add(new Leaderboard(Leaderboard.Type.Votes, - visitManager.getIsland((UUID) islandVotes.get(i).getUUID()), i)); + if (!islandLevels.isEmpty() && i < islandLevels.size()) { + Leaderboard leaderboard = new Leaderboard(Leaderboard.Type.Level, visitManager.getIsland(islandLevels.get(i).getUUID()), i); + leaderboardStorage.add(leaderboard); } } } diff --git a/src/main/java/me/goodandevil/skyblock/listeners/Interact.java b/src/main/java/me/goodandevil/skyblock/listeners/Interact.java index b120d89c..e06ed0cc 100644 --- a/src/main/java/me/goodandevil/skyblock/listeners/Interact.java +++ b/src/main/java/me/goodandevil/skyblock/listeners/Interact.java @@ -5,16 +5,17 @@ import java.util.Set; import org.bukkit.GameMode; import org.bukkit.Material; -import org.bukkit.entity.ArmorStand; -import org.bukkit.entity.EntityType; -import org.bukkit.entity.Horse; -import org.bukkit.entity.Player; +import org.bukkit.entity.*; +import org.bukkit.entity.minecart.StorageMinecart; import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.block.Action; import org.bukkit.event.player.PlayerInteractAtEntityEvent; import org.bukkit.event.player.PlayerInteractEntityEvent; import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.event.vehicle.VehicleDamageEvent; +import org.bukkit.event.vehicle.VehicleDestroyEvent; import org.bukkit.inventory.ItemStack; import me.goodandevil.skyblock.SkyBlock; @@ -26,6 +27,7 @@ import me.goodandevil.skyblock.utils.structure.StructureUtil; import me.goodandevil.skyblock.utils.version.Materials; import me.goodandevil.skyblock.utils.version.NMSUtil; import me.goodandevil.skyblock.utils.version.Sounds; +import org.bukkit.plugin.RegisteredListener; public class Interact implements Listener { @@ -588,7 +590,17 @@ public class Interact implements Listener { return; } } - } else if (entity.getType() == EntityType.COW || entity.getType() == EntityType.MUSHROOM_COW) { + } + else if (entity.getType().equals(EntityType.ITEM_FRAME)){ + if (!skyblock.getIslandManager().hasPermission(player, entity.getLocation(), "Storage")) { + event.setCancelled(true); + skyblock.getMessageManager().sendMessage(player, + skyblock.getFileManager().getConfig(new File(skyblock.getDataFolder(), "language.yml")) + .getFileConfiguration().getString("Island.Settings.Permission.Message")); + skyblock.getSoundManager().playSound(player, Sounds.VILLAGER_NO.bukkitSound(), 1.0F, 1.0F); + } + } + else if (entity.getType() == EntityType.COW || entity.getType() == EntityType.MUSHROOM_COW) { if (is.getType() == Material.BUCKET) { if (!islandManager.hasPermission(player, entity.getLocation(), "Milking")) { event.setCancelled(true); @@ -612,7 +624,20 @@ public class Interact implements Listener { return; } - } else if (entity.getType() == EntityType.MINECART || entity.getType() == EntityType.BOAT) { + } + else if(entity instanceof StorageMinecart){ + if (!islandManager.hasPermission(player, entity.getLocation(), "Storage")) { + event.setCancelled(true); + + messageManager.sendMessage(player, + skyblock.getFileManager().getConfig(new File(skyblock.getDataFolder(), "language.yml")) + .getFileConfiguration().getString("Island.Settings.Permission.Message")); + soundManager.playSound(player, Sounds.VILLAGER_NO.bukkitSound(), 1.0F, 1.0F); + + return; + } + } + else if (entity.getType() == EntityType.MINECART || entity.getType() == EntityType.BOAT) { if (!islandManager.hasPermission(player, entity.getLocation(), "MinecartBoat")) { event.setCancelled(true); @@ -710,15 +735,48 @@ public class Interact implements Listener { } @EventHandler - public void onPlayerInteractAtEntity(PlayerInteractAtEntityEvent event) { - if (!(event.getRightClicked() instanceof ArmorStand)) { + public void onPlayerDamageVehicle(VehicleDamageEvent event){ + if(!(event.getAttacker() instanceof Player)) return; - } + Player player = (Player) event.getAttacker(); + + if (!skyblock.getIslandManager().hasPermission(player, event.getVehicle().getLocation(), "MobHurting")) { + event.setCancelled(true); + + skyblock.getMessageManager().sendMessage(player, + skyblock.getFileManager().getConfig(new File(skyblock.getDataFolder(), "language.yml")) + .getFileConfiguration().getString("Island.Settings.Permission.Message")); + skyblock.getSoundManager().playSound(player, Sounds.VILLAGER_NO.bukkitSound(), 1.0F, 1.0F); + } + } + + @EventHandler + public void onPlayerDestroyVehicle(VehicleDestroyEvent event){ + if(!(event.getAttacker() instanceof Player)) + return; + + Player player = (Player) event.getAttacker(); + + if (!skyblock.getIslandManager().hasPermission(player, event.getVehicle().getLocation(), "MobHurting")) { + event.setCancelled(true); + + skyblock.getMessageManager().sendMessage(player, + skyblock.getFileManager().getConfig(new File(skyblock.getDataFolder(), "language.yml")) + .getFileConfiguration().getString("Island.Settings.Permission.Message")); + skyblock.getSoundManager().playSound(player, Sounds.VILLAGER_NO.bukkitSound(), 1.0F, 1.0F); + } + } + + @EventHandler + public void onPlayerInteractAtEntity(PlayerInteractEntityEvent event) { Player player = event.getPlayer(); org.bukkit.entity.Entity entity = event.getRightClicked(); - if (skyblock.getWorldManager().isIslandWorld(entity.getWorld())) { + if (!skyblock.getWorldManager().isIslandWorld(entity.getWorld())) + return; + + if (entity instanceof ArmorStand){ if (!skyblock.getIslandManager().hasPermission(player, entity.getLocation(), "ArmorStandUse")) { event.setCancelled(true); @@ -728,5 +786,6 @@ public class Interact implements Listener { skyblock.getSoundManager().playSound(player, Sounds.VILLAGER_NO.bukkitSound(), 1.0F, 1.0F); } } + } } diff --git a/src/main/java/me/goodandevil/skyblock/listeners/Move.java b/src/main/java/me/goodandevil/skyblock/listeners/Move.java index f4705ae9..0f919e1f 100644 --- a/src/main/java/me/goodandevil/skyblock/listeners/Move.java +++ b/src/main/java/me/goodandevil/skyblock/listeners/Move.java @@ -189,12 +189,18 @@ public class Move implements Listener { } } } else { + Config config = skyblock.getFileManager() + .getConfig(new File(skyblock.getDataFolder(), "config.yml")); + FileConfiguration configLoad = config.getFileConfiguration(); + if (LocationUtil.isLocationAtLocationRadius(to, island.getLocation(world, IslandEnvironment.Island), island.getRadius() + 2)) { - player.teleport(player.getLocation() - .add(from.toVector().subtract(to.toVector()).normalize().multiply(2.0D))); - player.setFallDistance(0.0F); - soundManager.playSound(player, Sounds.ENDERMAN_TELEPORT.bukkitSound(), 1.0F, 1.0F); + if(!configLoad.getBoolean("Island.WorldBorder.Enable")){ + player.teleport(player.getLocation() + .add(from.toVector().subtract(to.toVector()).normalize().multiply(2.0D))); + player.setFallDistance(0.0F); + soundManager.playSound(player, Sounds.ENDERMAN_TELEPORT.bukkitSound(), 1.0F, 1.0F); + } } else { if (island.getVisit().isVisitor(player.getUniqueId())) { player.teleport(island.getLocation(world, IslandEnvironment.Visitor)); diff --git a/src/main/java/me/goodandevil/skyblock/listeners/Portal.java b/src/main/java/me/goodandevil/skyblock/listeners/Portal.java index 7259fdc7..0681c4b4 100644 --- a/src/main/java/me/goodandevil/skyblock/listeners/Portal.java +++ b/src/main/java/me/goodandevil/skyblock/listeners/Portal.java @@ -1,30 +1,27 @@ package me.goodandevil.skyblock.listeners; -import java.io.File; - -import org.bukkit.Bukkit; -import org.bukkit.World; -import org.bukkit.World.Environment; -import org.bukkit.configuration.file.FileConfiguration; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.Listener; -import org.bukkit.event.entity.EntityPortalEnterEvent; - import me.goodandevil.skyblock.SkyBlock; import me.goodandevil.skyblock.config.FileManager; import me.goodandevil.skyblock.config.FileManager.Config; import me.goodandevil.skyblock.island.Island; import me.goodandevil.skyblock.island.IslandEnvironment; +import me.goodandevil.skyblock.island.IslandManager; +import me.goodandevil.skyblock.island.IslandWorld; import me.goodandevil.skyblock.message.MessageManager; import me.goodandevil.skyblock.sound.SoundManager; -import me.goodandevil.skyblock.island.IslandManager; -import me.goodandevil.skyblock.island.IslandRole; -import me.goodandevil.skyblock.island.IslandWorld; import me.goodandevil.skyblock.utils.version.Materials; import me.goodandevil.skyblock.utils.version.Sounds; import me.goodandevil.skyblock.utils.world.LocationUtil; import me.goodandevil.skyblock.world.WorldManager; +import org.bukkit.Bukkit; +import org.bukkit.configuration.file.FileConfiguration; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.entity.EntityPortalEnterEvent; +import org.bukkit.event.player.PlayerMoveEvent; + +import java.io.File; public class Portal implements Listener { @@ -35,10 +32,37 @@ public class Portal implements Listener { } @EventHandler - public void onEntityPortalEnter(EntityPortalEnterEvent event) { - if (!(event.getEntity() instanceof Player)) { + public void onPlayerMove(PlayerMoveEvent event){ + Player player = event.getPlayer(); + org.bukkit.block.Block from = event.getFrom().getBlock(); + org.bukkit.block.Block to = event.getTo().getBlock(); + + MessageManager messageManager = skyblock.getMessageManager(); + IslandManager islandManager = skyblock.getIslandManager(); + FileManager fileManager = skyblock.getFileManager(); + SoundManager soundManager = skyblock.getSoundManager(); + + Island island = islandManager.getIslandAtLocation(to.getLocation()); + if(from.getX() == to.getX() && from.getY() == to.getY() && from.getZ() == to.getZ()) return; + + if(island != null){ + if((to.getType().equals(Materials.NETHER_PORTAL.parseMaterial()) || + to.getType().equals(Materials.END_PORTAL.parseMaterial())) && + !islandManager.hasPermission(player, player.getLocation(), "Portal")){ + event.setTo(LocationUtil.getRandomLocation(event.getFrom().getWorld(), 5000, 5000, true, true)); + messageManager.sendMessage(player, + fileManager.getConfig(new File(skyblock.getDataFolder(), "language.yml")).getFileConfiguration() + .getString("Island.Settings.Permission.Message")); + soundManager.playSound(player, Sounds.VILLAGER_NO.bukkitSound(), 1.0F, 1.0F); + } } + } + + @EventHandler + public void onEntityPortalEnter(EntityPortalEnterEvent event) { + if (!(event.getEntity() instanceof Player)) + return; Player player = (Player) event.getEntity(); org.bukkit.block.Block block = event.getLocation().getBlock(); @@ -53,98 +77,149 @@ public class Portal implements Listener { return; } - IslandWorld world = worldManager.getIslandWorld(player.getWorld()); Island island = islandManager.getIslandAtLocation(player.getLocation()); if (island != null) { Config config = fileManager.getConfig(new File(skyblock.getDataFolder(), "config.yml")); FileConfiguration configLoad = config.getFileConfiguration(); - if (((block.getType() == Materials.NETHER_PORTAL.parseMaterial() - && configLoad.getBoolean("Island.World.Nether.Enable")) - || (block.getType() == Materials.END_PORTAL.parseMaterial() - && configLoad.getBoolean("Island.World.End.Enable"))) - && islandManager.hasPermission(player, "Portal")) { - if (configLoad.getBoolean("Island.Portal.Island")) { - if (island.hasRole(IslandRole.Member, player.getUniqueId()) - || island.hasRole(IslandRole.Operator, player.getUniqueId()) - || island.hasRole(IslandRole.Owner, player.getUniqueId())) { - if (world == IslandWorld.Normal) { - if (block.getType() == Materials.NETHER_PORTAL.parseMaterial()) { - player.teleport(island.getLocation(IslandWorld.Nether, IslandEnvironment.Main)); - } else if (block.getType() == Materials.END_PORTAL.parseMaterial()) { - player.teleport(island.getLocation(IslandWorld.End, IslandEnvironment.Main)); - } - } else { - player.teleport(island.getLocation(IslandWorld.Normal, IslandEnvironment.Main)); - } - } else { - if (world == IslandWorld.Normal) { - if (block.getType() == Materials.NETHER_PORTAL.parseMaterial()) { - player.teleport(island.getLocation(IslandWorld.Nether, IslandEnvironment.Visitor)); - } else if (block.getType() == Materials.END_PORTAL.parseMaterial()) { - player.teleport(island.getLocation(IslandWorld.End, IslandEnvironment.Visitor)); - } - } else { - player.teleport(island.getLocation(IslandWorld.Normal, IslandEnvironment.Visitor)); - } - } - - soundManager.playSound(player, Sounds.ENDERMAN_TELEPORT.bukkitSound(), 1.0F, 1.0F); - } else if (block.getType() == Materials.NETHER_PORTAL.parseMaterial() - && Bukkit.getServer().getAllowNether()) { - for (World worldList : Bukkit.getServer().getWorlds()) { - if (worldList.getEnvironment() == Environment.NETHER) { - player.teleport(LocationUtil.getRandomLocation(worldList, 5000, 5000, true, true)); - - break; - } - } - - soundManager.playSound(player, Sounds.ENDERMAN_TELEPORT.bukkitSound(), 1.0F, 1.0F); - } else if (block.getType() == Materials.END_PORTAL.parseMaterial() - && Bukkit.getServer().getAllowEnd()) { - for (World worldList : Bukkit.getServer().getWorlds()) { - if (worldList.getEnvironment() == Environment.THE_END) { - player.teleport(worldList.getSpawnLocation()); - - break; - } - } - - soundManager.playSound(player, Sounds.ENDERMAN_TELEPORT.bukkitSound(), 1.0F, 1.0F); - } else { - if (island.hasRole(IslandRole.Member, player.getUniqueId()) - || island.hasRole(IslandRole.Operator, player.getUniqueId()) - || island.hasRole(IslandRole.Owner, player.getUniqueId())) { - player.teleport(island.getLocation(IslandWorld.Normal, IslandEnvironment.Main)); - } else { - player.teleport(island.getLocation(IslandWorld.Normal, IslandEnvironment.Visitor)); - } - - messageManager.sendMessage(player, - fileManager.getConfig(new File(skyblock.getDataFolder(), "language.yml")) - .getFileConfiguration().getString("Island.Portal.Destination.Message")); - soundManager.playSound(player, Sounds.VILLAGER_NO.bukkitSound(), 1.0F, 1.0F); - } - } else { - if (island.hasRole(IslandRole.Member, player.getUniqueId()) - || island.hasRole(IslandRole.Operator, player.getUniqueId()) - || island.hasRole(IslandRole.Owner, player.getUniqueId())) { - player.teleport(island.getLocation(world, IslandEnvironment.Main)); - } else { - player.teleport(island.getLocation(world, IslandEnvironment.Visitor)); - } - + if(!islandManager.hasPermission(player, player.getLocation(), "Portal")){ messageManager.sendMessage(player, fileManager.getConfig(new File(skyblock.getDataFolder(), "language.yml")).getFileConfiguration() .getString("Island.Settings.Permission.Message")); soundManager.playSound(player, Sounds.VILLAGER_NO.bukkitSound(), 1.0F, 1.0F); + return; } - player.setFallDistance(0.0F); + IslandEnvironment spawnEnvironment; + switch (island.getRole(player)){ + case Operator: + case Owner: + case Member: + case Coop: + spawnEnvironment = IslandEnvironment.Island; + break; - return; + default: + spawnEnvironment = IslandEnvironment.Visitor; + } + + IslandWorld fromWorld = worldManager.getIslandWorld(player.getWorld()); + IslandWorld toWorld = IslandWorld.Normal; + + if(block.getType().equals(Materials.NETHER_PORTAL.parseMaterial())) + toWorld = fromWorld.equals(IslandWorld.Normal) ? IslandWorld.Nether : IslandWorld.Normal; + else if(block.getType().equals(Materials.END_PORTAL.parseMaterial())) + toWorld = fromWorld.equals(IslandWorld.Normal) ? IslandWorld.End : IslandWorld.Normal; + + switch (toWorld){ + case Nether: + if(configLoad.getBoolean("Island.World.Nether.Enable")){ + player.teleport(island.getLocation(toWorld, spawnEnvironment)); + soundManager.playSound(player, Sounds.ENDERMAN_TELEPORT.bukkitSound(), 1.0F, 1.0F); + player.setFallDistance(0.0F); + } + break; + + case End: + if(configLoad.getBoolean("Island.World.End.Enable")){ + player.teleport(island.getLocation(toWorld, spawnEnvironment)); + soundManager.playSound(player, Sounds.ENDERMAN_TELEPORT.bukkitSound(), 1.0F, 1.0F); + player.setFallDistance(0.0F); + } + break; + + default: + player.teleport(island.getLocation(toWorld, spawnEnvironment)); + soundManager.playSound(player, Sounds.ENDERMAN_TELEPORT.bukkitSound(), 1.0F, 1.0F); + player.setFallDistance(0.0F); + break; + } + + //region GoodAndEvil his code (garbage) +// if (((block.getType() == Materials.NETHER_PORTAL.parseMaterial() +// && configLoad.getBoolean("Island.World.Nether.Enable")) +// || (block.getType() == Materials.END_PORTAL.parseMaterial() +// && configLoad.getBoolean("Island.World.End.Enable"))) +// && islandManager.hasPermission(player, "Portal")) { +// if (configLoad.getBoolean("Island.Portal.Island")) { +// if (island.hasRole(IslandRole.Member, player.getUniqueId()) +// || island.hasRole(IslandRole.Operator, player.getUniqueId()) +// || island.hasRole(IslandRole.Owner, player.getUniqueId())) { +// if (world == IslandWorld.Normal) { +// if (block.getType() == Materials.NETHER_PORTAL.parseMaterial()) { +// Bukkit.broadcastMessage("BP 1"); +// player.teleport(island.getLocation(IslandWorld.Nether, IslandEnvironment.Main)); +// } else if (block.getType() == Materials.END_PORTAL.parseMaterial()) { +// player.teleport(island.getLocation(IslandWorld.End, IslandEnvironment.Main)); +// } +// } else { +// player.teleport(island.getLocation(IslandWorld.Normal, IslandEnvironment.Main)); +// } +// } else { +// if (world == IslandWorld.Normal) { +// if (block.getType() == Materials.NETHER_PORTAL.parseMaterial()) { +// player.teleport(island.getLocation(IslandWorld.Nether, IslandEnvironment.Visitor)); +// } else if (block.getType() == Materials.END_PORTAL.parseMaterial()) { +// player.teleport(island.getLocation(IslandWorld.End, IslandEnvironment.Visitor)); +// } +// } else { +// player.teleport(island.getLocation(IslandWorld.Normal, IslandEnvironment.Visitor)); +// } +// } +// +// soundManager.playSound(player, Sounds.ENDERMAN_TELEPORT.bukkitSound(), 1.0F, 1.0F); +// } else if (block.getType() == Materials.NETHER_PORTAL.parseMaterial() +// && Bukkit.getServer().getAllowNether()) { +// for (World worldList : Bukkit.getServer().getWorlds()) { +// if (worldList.getEnvironment() == Environment.NETHER) { +// player.teleport(LocationUtil.getRandomLocation(worldList, 5000, 5000, true, true)); +// +// break; +// } +// } +// +// soundManager.playSound(player, Sounds.ENDERMAN_TELEPORT.bukkitSound(), 1.0F, 1.0F); +// } else if (block.getType() == Materials.END_PORTAL.parseMaterial() +// && Bukkit.getServer().getAllowEnd()) { +// for (World worldList : Bukkit.getServer().getWorlds()) { +// if (worldList.getEnvironment() == Environment.THE_END) { +// player.teleport(worldList.getSpawnLocation()); +// +// break; +// } +// } +// +// soundManager.playSound(player, Sounds.ENDERMAN_TELEPORT.bukkitSound(), 1.0F, 1.0F); +// } else { +// if (island.hasRole(IslandRole.Member, player.getUniqueId()) +// || island.hasRole(IslandRole.Operator, player.getUniqueId()) +// || island.hasRole(IslandRole.Owner, player.getUniqueId())) { +// player.teleport(island.getLocation(IslandWorld.Normal, IslandEnvironment.Main)); +// } else { +// player.teleport(island.getLocation(IslandWorld.Normal, IslandEnvironment.Visitor)); +// } +// +// messageManager.sendMessage(player, +// fileManager.getConfig(new File(skyblock.getDataFolder(), "language.yml")) +// .getFileConfiguration().getString("Island.Portal.Destination.Message")); +// soundManager.playSound(player, Sounds.VILLAGER_NO.bukkitSound(), 1.0F, 1.0F); +// } +// } else { +// if (island.hasRole(IslandRole.Member, player.getUniqueId()) +// || island.hasRole(IslandRole.Operator, player.getUniqueId()) +// || island.hasRole(IslandRole.Owner, player.getUniqueId())) { +// player.teleport(island.getLocation(world, IslandEnvironment.Main)); +// } else { +// player.teleport(island.getLocation(world, IslandEnvironment.Visitor)); +// } +// +// messageManager.sendMessage(player, +// fileManager.getConfig(new File(skyblock.getDataFolder(), "language.yml")).getFileConfiguration() +// .getString("Island.Settings.Permission.Message")); +// soundManager.playSound(player, Sounds.VILLAGER_NO.bukkitSound(), 1.0F, 1.0F); +// } + //endregion } } } diff --git a/src/main/java/me/goodandevil/skyblock/listeners/Quit.java b/src/main/java/me/goodandevil/skyblock/listeners/Quit.java index 2555a081..59237e51 100644 --- a/src/main/java/me/goodandevil/skyblock/listeners/Quit.java +++ b/src/main/java/me/goodandevil/skyblock/listeners/Quit.java @@ -99,7 +99,7 @@ public class Quit implements Listener { } } - if (playerData.getIsland() != null && islandManager.containsIsland(playerData.getIsland())) { + if (playerData != null && playerData.getIsland() != null && islandManager.containsIsland(playerData.getIsland())) { island = islandManager.getIsland(Bukkit.getServer().getOfflinePlayer(playerData.getIsland())); if (!island.hasRole(IslandRole.Member, player.getUniqueId()) diff --git a/src/main/java/me/goodandevil/skyblock/menus/Biome.java b/src/main/java/me/goodandevil/skyblock/menus/Biome.java index 6fcd1a4f..453681ab 100644 --- a/src/main/java/me/goodandevil/skyblock/menus/Biome.java +++ b/src/main/java/me/goodandevil/skyblock/menus/Biome.java @@ -109,7 +109,7 @@ public class Biome { event.setWillClose(false); event.setWillDestroy(false); } else { - if (cooldownManager.hasPlayer(CooldownType.Biome, player)) { + if (cooldownManager.hasPlayer(CooldownType.Biome, player) && !player.hasPermission("skyblockearth.bypass.cooldown")) { CooldownPlayer cooldownPlayer = cooldownManager.getCooldownPlayer(CooldownType.Biome, player); Cooldown cooldown = cooldownPlayer.getCooldown(); @@ -139,7 +139,6 @@ public class Biome { return; } - org.bukkit.block.Biome selectedBiomeType = null; if (is.getType() == Materials.SUNFLOWER.parseMaterial()) { @@ -158,13 +157,8 @@ public class Biome { selectedBiomeType = Biomes.ROOFED_FOREST.bukkitBiome(); } - if (!player.hasPermission("skyblock.bypass.cooldown") - && !player.hasPermission("skyblock.bypass.*") - && !player.hasPermission("skyblock.*")) { - cooldownManager.createPlayer(CooldownType.Biome, player); - biomeManager.setBiome(island, selectedBiomeType); - } - + cooldownManager.createPlayer(CooldownType.Biome, player); + biomeManager.setBiome(island, selectedBiomeType); island.setBiome(selectedBiomeType); island.save(); diff --git a/src/main/resources/levelling.yml b/src/main/resources/levelling.yml index 3cd9f29f..4d913ec5 100644 --- a/src/main/resources/levelling.yml +++ b/src/main/resources/levelling.yml @@ -2,13 +2,1181 @@ # Material Name # Points Earned Materials: - WOOD_BUTTON: + ACACIA_BUTTON: + Points: 1 + ACACIA_DOOR: + Points: 1 + ACACIA_FENCE: + Points: 2 + ACACIA_FENCE_GATE: + Points: 4 + ACACIA_LEAVES: + Points: 0 + ACACIA_LOG: + Points: 0 + ACACIA_PLANKS: + Points: 1 + ACACIA_PRESSURE_PLATE: + Points: 2 + ACACIA_SAPLING: + Points: 1 + ACACIA_SLAB: + Points: 1 + ACACIA_STAIRS: + Points: 2 + ACACIA_TRAPDOOR: + Points: 3 + ACACIA_WOOD: + Points: 1 + ACTIVATOR_RAIL: + Points: 1 + ALLIUM: + Points: 1 + ANDESITE: + Points: 1 + ANVIL: + Points: 10 + ATTACHED_MELON_STEM: + Points: 1 + ATTACHED_PUMPKIN_STEM: + Points: 1 + AZURE_BLUET: + Points: 1 + BARRIER: + Points: 0 + BEACON: + Points: 500 + BEDROCK: + Points: 0 + BEETROOTS: + Points: 1 + BIRCH_BUTTON: + Points: 1 + BIRCH_DOOR: + Points: 2 + BIRCH_FENCE: + Points: 2 + BIRCH_FENCE_GATE: + Points: 4 + BIRCH_LEAVES: + Points: 0 + BIRCH_LOG: + Points: 0 + BIRCH_PLANKS: + Points: 1 + BIRCH_PRESSURE_PLATE: + Points: 2 + BIRCH_SAPLING: + Points: 1 + BIRCH_SLAB: + Points: 1 + BIRCH_STAIRS: + Points: 2 + BIRCH_TRAPDOOR: + Points: 3 + BIRCH_WOOD: + Points: 1 + BLACK_BANNER: + Points: 2 + BLACK_BED: + Points: 6 + BLACK_CARPET: + Points: 1 + BLACK_CONCRETE: + Points: 3 + BLACK_CONCRETE_POWDER: + Points: 2 + BLACK_GLAZED_TERRACOTTA: + Points: 5 + BLACK_SHULKER_BOX: + Points: 11 + BLACK_STAINED_GLASS: + Points: 2 + BLACK_STAINED_GLASS_PANE: + Points: 1 + BLACK_TERRACOTTA: + Points: 2 + BLACK_WALL_BANNER: + Points: 2 + BLACK_WOOL: + Points: 2 + BLUE_BANNER: + Points: 2 + BLUE_BED: + Points: 6 + BLUE_CARPET: + Points: 1 + BLUE_CONCRETE: + Points: 3 + BLUE_CONCRETE_POWDER: + Points: 2 + BLUE_GLAZED_TERRACOTTA: + Points: 5 + BLUE_ICE: + Points: 1 + BLUE_ORCHID: + Points: 1 + BLUE_SHULKER_BOX: + Points: 11 + BLUE_STAINED_GLASS: + Points: 2 + BLUE_STAINED_GLASS_PANE: + Points: 1 + BLUE_TERRACOTTA: + Points: 2 + BLUE_WALL_BANNER: + Points: 2 + BLUE_WOOL: + Points: 2 + BONE_BLOCK: + Points: 1 + BOOKSHELF: + Points: 5 + BRAIN_CORAL: + Points: 1 + BRAIN_CORAL_BLOCK: + Points: 1 + BRAIN_CORAL_FAN: + Points: 1 + BRAIN_CORAL_WALL_FAN: + Points: 1 + BREWING_STAND: + Points: 20 + BRICKS: + Points: 5 + BRICK_SLAB: + Points: 3 + BRICK_STAIRS: + Points: 5 + BROWN_BANNER: + Points: 2 + BROWN_BED: + Points: 6 + BROWN_CARPET: + Points: 1 + BROWN_CONCRETE: + Points: 3 + BROWN_CONCRETE_POWDER: + Points: 2 + BROWN_GLAZED_TERRACOTTA: + Points: 5 + BROWN_MUSHROOM: + Points: 1 + BROWN_MUSHROOM_BLOCK: + Points: 1 + BROWN_SHULKER_BOX: + Points: 11 + BROWN_STAINED_GLASS: + Points: 2 + BROWN_STAINED_GLASS_PANE: + Points: 1 + BROWN_TERRACOTTA: + Points: 2 + BROWN_WALL_BANNER: + Points: 2 + BROWN_WOOL: + Points: 1 + BUBBLE_COLUMN: + Points: 1 + BUBBLE_CORAL: + Points: 1 + BUBBLE_CORAL_BLOCK: + Points: 1 + BUBBLE_CORAL_FAN: + Points: 1 + BUBBLE_CORAL_WALL_FAN: + Points: 1 + CACTUS: + Points: 1 + CAKE: + Points: 9 + CARROTS: + Points: 1 + CARVED_PUMPKIN: + Points: 2 + CAULDRON: + Points: 10 + CAVE_AIR: + Points: 0 + CHAIN_COMMAND_BLOCK: + Points: 0 + CHEST: + Points: 8 + CHIPPED_ANVIL: + Points: 9 + CHISELED_QUARTZ_BLOCK: + Points: 2 + CHISELED_RED_SANDSTONE: + Points: 2 + CHISELED_SANDSTONE: + Points: 2 + CHISELED_STONE_BRICKS: + Points: 2 + CHORUS_FLOWER: + Points: 1 + CHORUS_PLANT: + Points: 1 + CLAY: + Points: 2 + COAL_BLOCK: + Points: 9 + COAL_ORE: + Points: 1 + COARSE_DIRT: + Points: 2 + COBBLESTONE: + Points: 1 + COBBLESTONE_SLAB: + Points: 1 + COBBLESTONE_STAIRS: + Points: 2 + COBBLESTONE_WALL: + Points: 1 + COBWEB: + Points: 10 + COCOA: + Points: 1 + COMMAND_BLOCK: + Points: 0 + COMPARATOR: + Points: 10 + CONDUIT: + Points: 1 + CRACKED_STONE_BRICKS: + Points: 2 + CRAFTING_TABLE: + Points: 1 + CREEPER_HEAD: + Points: 1 + CREEPER_WALL_HEAD: + Points: 1 + CUT_RED_SANDSTONE: + Points: 1 + CUT_SANDSTONE: + Points: 1 + CYAN_BANNER: + Points: 2 + CYAN_BED: + Points: 6 + CYAN_CARPET: + Points: 1 + CYAN_CONCRETE: + Points: 3 + CYAN_CONCRETE_POWDER: + Points: 2 + CYAN_GLAZED_TERRACOTTA: + Points: 5 + CYAN_SHULKER_BOX: + Points: 11 + CYAN_STAINED_GLASS: + Points: 2 + CYAN_STAINED_GLASS_PANE: + Points: 1 + CYAN_TERRACOTTA: + Points: 2 + CYAN_WALL_BANNER: + Points: 2 + CYAN_WOOL: + Points: 2 + DAMAGED_ANVIL: + Points: 5 + DANDELION: + Points: 1 + DARK_OAK_BUTTON: + Points: 1 + DARK_OAK_DOOR: + Points: 2 + DARK_OAK_FENCE: + Points: 2 + DARK_OAK_FENCE_GATE: + Points: 4 + DARK_OAK_LEAVES: + Points: 0 + DARK_OAK_LOG: + Points: 0 + DARK_OAK_PLANKS: + Points: 1 + DARK_OAK_PRESSURE_PLATE: + Points: 2 + DARK_OAK_SAPLING: + Points: 1 + DARK_OAK_SLAB: + Points: 1 + DARK_OAK_STAIRS: + Points: 2 + DARK_OAK_TRAPDOOR: + Points: 3 + DARK_OAK_WOOD: + Points: 1 + DARK_PRISMARINE: + Points: 1 + DARK_PRISMARINE_SLAB: + Points: 1 + DARK_PRISMARINE_STAIRS: + Points: 2 + DAYLIGHT_DETECTOR: + Points: 10 + DEAD_BRAIN_CORAL_BLOCK: + Points: 1 + DEAD_BRAIN_CORAL_FAN: + Points: 1 + DEAD_BRAIN_CORAL_WALL_FAN: + Points: 1 + DEAD_BUBBLE_CORAL_BLOCK: + Points: 1 + DEAD_BUBBLE_CORAL_FAN: + Points: 1 + DEAD_BUBBLE_CORAL_WALL_FAN: + Points: 1 + DEAD_BUSH: + Points: 1 + DEAD_FIRE_CORAL_BLOCK: + Points: 1 + DEAD_FIRE_CORAL_FAN: + Points: 1 + DEAD_FIRE_CORAL_WALL_FAN: + Points: 1 + DEAD_HORN_CORAL_BLOCK: + Points: 1 + DEAD_HORN_CORAL_FAN: + Points: 1 + DEAD_HORN_CORAL_WALL_FAN: + Points: 1 + DEAD_TUBE_CORAL_BLOCK: + Points: 1 + DEAD_TUBE_CORAL_FAN: + Points: 1 + DEAD_TUBE_CORAL_WALL_FAN: + Points: 1 + DETECTOR_RAIL: + Points: 10 + DIAMOND_BLOCK: + Points: 300 + DIAMOND_ORE: + Points: 1 + DIORITE: + Points: 1 + DIRT: + Points: 3 + DISPENSER: + Points: 5 + DRAGON_EGG: + Points: 150 + DRAGON_HEAD: + Points: 1 + DRAGON_WALL_HEAD: + Points: 1 + DRIED_KELP_BLOCK: + Points: 1 + DROPPER: + Points: 4 + EMERALD_BLOCK: + Points: 150 + EMERALD_ORE: + Points: 1 + ENCHANTING_TABLE: + Points: 150 + ENDER_CHEST: + Points: 150 + END_GATEWAY: + Points: 0 + END_PORTAL: + Points: 0 + END_PORTAL_FRAME: + Points: 0 + END_ROD: + Points: 1 + END_STONE: + Points: 1 + END_STONE_BRICKS: + Points: 2 + FARMLAND: + Points: 1 + FERN: + Points: 1 + FIRE: + Points: 0 + FIRE_CORAL: + Points: 1 + FIRE_CORAL_BLOCK: + Points: 1 + FIRE_CORAL_FAN: + Points: 1 + FIRE_CORAL_WALL_FAN: + Points: 1 + FLOWER_POT: + Points: 1 + FROSTED_ICE: + Points: 1 + FURNACE: + Points: 8 + GLASS: + Points: 2 + GLASS_PANE: + Points: 1 + GLOWSTONE: + Points: 1 + GOLD_BLOCK: + Points: 150 + GOLD_ORE: Points: 1 GRANITE: - Points: 10 + Points: 1 GRASS: + Points: 4 + GRASS_BLOCK: + Points: 4 + GRASS_PATH: + Points: 4 + GRAVEL: + Points: 1 + GRAY_BANNER: + Points: 2 + GRAY_BED: + Points: 6 + GRAY_CARPET: + Points: 1 + GRAY_CONCRETE: + Points: 3 + GRAY_CONCRETE_POWDER: + Points: 2 + GRAY_GLAZED_TERRACOTTA: Points: 5 + GRAY_SHULKER_BOX: + Points: 11 + GRAY_STAINED_GLASS: + Points: 2 + GRAY_STAINED_GLASS_PANE: + Points: 1 + GRAY_TERRACOTTA: + Points: 2 + GRAY_WALL_BANNER: + Points: 2 + GRAY_WOOL: + Points: 2 + GREEN_BANNER: + Points: 2 + GREEN_BED: + Points: 6 + GREEN_CARPET: + Points: 1 + GREEN_CONCRETE: + Points: 3 + GREEN_CONCRETE_POWDER: + Points: 2 + GREEN_GLAZED_TERRACOTTA: + Points: 5 + GREEN_SHULKER_BOX: + Points: 11 + GREEN_STAINED_GLASS: + Points: 2 + GREEN_STAINED_GLASS_PANE: + Points: 1 + GREEN_TERRACOTTA: + Points: 2 + GREEN_WALL_BANNER: + Points: 2 + GREEN_WOOL: + Points: 2 + HAY_BLOCK: + Points: 2 + HEAVY_WEIGHTED_PRESSURE_PLATE: + Points: 3 + HOPPER: + Points: 5 + HORN_CORAL: + Points: 1 + HORN_CORAL_BLOCK: + Points: 1 + HORN_CORAL_FAN: + Points: 1 + HORN_CORAL_WALL_FAN: + Points: 1 + ICE: + Points: 5 + INFESTED_CHISELED_STONE_BRICKS: + Points: 2 + INFESTED_COBBLESTONE: + Points: 1 + INFESTED_CRACKED_STONE_BRICKS: + Points: 2 + INFESTED_MOSSY_STONE_BRICKS: + Points: 2 + INFESTED_STONE: + Points: 1 + INFESTED_STONE_BRICKS: + Points: 2 + IRON_BARS: + Points: 2 + IRON_BLOCK: + Points: 10 + IRON_DOOR: + Points: 5 + IRON_ORE: + Points: 1 + IRON_TRAPDOOR: + Points: 4 + JACK_O_LANTERN: + Points: 2 + JUKEBOX: + Points: 10 + JUNGLE_BUTTON: + Points: 1 + JUNGLE_DOOR: + Points: 2 + JUNGLE_FENCE: + Points: 2 + JUNGLE_FENCE_GATE: + Points: 4 + JUNGLE_LEAVES: + Points: 0 + JUNGLE_LOG: + Points: 0 + JUNGLE_PLANKS: + Points: 1 + JUNGLE_PRESSURE_PLATE: + Points: 2 + JUNGLE_SAPLING: + Points: 1 + JUNGLE_SLAB: + Points: 1 + JUNGLE_STAIRS: + Points: 2 + JUNGLE_TRAPDOOR: + Points: 3 + JUNGLE_WOOD: + Points: 1 + KELP: + Points: 1 + KELP_PLANT: + Points: 1 + LADDER: + Points: 2 + LAPIS_BLOCK: + Points: 10 + LAPIS_ORE: + Points: 1 + LARGE_FERN: + Points: 1 + LAVA: + Points: 0 + LEVER: + Points: 1 + LIGHT_BLUE_BANNER: + Points: 2 + LIGHT_BLUE_BED: + Points: 6 + LIGHT_BLUE_CARPET: + Points: 1 + LIGHT_BLUE_CONCRETE: + Points: 2 + LIGHT_BLUE_CONCRETE_POWDER: + Points: 2 + LIGHT_BLUE_GLAZED_TERRACOTTA: + Points: 5 + LIGHT_BLUE_SHULKER_BOX: + Points: 11 + LIGHT_BLUE_STAINED_GLASS: + Points: 2 + LIGHT_BLUE_STAINED_GLASS_PANE: + Points: 1 + LIGHT_BLUE_TERRACOTTA: + Points: 2 + LIGHT_BLUE_WALL_BANNER: + Points: 2 + LIGHT_BLUE_WOOL: + Points: 2 + LIGHT_GRAY_BANNER: + Points: 2 + LIGHT_GRAY_BED: + Points: 6 + LIGHT_GRAY_CARPET: + Points: 1 + LIGHT_GRAY_CONCRETE: + Points: 3 + LIGHT_GRAY_CONCRETE_POWDER: + Points: 2 + LIGHT_GRAY_GLAZED_TERRACOTTA: + Points: 5 + LIGHT_GRAY_SHULKER_BOX: + Points: 11 + LIGHT_GRAY_STAINED_GLASS: + Points: 2 + LIGHT_GRAY_STAINED_GLASS_PANE: + Points: 1 + LIGHT_GRAY_TERRACOTTA: + Points: 2 + LIGHT_GRAY_WALL_BANNER: + Points: 2 + LIGHT_GRAY_WOOL: + Points: 2 + LIGHT_WEIGHTED_PRESSURE_PLATE: + Points: 3 + LILAC: + Points: 1 + LILY_PAD: + Points: 5 + LIME_BANNER: + Points: 2 + LIME_BED: + Points: 6 + LIME_CARPET: + Points: 1 + LIME_CONCRETE: + Points: 3 + LIME_CONCRETE_POWDER: + Points: 2 + LIME_GLAZED_TERRACOTTA: + Points: 5 + LIME_SHULKER_BOX: + Points: 11 + LIME_STAINED_GLASS: + Points: 2 + LIME_STAINED_GLASS_PANE: + Points: 1 + LIME_TERRACOTTA: + Points: 2 + LIME_WALL_BANNER: + Points: 2 + LIME_WOOL: + Points: 2 + MAGENTA_BANNER: + Points: 2 + MAGENTA_BED: + Points: 6 + MAGENTA_CARPET: + Points: 1 + MAGENTA_CONCRETE: + Points: 3 + MAGENTA_CONCRETE_POWDER: + Points: 2 + MAGENTA_GLAZED_TERRACOTTA: + Points: 5 + MAGENTA_SHULKER_BOX: + Points: 11 + MAGENTA_STAINED_GLASS: + Points: 2 + MAGENTA_STAINED_GLASS_PANE: + Points: 1 + MAGENTA_TERRACOTTA: + Points: 2 + MAGENTA_WALL_BANNER: + Points: 2 + MAGENTA_WOOL: + Points: 2 + MAGMA_BLOCK: + Points: 1 + MELON: + Points: 1 + MELON_STEM: + Points: 1 + MOSSY_COBBLESTONE: + Points: 1 + MOSSY_COBBLESTONE_WALL: + Points: 1 + MOSSY_STONE_BRICKS: + Points: 2 + MOVING_PISTON: + Points: 1 + MUSHROOM_STEM: + Points: 1 + MYCELIUM: + Points: 5 + NETHERRACK: + Points: 1 + NETHER_BRICKS: + Points: 2 + NETHER_BRICK_FENCE: + Points: 2 + NETHER_BRICK_SLAB: + Points: 1 + NETHER_BRICK_STAIRS: + Points: 2 + NETHER_PORTAL: + Points: 1 + NETHER_QUARTZ_ORE: + Points: 1 + NETHER_WART: + Points: 1 + NETHER_WART_BLOCK: + Points: 2 + NOTE_BLOCK: + Points: 10 + OAK_BUTTON: + Points: 1 + OAK_DOOR: + Points: 2 + OAK_FENCE: + Points: 2 + OAK_FENCE_GATE: + Points: 4 + OAK_LEAVES: + Points: 0 OAK_LOG: - Points: 100 - ALLIUM: - Points: 30 \ No newline at end of file + Points: 0 + OAK_PLANKS: + Points: 1 + OAK_PRESSURE_PLATE: + Points: 2 + OAK_SAPLING: + Points: 1 + OAK_SLAB: + Points: 1 + OAK_STAIRS: + Points: 2 + OAK_TRAPDOOR: + Points: 3 + OAK_WOOD: + Points: 1 + OBSERVER: + Points: 1 + OBSIDIAN: + Points: 10 + ORANGE_BANNER: + Points: 2 + ORANGE_BED: + Points: 6 + ORANGE_CARPET: + Points: 1 + ORANGE_CONCRETE: + Points: 3 + ORANGE_CONCRETE_POWDER: + Points: 2 + ORANGE_GLAZED_TERRACOTTA: + Points: 5 + ORANGE_SHULKER_BOX: + Points: 11 + ORANGE_STAINED_GLASS: + Points: 2 + ORANGE_STAINED_GLASS_PANE: + Points: 1 + ORANGE_TERRACOTTA: + Points: 2 + ORANGE_TULIP: + Points: 1 + ORANGE_WALL_BANNER: + Points: 2 + ORANGE_WOOL: + Points: 2 + OXEYE_DAISY: + Points: 1 + PACKED_ICE: + Points: 5 + PEONY: + Points: 1 + PETRIFIED_OAK_SLAB: + Points: 1 + PINK_BANNER: + Points: 2 + PINK_BED: + Points: 6 + PINK_CARPET: + Points: 1 + PINK_CONCRETE: + Points: 3 + PINK_CONCRETE_POWDER: + Points: 2 + PINK_GLAZED_TERRACOTTA: + Points: 5 + PINK_SHULKER_BOX: + Points: 11 + PINK_STAINED_GLASS: + Points: 2 + PINK_STAINED_GLASS_PANE: + Points: 1 + PINK_TERRACOTTA: + Points: 2 + PINK_TULIP: + Points: 1 + PINK_WALL_BANNER: + Points: 2 + PINK_WOOL: + Points: 2 + PISTON: + Points: 2 + PISTON_HEAD: + Points: 1 + PLAYER_HEAD: + Points: 1 + PLAYER_WALL_HEAD: + Points: 1 + PODZOL: + Points: 2 + POLISHED_ANDESITE: + Points: 1 + POLISHED_DIORITE: + Points: 1 + POLISHED_GRANITE: + Points: 1 + POPPY: + Points: 1 + POTATOES: + Points: 1 + POTTED_ACACIA_SAPLING: + Points: 1 + POTTED_ALLIUM: + Points: 1 + POTTED_AZURE_BLUET: + Points: 1 + POTTED_BIRCH_SAPLING: + Points: 1 + POTTED_BLUE_ORCHID: + Points: 1 + POTTED_BROWN_MUSHROOM: + Points: 1 + POTTED_CACTUS: + Points: 1 + POTTED_DANDELION: + Points: 1 + POTTED_DARK_OAK_SAPLING: + Points: 1 + POTTED_DEAD_BUSH: + Points: 1 + POTTED_FERN: + Points: 1 + POTTED_JUNGLE_SAPLING: + Points: 1 + POTTED_OAK_SAPLING: + Points: 1 + POTTED_ORANGE_TULIP: + Points: 1 + POTTED_OXEYE_DAISY: + Points: 1 + POTTED_PINK_TULIP: + Points: 1 + POTTED_POPPY: + Points: 1 + POTTED_RED_MUSHROOM: + Points: 1 + POTTED_RED_TULIP: + Points: 1 + POTTED_SPRUCE_SAPLING: + Points: 1 + POTTED_WHITE_TULIP: + Points: 1 + POWERED_RAIL: + Points: 2 + PRISMARINE: + Points: 1 + PRISMARINE_BRICKS: + Points: 2 + PRISMARINE_BRICK_SLAB: + Points: 1 + PRISMARINE_BRICK_STAIRS: + Points: 2 + PRISMARINE_SLAB: + Points: 1 + PRISMARINE_STAIRS: + Points: 2 + PUMPKIN: + Points: 1 + PUMPKIN_STEM: + Points: 1 + PURPLE_BANNER: + Points: 2 + PURPLE_BED: + Points: 6 + PURPLE_CARPET: + Points: 1 + PURPLE_CONCRETE: + Points: 3 + PURPLE_CONCRETE_POWDER: + Points: 2 + PURPLE_GLAZED_TERRACOTTA: + Points: 5 + PURPLE_SHULKER_BOX: + Points: 11 + PURPLE_STAINED_GLASS: + Points: 2 + PURPLE_STAINED_GLASS_PANE: + Points: 1 + PURPLE_TERRACOTTA: + Points: 2 + PURPLE_WALL_BANNER: + Points: 2 + PURPLE_WOOL: + Points: 2 + PURPUR_BLOCK: + Points: 1 + PURPUR_PILLAR: + Points: 1 + PURPUR_SLAB: + Points: 1 + PURPUR_STAIRS: + Points: 2 + QUARTZ_BLOCK: + Points: 1 + QUARTZ_PILLAR: + Points: 1 + QUARTZ_SLAB: + Points: 1 + QUARTZ_STAIRS: + Points: 2 + RAIL: + Points: 1 + REDSTONE_BLOCK: + Points: 10 + REDSTONE_LAMP: + Points: 10 + REDSTONE_ORE: + Points: 1 + REDSTONE_TORCH: + Points: 5 + REDSTONE_WALL_TORCH: + Points: 5 + REDSTONE_WIRE: + Points: 1 + RED_BED: + Points: 6 + RED_CARPET: + Points: 1 + RED_CONCRETE: + Points: 3 + RED_CONCRETE_POWDER: + Points: 2 + RED_GLAZED_TERRACOTTA: + Points: 5 + RED_MUSHROOM: + Points: 1 + RED_MUSHROOM_BLOCK: + Points: + RED_NETHER_BRICKS: + Points: 2 + RED_SAND: + Points: 1 + RED_SANDSTONE: + Points: 1 + RED_SANDSTONE_SLAB: + Points: 1 + RED_SANDSTONE_STAIRS: + Points: 2 + RED_SHULKER_BOX: + Points: 11 + RED_STAINED_GLASS: + Points: 2 + RED_STAINED_GLASS_PANE: + Points: 1 + RED_TERRACOTTA: + Points: 2 + RED_TULIP: + Points: 1 + RED_WALL_BANNER: + Points: 2 + RED_WOOL: + Points: 1 + REPEATER: + Points: 6 + REPEATING_COMMAND_BLOCK: + Points: 0 + ROSE_BUSH: + Points: 1 + SAND: + Points: 1 + SANDSTONE: + Points: 1 + SANDSTONE_SLAB: + Points: 1 + SANDSTONE_STAIRS: + Points: 2 + SEAGRASS: + Points: 1 + SEA_LANTERN: + Points: 9 + SEA_PICKLE: + Points: 1 + SHULKER_BOX: + Points: 10 + SIGN: + Points: 6 + SKELETON_SKULL: + Points: 10 + SKELETON_WALL_SKULL: + Points: 10 + SLIME_BLOCK: + Points: 10 + SMOOTH_QUARTZ: + Points: 1 + SMOOTH_RED_SANDSTONE: + Points: 1 + SMOOTH_SANDSTONE: + Points: 1 + SMOOTH_STONE: + Points: 1 + SNOW: + Points: 1 + SNOW_BLOCK: + Points: 1 + SOUL_SAND: + Points: 1 + SPAWNER: + Points: 10 + SPONGE: + Points: 10 + SPRUCE_BUTTON: + Points: 1 + SPRUCE_DOOR: + Points: 2 + SPRUCE_FENCE: + Points: 2 + SPRUCE_FENCE_GATE: + Points: 4 + SPRUCE_LEAVES: + Points: 0 + SPRUCE_LOG: + Points: 0 + SPRUCE_PLANKS: + Points: 1 + SPRUCE_PRESSURE_PLATE: + Points: 2 + SPRUCE_SAPLING: + Points: 1 + SPRUCE_SLAB: + Points: 1 + SPRUCE_STAIRS: + Points: 2 + SPRUCE_TRAPDOOR: + Points: 3 + SPRUCE_WOOD: + Points: 1 + STICKY_PISTON: + Points: 1 + STONE: + Points: 1 + STONE_BRICKS: + Points: 2 + STONE_BRICK_SLAB: + Points: 1 + STONE_BRICK_STAIRS: + Points: 2 + STONE_BUTTON: + Points: 1 + STONE_PRESSURE_PLATE: + Points: 2 + STONE_SLAB: + Points: 1 + STRIPPED_ACACIA_LOG: + Points: 0 + STRIPPED_ACACIA_WOOD: + Points: 1 + STRIPPED_BIRCH_LOG: + Points: 0 + STRIPPED_BIRCH_WOOD: + Points: 1 + STRIPPED_DARK_OAK_LOG: + Points: 0 + STRIPPED_DARK_OAK_WOOD: + Points: 1 + STRIPPED_JUNGLE_LOG: + Points: 0 + STRIPPED_JUNGLE_WOOD: + Points: 1 + STRIPPED_OAK_LOG: + Points: 0 + STRIPPED_OAK_WOOD: + Points: 1 + STRIPPED_SPRUCE_LOG: + Points: 0 + STRIPPED_SPRUCE_WOOD: + Points: 1 + SUGAR_CANE: + Points: 1 + SUNFLOWER: + Points: 1 + TALL_GRASS: + Points: 1 + TALL_SEAGRASS: + Points: 1 + TERRACOTTA: + Points: 2 + TNT: + Points: 5 + TORCH: + Points: 1 + TRAPPED_CHEST: + Points: 10 + TRIPWIRE: + Points: 2 + TRIPWIRE_HOOK: + Points: 2 + TUBE_CORAL: + Points: 1 + TUBE_CORAL_BLOCK: + Points: 1 + TUBE_CORAL_FAN: + Points: 1 + TUBE_CORAL_WALL_FAN: + Points: 1 + TURTLE_EGG: + Points: 1 + VINE: + Points: 1 + VOID_AIR: + Points: 0 + WALL_SIGN: + Points: 6 + WALL_TORCH: + Points: 1 + WATER: + Points: 0 + WET_SPONGE: + Points: 10 + WHEAT: + Points: 1 + WHITE_BANNER: + Points: 2 + WHITE_BED: + Points: 6 + WHITE_CARPET: + Points: 1 + WHITE_CONCRETE: + Points: 3 + WHITE_CONCRETE_POWDER: + Points: 2 + WHITE_GLAZED_TERRACOTTA: + Points: 5 + WHITE_SHULKER_BOX: + Points: 11 + WHITE_STAINED_GLASS: + Points: 2 + WHITE_STAINED_GLASS_PANE: + Points: 1 + WHITE_TERRACOTTA: + Points: 2 + WHITE_TULIP: + Points: 1 + WHITE_WALL_BANNER: + Points: 2 + WHITE_WOOL: + Points: 3 + WITHER_SKELETON_SKULL: + Points: 10 + WITHER_SKELETON_WALL_SKULL: + Points: 10 + YELLOW_BANNER: + Points: 2 + YELLOW_BED: + Points: 6 + YELLOW_CARPET: + Points: 1 + YELLOW_CONCRETE: + Points: 2 + YELLOW_CONCRETE_POWDER: + Points: 2 + YELLOW_GLAZED_TERRACOTTA: + Points: 5 + YELLOW_SHULKER_BOX: + Points: 11 + YELLOW_STAINED_GLASS: + Points: 2 + YELLOW_STAINED_GLASS_PANE: + Points: 1 + YELLOW_TERRACOTTA: + Points: 2 + YELLOW_WALL_BANNER: + Points: 2 + YELLOW_WOOL: + Points: 2 + ZOMBIE_HEAD: + Points: 1 + ZOMBIE_WALL_HEAD: + Points: 1 \ No newline at end of file diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index be77425a..26f56261 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,6 +1,6 @@ -name: SkyBlock +name: FabledSkyBlock main: me.goodandevil.skyblock.SkyBlock -version: 59 +version: 62 api-version: 1.13 description: A unique SkyBlock plugin author: GoodAndEvil @@ -10,4 +10,7 @@ loadbefore: [Multiverse-Core] commands: island: description: Island command - aliases: [is] \ No newline at end of file + aliases: [is] + + skyblock: + description: Skyblock info command. \ No newline at end of file