diff --git a/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/command/admin/PurgeCommand.java b/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/command/admin/PurgeCommand.java index ac6c958da..3a3fa5ad7 100644 --- a/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/command/admin/PurgeCommand.java +++ b/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/command/admin/PurgeCommand.java @@ -23,7 +23,7 @@ public class PurgeCommand extends AbstractCommand { private String days = null; public PurgeCommand(uSkyBlock plugin) { - super("purge", "usb.admin.purge", "time-in-days|stop ?force", tr("purges all abandoned islands")); + super("purge", "usb.admin.purge", "time-in-days|stop ?level ?force", tr("purges all abandoned islands")); this.plugin = plugin; } @@ -38,27 +38,34 @@ public boolean execute(final CommandSender sender, String alias, Map 1 && args[1].equalsIgnoreCase("force"); + double purgeLevel = plugin.getConfig().getDouble("options.advanced.purgeLevel", 10); + if (args.length > 1 && args[1].matches("[0-9]+([.,][0-9]+)?")) { + try { + purgeLevel = Double.parseDouble(args[1]); + } catch (NumberFormatException e) { + sender.sendMessage(tr("\u00a74The level must be a valid number")); + return false; + } + } + final boolean force = args[args.length-1].equalsIgnoreCase("force"); + final int time = Integer.parseInt(days, 10) * 24; - sender.sendMessage(tr("\u00a7eFinding all islands that has been abandoned for more than {0} days.", args[0])); - scanTask = new PurgeScanTask(plugin, plugin.directoryIslands, time, sender, new Runnable() { - @Override - public void run() { - if (force) { - doPurge(sender); - } else { - int timeout = plugin.getConfig().getInt("options.advanced.purgeTimeout", 600000); - sender.sendMessage(tr("\u00a74PURGE:\u00a7e Repeat the command within {0} to accept.", TimeUtil.millisAsString(timeout))); - new BukkitRunnable() { - @Override - public void run() { - if (scanTask.isActive()) { - sender.sendMessage("\u00a77purge timed out"); - scanTask.stop(); - } + sender.sendMessage(tr("\u00a7eFinding all islands that has been abandoned for more than {0} days below level {1}", args[0], purgeLevel)); + scanTask = new PurgeScanTask(plugin, plugin.directoryIslands, time, purgeLevel, sender, () -> { + if (force) { + doPurge(sender); + } else { + int timeout = plugin.getConfig().getInt("options.advanced.purgeTimeout", 600000); + sender.sendMessage(tr("\u00a74PURGE:\u00a7e Repeat the command within {0} to accept.", TimeUtil.millisAsString(timeout))); + new BukkitRunnable() { + @Override + public void run() { + if (scanTask.isActive()) { + sender.sendMessage("\u00a77purge timed out"); + scanTask.stop(); } - }.runTaskLaterAsynchronously(plugin, TimeUtil.millisAsTicks(timeout)); - } + } + }.runTaskLaterAsynchronously(plugin, TimeUtil.millisAsTicks(timeout)); } }); scanTask.runTaskAsynchronously(plugin); diff --git a/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/command/admin/RegisterIslandToPlayerCommand.java b/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/command/admin/RegisterIslandToPlayerCommand.java index bbe199f18..a95b215a8 100644 --- a/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/command/admin/RegisterIslandToPlayerCommand.java +++ b/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/command/admin/RegisterIslandToPlayerCommand.java @@ -26,9 +26,9 @@ public boolean execute(final CommandSender sender, String alias, Map(Arrays.asList(islandList)); purgeList = new ArrayList<>(); - purgeLevel = plugin.getConfig().getDouble("options.advanced.purgeLevel", 10); + this.purgeLevel = purgeLevel; int feedbackEvery = plugin.getConfig().getInt("async.long.feedbackEvery", 30000); tStart = System.currentTimeMillis(); tracker = new ProgressTracker(sender, marktr("\u00a77- SCANNING: {0,number,##}% ({1}/{2} failed: {3}) ~ {4}"), 25, feedbackEvery); diff --git a/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/event/ToolMenuEvents.java b/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/event/ToolMenuEvents.java index 2a470c622..41648f4d5 100644 --- a/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/event/ToolMenuEvents.java +++ b/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/event/ToolMenuEvents.java @@ -1,5 +1,6 @@ package us.talabrek.ultimateskyblock.event; +import dk.lockfuglsang.minecraft.util.ItemStackUtil; import org.bukkit.GameMode; import org.bukkit.Material; import org.bukkit.configuration.ConfigurationSection; @@ -12,7 +13,6 @@ import org.bukkit.inventory.ItemStack; import us.talabrek.ultimateskyblock.challenge.Challenge; import us.talabrek.ultimateskyblock.uSkyBlock; -import dk.lockfuglsang.minecraft.util.ItemStackUtil; import java.util.HashMap; import java.util.Map; @@ -69,6 +69,7 @@ public void onBlockHit(PlayerInteractEvent e) { if (!plugin.isSkyAssociatedWorld(player.getWorld()) || !isTool(e.getItem())) { return; } + // We are in a skyworld, a block has been hit, with the tool Material block = e.getClickedBlock().getType(); short data = e.getClickedBlock().getData(); diff --git a/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/handler/WorldEditHandler.java b/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/handler/WorldEditHandler.java index 21a1430ec..23e9dcd02 100644 --- a/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/handler/WorldEditHandler.java +++ b/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/handler/WorldEditHandler.java @@ -51,21 +51,20 @@ public static WorldEditPlugin getWorldEdit() { public static void loadIslandSchematic(final File file, final Location origin, PlayerPerk playerPerk) { log.finer("Trying to load schematic " + file); - try (InputStream in = new BufferedInputStream(new FileInputStream(file))) { - boolean noAir = false; - boolean entities = true; - Vector to = new Vector(origin.getBlockX(), origin.getBlockY(), origin.getBlockZ()); - EditSession editSession = WorldEdit.getInstance().getEditSessionFactory().getEditSession(new BukkitWorld(origin.getWorld()), -1); - try { - SchematicFormat.getFormat(file) - .load(file) - .paste(editSession, to, noAir, entities); - editSession.flushQueue(); - } catch (MaxChangedBlocksException | IOException | DataException e) { - log.log(Level.INFO, "Unable to paste schematic " + file, e); - } - } catch (IOException e) { - LogUtil.log(Level.WARNING, "Unable to load schematic " + file, e); + if (file == null || !file.exists() || !file.canRead()) { + LogUtil.log(Level.WARNING, "Unable to load schematic " + file); + } + boolean noAir = false; + boolean entities = true; + Vector to = new Vector(origin.getBlockX(), origin.getBlockY(), origin.getBlockZ()); + EditSession editSession = WorldEdit.getInstance().getEditSessionFactory().getEditSession(new BukkitWorld(origin.getWorld()), -1); + try { + SchematicFormat.getFormat(file) + .load(file) + .paste(editSession, to, noAir, entities); + editSession.flushQueue(); + } catch (MaxChangedBlocksException | IOException | DataException e) { + log.log(Level.INFO, "Unable to paste schematic " + file, e); } } diff --git a/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/island/IslandGenerator.java b/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/island/IslandGenerator.java index 61aa948aa..31536e3d5 100644 --- a/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/island/IslandGenerator.java +++ b/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/island/IslandGenerator.java @@ -1,6 +1,7 @@ package us.talabrek.ultimateskyblock.island; import dk.lockfuglsang.minecraft.file.FileUtil; +import dk.lockfuglsang.minecraft.util.ItemStackUtil; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.Material; @@ -14,30 +15,27 @@ import us.talabrek.ultimateskyblock.player.Perk; import us.talabrek.ultimateskyblock.player.PlayerPerk; import us.talabrek.ultimateskyblock.uSkyBlock; -import dk.lockfuglsang.minecraft.util.ItemStackUtil; import us.talabrek.ultimateskyblock.util.LocationUtil; import java.io.File; import java.io.FilenameFilter; import java.io.IOException; import java.io.InputStream; +import java.net.URL; +import java.security.CodeSource; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; +import java.util.zip.ZipEntry; +import java.util.zip.ZipInputStream; /** * The factory for creating islands (actual blocks). */ @SuppressWarnings("deprecation") public class IslandGenerator { - private static final List USB_SCHEMATICS = Arrays.asList( - "uSkyBlockNether", - "default", - "skySMP" - ); private static final Logger log = Logger.getLogger(IslandGenerator.class.getName()); private final File[] schemFiles; private final File netherSchematic; @@ -49,14 +47,27 @@ public IslandGenerator(File dataFolder, final FileConfiguration config) { directorySchematics.mkdir(); } netherSchematic = new File(directorySchematics, config.getString("nether.schematicName", "uSkyBlockNether") + ".schematic"); - for (String schem : USB_SCHEMATICS) { - File f = new File(directorySchematics, schem + ".schematic"); - if (!f.exists()) { - try (InputStream inputStream = uSkyBlock.class.getClassLoader().getResourceAsStream("schematics/" + schem + ".schematic")) { - FileUtil.copy(inputStream, f); - } catch (IOException e) { - log.log(Level.WARNING, "Unable to load schematic " + schem, e); + CodeSource codeSource = getClass().getProtectionDomain().getCodeSource(); + if (codeSource != null) { + URL jar = codeSource.getLocation(); + try (ZipInputStream zin = new ZipInputStream(jar.openStream())) { + ZipEntry entry = null; + while ((entry = zin.getNextEntry()) != null) { + String prefix = "schematics/"; + if (entry.getName().startsWith(prefix) && entry.getName().endsWith(".schematic")) { + File f = new File(directorySchematics + File.separator + entry.getName().substring(prefix.length())); + if (!f.exists()) { + try (InputStream inputStream = uSkyBlock.class.getClassLoader().getResourceAsStream(entry.getName())) { + FileUtil.copy(inputStream, f); + } catch (IOException e) { + log.log(Level.WARNING, "Unable to load schematic " + entry.getName(), e); + } + } + } + zin.closeEntry(); } + } catch (IOException e) { + log.log(Level.WARNING, "Unable to find schematics in jar", e); } } this.schemFiles = directorySchematics.listFiles(new FilenameFilter() { diff --git a/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/menu/SkyBlockMenu.java b/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/menu/SkyBlockMenu.java index bdfe6ee3b..9b1593073 100644 --- a/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/menu/SkyBlockMenu.java +++ b/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/menu/SkyBlockMenu.java @@ -454,7 +454,7 @@ private Inventory createInitMenu(Player player) { int menuSize = (int) Math.ceil(getMaxSchemeIndex(schemeNames) / 9d)*9; Inventory menu = Bukkit.createInventory(null, menuSize, "\u00a79" + tr("Island Create Menu")); List lores = new ArrayList<>(); - ItemStack menuItem = new ItemStack(Material.GRASS, 1); + ItemStack menuItem = new ItemStack(Material.SAPLING, 1); ItemMeta meta = menuItem.getItemMeta(); meta.setDisplayName(tr("\u00a7a\u00a7lStart an Island")); addLore(lores, "\u00a7f", tr("Start your skyblock journey\nby starting your own island.\nComplete challenges to earn\nitems and skybucks to help\nexpand your skyblock. You can\ninvite others to join in\nbuilding your island empire!\n\u00a7e\u00a7lClick here to start!")); @@ -463,7 +463,7 @@ private Inventory createInitMenu(Player player) { menu.addItem(menuItem); lores.clear(); - if (plugin.getConfig().getBoolean("island-schemes-enabled", true)) { + if (plugin.getConfig().getBoolean("island-schemes-enabled", true) && schemeNames.size() > 1) { int index = 1; for (String schemeName : schemeNames) { IslandPerk islandPerk = plugin.getPerkLogic().getIslandPerk(schemeName); @@ -478,7 +478,6 @@ private Inventory createInitMenu(Player player) { if (lores == null) { lores = new ArrayList<>(); } - // TODO: 30/01/2016 - R4zorax: Add the extra items? if (player.hasPermission(islandPerk.getPermission())) { addLore(lores, tr("\u00a7aClick to create!")); } else { @@ -490,6 +489,15 @@ private Inventory createInitMenu(Player player) { } } + lores.clear(); + menuItem = new ItemStack(Material.GRASS, 1); + meta = menuItem.getItemMeta(); + meta.setDisplayName(tr("\u00a7a\u00a7lReturn to Spawn")); + addLore(lores, "\u00a7f", tr("Teleport to the spawn area.")); + meta.setLore(lores); + menuItem.setItemMeta(meta); + menu.setItem(menuSize-2, menuItem); + lores.clear(); menuItem = new ItemStack(Material.SKULL_ITEM, 1, (short) 3); final SkullMeta meta2 = (SkullMeta) menuItem.getItemMeta(); @@ -511,7 +519,7 @@ private int getMaxSchemeIndex(List schemeNames) { index++; } } - return index + 2; + return index + 3; } private Inventory createMainMenu(Player player) { @@ -627,6 +635,15 @@ private Inventory createMainMenu(Player player) { menu.addItem(menuItem); lores.clear(); + menuItem = new ItemStack(Material.GRASS, 1); + meta4 = menuItem.getItemMeta(); + meta4.setDisplayName(tr("\u00a7a\u00a7lReturn to Spawn")); + addLore(lores, "\u00a7f", tr("Teleport to the spawn area.")); + meta4.setLore(lores); + menuItem.setItemMeta(meta4); + menu.addItem(menuItem); + lores.clear(); + menuItem = new ItemStack(Material.BOOK_AND_QUILL, 1); meta4 = menuItem.getItemMeta(); meta4.setDisplayName(tr("\u00a7a\u00a7lIsland Log")); @@ -636,7 +653,7 @@ private Inventory createMainMenu(Player player) { menu.setItem(8, menuItem); // Last item, first line lores.clear(); - menuItem = new ItemStack(Material.BED, 1); + menuItem = new ItemStack(Material.BED, 1, (short)14); // red bed meta4 = menuItem.getItemMeta(); meta4.setDisplayName(tr("\u00a7a\u00a7lChange Home Location")); addLore(lores, "\u00a7f", tr("When you teleport to your\nisland you will be taken to\nthis location.\n\u00a7e\u00a7lClick here to change.")); @@ -762,6 +779,9 @@ private void onClickCreateMenu(InventoryClickEvent event, Player p, ItemMeta met if (slotIndex == 0) { p.closeInventory(); p.performCommand("island create"); + } else if (slotIndex == menuSize-2) { + p.closeInventory(); + p.performCommand("island spawn"); } else if (slotIndex == menuSize-1) { p.closeInventory(); p.performCommand("island accept"); @@ -793,6 +813,9 @@ private void onClickMainMenu(InventoryClickEvent event, ItemStack currentItem, P p.closeInventory(); p.performCommand("island sethome"); p.performCommand("island"); + } else if (currentItem.getType() == Material.GRASS) { + p.closeInventory(); + p.performCommand("island spawn"); } else if (currentItem.getType() == Material.HOPPER) { p.closeInventory(); p.performCommand("island setwarp"); diff --git a/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/player/PerkLogic.java b/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/player/PerkLogic.java index 3a9395cd2..79fda539e 100644 --- a/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/player/PerkLogic.java +++ b/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/player/PerkLogic.java @@ -63,7 +63,7 @@ public PerkLogic(uSkyBlock plugin, IslandGenerator islandGenerator) { .extraItems(ItemStackUtil.createItemList(config.getString("extraItems", null), config.getStringList("extraItems"))) .build(); ItemStack itemStack = ItemStackUtil.createItemStack( - config.getString("displayItem", "GRASS"), + config.getString("displayItem", "SAPLING"), schemeName, config.getString("description", null) ); @@ -75,7 +75,7 @@ public PerkLogic(uSkyBlock plugin, IslandGenerator islandGenerator) { Perk perk = new PerkBuilder(defaultPerk).schematics(schemeName).build(); if (!islandPerks.containsKey(schemeName)) { islandPerks.put(schemeName, new IslandPerk(schemeName, "usb.schematic." + schemeName, - ItemStackUtil.createItemStack("GRASS", schemeName, null), perk, + ItemStackUtil.createItemStack("SAPLING", schemeName, null), perk, 1d, 0d)); } } diff --git a/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/player/TeleportLogic.java b/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/player/TeleportLogic.java index 9d5891e68..2ae252ca6 100644 --- a/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/player/TeleportLogic.java +++ b/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/player/TeleportLogic.java @@ -67,7 +67,7 @@ public void run() { public void spawnTeleport(final Player player, boolean force) { int delay = teleportDelay; final Location spawnLocation = LocationUtil.centerOnBlock(plugin.getWorld().getSpawnLocation()); - if (hasPermission(player, "usb.mod.bypassteleport") || (delay == 0) || force) { + if (player.hasPermission("usb.mod.bypassteleport") || (delay == 0) || force) { if (Settings.extras_sendToSpawn) { plugin.execCommand(player, "op:spawn", false); } else { diff --git a/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/signs/SignEvents.java b/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/signs/SignEvents.java index 5a080c820..56008715a 100644 --- a/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/signs/SignEvents.java +++ b/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/signs/SignEvents.java @@ -1,11 +1,13 @@ package us.talabrek.ultimateskyblock.signs; -import dk.lockfuglsang.minecraft.reflection.ReflectionUtil; +import dk.lockfuglsang.minecraft.util.FormatUtil; +import org.bukkit.GameMode; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.Chest; import org.bukkit.block.Sign; +import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; @@ -13,16 +15,12 @@ import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.block.SignChangeEvent; import org.bukkit.event.inventory.InventoryCloseEvent; -import org.bukkit.event.inventory.InventoryEvent; import org.bukkit.event.inventory.InventoryMoveItemEvent; import org.bukkit.event.player.PlayerInteractEvent; import us.talabrek.ultimateskyblock.uSkyBlock; - import java.util.logging.Logger; -import static dk.lockfuglsang.minecraft.perm.PermissionUtil.hasPermission; - /** * Handles USB Signs */ @@ -39,11 +37,13 @@ public SignEvents(uSkyBlock plugin, SignLogic logic) { @EventHandler(priority = EventPriority.HIGH) public void onPlayerHitSign(PlayerInteractEvent e) { if (e.isCancelled() + || e.getPlayer() == null || (e.getAction() != Action.RIGHT_CLICK_BLOCK && e.getAction() != Action.LEFT_CLICK_BLOCK) - || e.getClickedBlock() == null || e.getClickedBlock().getType() != Material.WALL_SIGN + || e.getClickedBlock() == null + || e.getClickedBlock().getType() != Material.WALL_SIGN || !(e.getClickedBlock().getState() instanceof Sign) || !e.getPlayer().hasPermission("usb.island.signs.use") - || e.getPlayer() == null || !plugin.isSkyAssociatedWorld(e.getPlayer().getWorld()) + || !plugin.isSkyAssociatedWorld(e.getPlayer().getWorld()) || !(plugin.playerIsOnOwnIsland(e.getPlayer())) ) { return; @@ -61,7 +61,7 @@ public void onSignChanged(SignChangeEvent e) { || !plugin.isSkyAssociatedWorld(e.getPlayer().getWorld()) || !e.getLines()[0].equalsIgnoreCase("[usb]") || e.getLines()[1].trim().isEmpty() - || !hasPermission(e.getPlayer(), "usb.island.signs.place") + || !e.getPlayer().hasPermission("usb.island.signs.place") || !(e.getBlock().getType() == Material.WALL_SIGN) || !(e.getBlock().getState() instanceof Sign) ) { @@ -117,10 +117,38 @@ public void onSignOrChestBreak(BlockBreakEvent e) { ) { return; } - if (e.getBlock().getType() == Material.SIGN) { + if (e.getBlock().getType() == Material.WALL_SIGN) { logic.removeSign(e.getBlock().getLocation()); } else { logic.removeChest(e.getBlock().getLocation()); } } + + private boolean isSign(Material material) { + return material == Material.WALL_SIGN || material == Material.SIGN_POST; + } + + @EventHandler(priority = EventPriority.LOW) + public void onBlockHit(PlayerInteractEvent e) { + Player player = e.getPlayer(); + if (e.isCancelled() + || e.getPlayer() == null + || e.getClickedBlock() == null + || e.getAction() != Action.RIGHT_CLICK_BLOCK + || e.getPlayer().getGameMode() != GameMode.SURVIVAL + || !isSign(e.getClickedBlock().getType()) + || !player.hasPermission("usb.island.signs.use") + || !plugin.isSkyAssociatedWorld(player.getWorld())) { + return; + } + + if (e.getClickedBlock().getState() instanceof Sign) { + Sign sign = (Sign) e.getClickedBlock().getState(); + String firstLine = FormatUtil.stripFormatting(sign.getLine(0)).trim(); + if (firstLine.startsWith("/")) { + e.setCancelled(true); + player.performCommand(firstLine.substring(1)); + } + } + } } diff --git a/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/uSkyBlock.java b/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/uSkyBlock.java index 49079e342..a3480f2c6 100644 --- a/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/uSkyBlock.java +++ b/uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/uSkyBlock.java @@ -331,6 +331,7 @@ public void registerEvents() { } if (getConfig().getBoolean("signs.enabled", true)) { manager.registerEvents(new SignEvents(this, new SignLogic(this)), this); + manager.registerEvents(new SignEvents(this, new SignLogic(this)), this); } PlaceholderHandler.register(this); manager.registerEvents(new ChatEvents(chatLogic), this); @@ -365,15 +366,24 @@ private void setupWorld(World world, int island_height) { } Location worldSpawn = world.getSpawnLocation(); if (!isSafeLocation(worldSpawn)) { - Block spawnBlock = world.getBlockAt(worldSpawn).getRelative(BlockFace.DOWN); - spawnBlock.setType(Material.BEDROCK); - Block air1 = spawnBlock.getRelative(BlockFace.UP); - air1.setType(Material.AIR); - air1.getRelative(BlockFace.UP).setType(Material.AIR); + createSpawn(world, worldSpawn); } } } + private void createSpawn(World world, Location worldSpawn) { + File spawnSchematic = new File(getDataFolder() + File.separator + "schematics" + File.separator + "spawn.schematic"); + if (getConfig().getInt("options.general.spawnSize", 0) > 32 && spawnSchematic.exists()) { + AsyncWorldEditHandler.loadIslandSchematic(spawnSchematic, worldSpawn, null); + } else { + Block spawnBlock = world.getBlockAt(worldSpawn).getRelative(BlockFace.DOWN); + spawnBlock.setType(Material.GOLD_BLOCK); + Block air1 = spawnBlock.getRelative(BlockFace.UP); + air1.setType(Material.AIR); + air1.getRelative(BlockFace.UP).setType(Material.AIR); + } + } + public static World getSkyBlockWorld() { return getInstance().getWorld(); } @@ -560,30 +570,12 @@ private boolean validEntity(Entity entity) { (entity.getFallDistance() == 0 && !(entity instanceof Monster)); } - public Location findBedrockLocation(final Location l) { - final int px = l.getBlockX(); - final int py = l.getBlockY(); - final int pz = l.getBlockZ(); - World world = l.getWorld(); - for (int x = -10; x <= 10; ++x) { - for (int y = -30; y <= 30; ++y) { - for (int z = -10; z <= 10; ++z) { - final Block b = world.getBlockAt(px + x, py + y, pz + z); - if (b.getType() == Material.BEDROCK) { - return new Location(world, px + x, py + y, pz + z); - } - } - } - } - return null; - } - public synchronized boolean devSetPlayerIsland(final Player sender, final Location l, final String player) { final PlayerInfo pi = playerLogic.getPlayerInfo(player); String islandName = WorldGuardHandler.getIslandNameAt(l); Location islandLocation = IslandUtil.getIslandLocation(islandName); - final Location newLoc = islandLocation != null ? islandLocation : findBedrockLocation(l); + final Location newLoc = islandLocation; if (newLoc == null) { return false; } @@ -756,7 +748,6 @@ public boolean hasIsland(final Player player) { public boolean islandAtLocation(final Location loc) { return ((WorldGuardHandler.getIntersectingRegions(loc).size() > 0) - //|| (findBedrockLocation(loc) != null) || islandLogic.hasIsland(loc) ); diff --git a/uSkyBlock-Core/src/main/po/cs.po b/uSkyBlock-Core/src/main/po/cs.po index 1b99c5159..c8cc5a599 100644 --- a/uSkyBlock-Core/src/main/po/cs.po +++ b/uSkyBlock-Core/src/main/po/cs.po @@ -766,9 +766,14 @@ msgstr "Ocista vsech zapomenutych ostrovu." msgid "§4You must provide the age in days to purge!" msgstr "§4Napis pocet dnu kdy se stane sirotkem!" +msgid "§4The level must be a valid number" +msgstr "" + #, java-format -msgid "§eFinding all islands that has been abandoned for more than {0} days." -msgstr "§eVyhledavam vsechny sirotky starsi : {0} dnu." +msgid "" +"§eFinding all islands that has been abandoned for more than {0} days below " +"level {1}" +msgstr "" #, java-format msgid "§4PURGE:§e Repeat the command within {0} to accept." @@ -824,11 +829,11 @@ msgid "set a player's island to your location" msgstr "Nastavi hracuv ostrov do vasi aktualni polohy." #, java-format -msgid "§aSet {0}'s island to the bedrock nearest you." -msgstr "§aNastav {0} ostrov na nejblizsi bedrock ve tvem okoli." +msgid "§aSet {0}'s island to the current island." +msgstr "" -msgid "§4Bedrock not found: unable to set the island!" -msgstr "§4Zadny bedrock nenalezen: nelze nastavit ostrov!" +msgid "§4Island not found: unable to set the island!" +msgstr "" msgid "reload configuration from file." msgstr "Nacitam konfigurace ze souboru." @@ -1230,7 +1235,7 @@ msgid "Score Count Block" msgstr "Skore poctu bloku" #, java-format -msgid "{0,number,#####.##} {1,number,#} {2}" +msgid "{0,number,00.00} {1,number,#} {2}" msgstr "" #, java-format @@ -2412,6 +2417,12 @@ msgstr "" "§cNemas pristup!\n" "§7({0})" +msgid "§a§lReturn to Spawn" +msgstr "" + +msgid "Teleport to the spawn area." +msgstr "" + msgid "§a§lJoin an Island" msgstr "§a§lPripojil ses na ostrov" diff --git a/uSkyBlock-Core/src/main/po/da.po b/uSkyBlock-Core/src/main/po/da.po index 03e8a5706..3397013e8 100644 --- a/uSkyBlock-Core/src/main/po/da.po +++ b/uSkyBlock-Core/src/main/po/da.po @@ -766,9 +766,14 @@ msgstr "fjerner alle forladte øer" msgid "§4You must provide the age in days to purge!" msgstr "§4Do skal angive hvor gamle (i dage) øerne til purge skal være!" +msgid "§4The level must be a valid number" +msgstr "" + #, java-format -msgid "§eFinding all islands that has been abandoned for more than {0} days." -msgstr "§eMarkerer all øer, der har været inaktive i mere end {0} dage." +msgid "" +"§eFinding all islands that has been abandoned for more than {0} days below " +"level {1}" +msgstr "" #, java-format msgid "§4PURGE:§e Repeat the command within {0} to accept." @@ -825,11 +830,11 @@ msgid "set a player's island to your location" msgstr "tildeler øen til en spiller" #, java-format -msgid "§aSet {0}'s island to the bedrock nearest you." -msgstr "§aSatte {0}'s ø til det nærmeste grundfjeld." +msgid "§aSet {0}'s island to the current island." +msgstr "" -msgid "§4Bedrock not found: unable to set the island!" -msgstr "§4Intet grundfjeld fundet: Ikke istand til at sætte ø-ejerskab!" +msgid "§4Island not found: unable to set the island!" +msgstr "" msgid "reload configuration from file." msgstr "genindlæs konfigurationen fra fil." @@ -2426,6 +2431,12 @@ msgstr "" "§cIngen adgang!\n" "§7({0})" +msgid "§a§lReturn to Spawn" +msgstr "" + +msgid "Teleport to the spawn area." +msgstr "" + msgid "§a§lJoin an Island" msgstr "§a§lHjælp en eksisterende ø" diff --git a/uSkyBlock-Core/src/main/po/de.po b/uSkyBlock-Core/src/main/po/de.po index 0ca047c82..89687a1f1 100644 --- a/uSkyBlock-Core/src/main/po/de.po +++ b/uSkyBlock-Core/src/main/po/de.po @@ -776,9 +776,14 @@ msgstr "Löscht alle verlassenen Inseln" msgid "§4You must provide the age in days to purge!" msgstr "§4Du musst die Zeit für die Säuberung in Tagen angeben!" +msgid "§4The level must be a valid number" +msgstr "" + #, java-format -msgid "§eFinding all islands that has been abandoned for more than {0} days." -msgstr "§eSuche Inseln die mehr als {0} Tage verlassen sind." +msgid "" +"§eFinding all islands that has been abandoned for more than {0} days below " +"level {1}" +msgstr "" #, java-format msgid "§4PURGE:§e Repeat the command within {0} to accept." @@ -835,11 +840,11 @@ msgid "set a player's island to your location" msgstr "Setze die Insel eines Spielers an deine Position" #, java-format -msgid "§aSet {0}'s island to the bedrock nearest you." -msgstr "§aSetzte {0}'s Insel auf das Grundgestein in deiner Nähe." +msgid "§aSet {0}'s island to the current island." +msgstr "" -msgid "§4Bedrock not found: unable to set the island!" -msgstr "§4Grundgestein nicht gefunden: Nicht möglich die Insel zu setzen!" +msgid "§4Island not found: unable to set the island!" +msgstr "" msgid "reload configuration from file." msgstr "Lade die Einstellungen von einer Datei." @@ -1259,7 +1264,7 @@ msgid "Score Count Block" msgstr "Werte der Blöcke und deren Anzahl" #, java-format -msgid "{0,number,#####.##} {1,number,#} {2}" +msgid "{0,number,00.00} {1,number,#} {2}" msgstr "" #, java-format @@ -2452,6 +2457,12 @@ msgstr "" "§cKein Zugriff!\n" "§7({0})" +msgid "§a§lReturn to Spawn" +msgstr "" + +msgid "Teleport to the spawn area." +msgstr "" + msgid "§a§lJoin an Island" msgstr "§a§lTrete einer Insel bei" diff --git a/uSkyBlock-Core/src/main/po/en_GB.po b/uSkyBlock-Core/src/main/po/en_GB.po index e03aa2019..13b882e46 100644 --- a/uSkyBlock-Core/src/main/po/en_GB.po +++ b/uSkyBlock-Core/src/main/po/en_GB.po @@ -769,10 +769,14 @@ msgstr "purges all abandoned islands" msgid "§4You must provide the age in days to purge!" msgstr "§4* §7You must provide the age in days to purge!" +msgid "§4The level must be a valid number" +msgstr "" + #, java-format -msgid "§eFinding all islands that has been abandoned for more than {0} days." +msgid "" +"§eFinding all islands that has been abandoned for more than {0} days below " +"level {1}" msgstr "" -"§4* §7Finding all islands that has been abandoned for more than §c{0} §7days." #, java-format msgid "§4PURGE:§e Repeat the command within {0} to accept." @@ -828,11 +832,11 @@ msgid "set a player's island to your location" msgstr "set a player's island to your location" #, java-format -msgid "§aSet {0}'s island to the bedrock nearest you." -msgstr "§4* §7Set §6{0}'s §7island to the bedrock nearest you." +msgid "§aSet {0}'s island to the current island." +msgstr "" -msgid "§4Bedrock not found: unable to set the island!" -msgstr "§4* §7Bedrock not found: unable to set the island!" +msgid "§4Island not found: unable to set the island!" +msgstr "" msgid "reload configuration from file." msgstr "reload configuration from file." @@ -1240,7 +1244,7 @@ msgid "Score Count Block" msgstr "Score Count Block" #, java-format -msgid "{0,number,#####.##} {1,number,#} {2}" +msgid "{0,number,00.00} {1,number,#} {2}" msgstr "" #, java-format @@ -2453,6 +2457,12 @@ msgstr "" "§4 No access!\n" "§7({0})" +msgid "§a§lReturn to Spawn" +msgstr "" + +msgid "Teleport to the spawn area." +msgstr "" + msgid "§a§lJoin an Island" msgstr "§a§lJoin an Island" diff --git a/uSkyBlock-Core/src/main/po/es.po b/uSkyBlock-Core/src/main/po/es.po index 644ac11ed..8b9ddb8b3 100644 --- a/uSkyBlock-Core/src/main/po/es.po +++ b/uSkyBlock-Core/src/main/po/es.po @@ -767,10 +767,14 @@ msgstr "purga todas las islas abandonadas" msgid "§4You must provide the age in days to purge!" msgstr "§4¡Debes proporcionar la edad en días para purgar!" +msgid "§4The level must be a valid number" +msgstr "" + #, java-format -msgid "§eFinding all islands that has been abandoned for more than {0} days." +msgid "" +"§eFinding all islands that has been abandoned for more than {0} days below " +"level {1}" msgstr "" -"§eEncontrando todas las islas que fueron abandonadas por más de {0} días." #, java-format msgid "§4PURGE:§e Repeat the command within {0} to accept." @@ -826,11 +830,11 @@ msgid "set a player's island to your location" msgstr "establece la isla de un jugador a tu localización" #, java-format -msgid "§aSet {0}'s island to the bedrock nearest you." -msgstr "§aEstablecida la isla de {0} a la roca base más cercana a ti." +msgid "§aSet {0}'s island to the current island." +msgstr "" -msgid "§4Bedrock not found: unable to set the island!" -msgstr "§4No se encontró roca base: ¡incapaz de establecer la isla!" +msgid "§4Island not found: unable to set the island!" +msgstr "" msgid "reload configuration from file." msgstr "recargar la configuración de archivo." @@ -1230,7 +1234,7 @@ msgid "Score Count Block" msgstr "Recuento de Puntuación de Bloques" #, java-format -msgid "{0,number,#####.##} {1,number,#} {2}" +msgid "{0,number,00.00} {1,number,#} {2}" msgstr "" #, java-format @@ -2427,6 +2431,12 @@ msgid "" "§7({0})" msgstr "" +msgid "§a§lReturn to Spawn" +msgstr "" + +msgid "Teleport to the spawn area." +msgstr "" + msgid "§a§lJoin an Island" msgstr "§a§lUnirse a una Isla" diff --git a/uSkyBlock-Core/src/main/po/fr.po b/uSkyBlock-Core/src/main/po/fr.po index 9300dd618..7bb544730 100644 --- a/uSkyBlock-Core/src/main/po/fr.po +++ b/uSkyBlock-Core/src/main/po/fr.po @@ -769,9 +769,14 @@ msgstr "nettoyer toutes les îles abandonnés" msgid "§4You must provide the age in days to purge!" msgstr "§4Vous devez fournir un nombre en jour pour nettoyer !" +msgid "§4The level must be a valid number" +msgstr "" + #, java-format -msgid "§eFinding all islands that has been abandoned for more than {0} days." -msgstr "§eTrouver toutes les îles qui sont abandonnés dans les {0} jours." +msgid "" +"§eFinding all islands that has been abandoned for more than {0} days below " +"level {1}" +msgstr "" #, java-format msgid "§4PURGE:§e Repeat the command within {0} to accept." @@ -827,11 +832,11 @@ msgid "set a player's island to your location" msgstr "fixer l'île d'un joueur à votre position" #, java-format -msgid "§aSet {0}'s island to the bedrock nearest you." -msgstr "§aFixer l''île de {0} à la bedrock la plus proche de vous." +msgid "§aSet {0}'s island to the current island." +msgstr "" -msgid "§4Bedrock not found: unable to set the island!" -msgstr "§4Bedrock non trouvé : impossible de fixer cette île !" +msgid "§4Island not found: unable to set the island!" +msgstr "" msgid "reload configuration from file." msgstr "recharher la configuration à partir du fichier." @@ -1241,7 +1246,7 @@ msgid "Score Count Block" msgstr "Nombre de blocks" #, java-format -msgid "{0,number,#####.##} {1,number,#} {2}" +msgid "{0,number,00.00} {1,number,#} {2}" msgstr "" #, java-format @@ -2421,6 +2426,12 @@ msgstr "" "§cPas d''accès!\n" "§7({0})" +msgid "§a§lReturn to Spawn" +msgstr "" + +msgid "Teleport to the spawn area." +msgstr "" + msgid "§a§lJoin an Island" msgstr "§a§lRejoindre une île" diff --git a/uSkyBlock-Core/src/main/po/it.po b/uSkyBlock-Core/src/main/po/it.po index bf7e2a245..16eecc089 100644 --- a/uSkyBlock-Core/src/main/po/it.po +++ b/uSkyBlock-Core/src/main/po/it.po @@ -775,9 +775,14 @@ msgstr "ripulisce tutte le isole abbandonate" msgid "§4You must provide the age in days to purge!" msgstr "§4* §7Devi fornire l''età in giorni per ripulire!" +msgid "§4The level must be a valid number" +msgstr "" + #, java-format -msgid "§eFinding all islands that has been abandoned for more than {0} days." -msgstr "§4* §7Cercando tutte le isole abbandonate da più di §c{0} §7giorni." +msgid "" +"§eFinding all islands that has been abandoned for more than {0} days below " +"level {1}" +msgstr "" #, java-format msgid "§4PURGE:§e Repeat the command within {0} to accept." @@ -833,11 +838,11 @@ msgid "set a player's island to your location" msgstr "imposta un''isola del giocatore alla tua posizione" #, java-format -msgid "§aSet {0}'s island to the bedrock nearest you." -msgstr "§4* §7Impostata l''isola di §6{0} §7alla bedrock più vicina a te." +msgid "§aSet {0}'s island to the current island." +msgstr "" -msgid "§4Bedrock not found: unable to set the island!" -msgstr "§4* §7Bedrock non trovata: impossibile impostare l''isola!" +msgid "§4Island not found: unable to set the island!" +msgstr "" msgid "reload configuration from file." msgstr "ricarica la configurazione dal file." @@ -1253,7 +1258,7 @@ msgid "Score Count Block" msgstr "Blocco Conto Punteggi" #, java-format -msgid "{0,number,#####.##} {1,number,#} {2}" +msgid "{0,number,00.00} {1,number,#} {2}" msgstr "" #, java-format @@ -2479,6 +2484,12 @@ msgstr "" "§4 Nessun accesso!\n" "§7({0})" +msgid "§a§lReturn to Spawn" +msgstr "" + +msgid "Teleport to the spawn area." +msgstr "" + msgid "§a§lJoin an Island" msgstr "§a§lUnisciti ad un''Isola" diff --git a/uSkyBlock-Core/src/main/po/keys.pot b/uSkyBlock-Core/src/main/po/keys.pot index 3696d8cab..7ec85ae63 100644 --- a/uSkyBlock-Core/src/main/po/keys.pot +++ b/uSkyBlock-Core/src/main/po/keys.pot @@ -753,8 +753,13 @@ msgstr "" msgid "§4You must provide the age in days to purge!" msgstr "" +msgid "§4The level must be a valid number" +msgstr "" + #, java-format -msgid "§eFinding all islands that has been abandoned for more than {0} days." +msgid "" +"§eFinding all islands that has been abandoned for more than {0} days below " +"level {1}" msgstr "" #, java-format @@ -811,10 +816,10 @@ msgid "set a player's island to your location" msgstr "" #, java-format -msgid "§aSet {0}'s island to the bedrock nearest you." +msgid "§aSet {0}'s island to the current island." msgstr "" -msgid "§4Bedrock not found: unable to set the island!" +msgid "§4Island not found: unable to set the island!" msgstr "" msgid "reload configuration from file." @@ -1200,7 +1205,7 @@ msgid "Score Count Block" msgstr "" #, java-format -msgid "{0,number,#####.##} {1,number,#} {2}" +msgid "{0,number,00.00} {1,number,#} {2}" msgstr "" #, java-format @@ -2266,6 +2271,12 @@ msgid "" "§7({0})" msgstr "" +msgid "§a§lReturn to Spawn" +msgstr "" + +msgid "Teleport to the spawn area." +msgstr "" + msgid "§a§lJoin an Island" msgstr "" diff --git a/uSkyBlock-Core/src/main/po/ko.po b/uSkyBlock-Core/src/main/po/ko.po index 9ba72f9ae..25cd649b6 100644 --- a/uSkyBlock-Core/src/main/po/ko.po +++ b/uSkyBlock-Core/src/main/po/ko.po @@ -767,9 +767,14 @@ msgstr "모든 버려진 섬들을 청소합니다" msgid "§4You must provide the age in days to purge!" msgstr "§4당신은 청소하기위해 나이를 제공해야 합니다!" +msgid "§4The level must be a valid number" +msgstr "" + #, java-format -msgid "§eFinding all islands that has been abandoned for more than {0} days." -msgstr "§e{0}일 이상 버려진 모든 섬을 찾는 중 입니다." +msgid "" +"§eFinding all islands that has been abandoned for more than {0} days below " +"level {1}" +msgstr "" #, java-format msgid "§4PURGE:§e Repeat the command within {0} to accept." @@ -825,11 +830,11 @@ msgid "set a player's island to your location" msgstr "당신의 위치에 플레이어의 섬을 지정합니다" #, java-format -msgid "§aSet {0}'s island to the bedrock nearest you." -msgstr "§a당신의 근처의 기반에 {0}의 섬을 지정합니다." +msgid "§aSet {0}'s island to the current island." +msgstr "" -msgid "§4Bedrock not found: unable to set the island!" -msgstr "§4기반을 찾지 못했습니다: 섬 지정이 불가합니다!" +msgid "§4Island not found: unable to set the island!" +msgstr "" msgid "reload configuration from file." msgstr "파일로 부터 외형을 리로드합니다." @@ -1233,7 +1238,7 @@ msgid "Score Count Block" msgstr "점수 카운트 블록" #, java-format -msgid "{0,number,#####.##} {1,number,#} {2}" +msgid "{0,number,00.00} {1,number,#} {2}" msgstr "" #, java-format @@ -2427,6 +2432,12 @@ msgstr "" "§c엑세스 불가!\n" "§7({0})" +msgid "§a§lReturn to Spawn" +msgstr "" + +msgid "Teleport to the spawn area." +msgstr "" + msgid "§a§lJoin an Island" msgstr "§a§l섬에 참여하기" diff --git a/uSkyBlock-Core/src/main/po/nl.po b/uSkyBlock-Core/src/main/po/nl.po index dcc81ed02..393c4568e 100644 --- a/uSkyBlock-Core/src/main/po/nl.po +++ b/uSkyBlock-Core/src/main/po/nl.po @@ -770,9 +770,14 @@ msgstr "verwijders alle verlaten eilanden" msgid "§4You must provide the age in days to purge!" msgstr "§4Je moet het aantal dagen invoeren om een purge uit te voeren!" +msgid "§4The level must be a valid number" +msgstr "" + #, java-format -msgid "§eFinding all islands that has been abandoned for more than {0} days." -msgstr "§eMarkeer alle eilanden die inactief zijn voor meer dan {0} dagen." +msgid "" +"§eFinding all islands that has been abandoned for more than {0} days below " +"level {1}" +msgstr "" #, java-format msgid "§4PURGE:§e Repeat the command within {0} to accept." @@ -828,12 +833,11 @@ msgid "set a player's island to your location" msgstr "zet een spelers eiland op mijn lokatie" #, java-format -msgid "§aSet {0}'s island to the bedrock nearest you." -msgstr "§aSet {0}'s eiland op het dichtstbijzijnde bedrock block ." +msgid "§aSet {0}'s island to the current island." +msgstr "" -msgid "§4Bedrock not found: unable to set the island!" +msgid "§4Island not found: unable to set the island!" msgstr "" -"§4Kan het bedrock block niet vinden waardoor veranderen niet mogelijk is!" msgid "reload configuration from file." msgstr "herladen van de configuratie van het bestand" @@ -1249,7 +1253,7 @@ msgid "Score Count Block" msgstr "Score van het aantal blokken" #, java-format -msgid "{0,number,#####.##} {1,number,#} {2}" +msgid "{0,number,00.00} {1,number,#} {2}" msgstr "" #, java-format @@ -2463,6 +2467,12 @@ msgstr "" "§cGeen toegang!\n" "§7({0})" +msgid "§a§lReturn to Spawn" +msgstr "" + +msgid "Teleport to the spawn area." +msgstr "" + msgid "§a§lJoin an Island" msgstr "§a§lLid worden van een eiland" diff --git a/uSkyBlock-Core/src/main/po/pt_BR.po b/uSkyBlock-Core/src/main/po/pt_BR.po index 9d6956e09..7797ce9cb 100644 --- a/uSkyBlock-Core/src/main/po/pt_BR.po +++ b/uSkyBlock-Core/src/main/po/pt_BR.po @@ -762,10 +762,14 @@ msgstr "purgar todas as ilhas abandonadas" msgid "§4You must provide the age in days to purge!" msgstr "§4Você precisa fornecer a idade em dias para o purge!" +msgid "§4The level must be a valid number" +msgstr "" + #, java-format -msgid "§eFinding all islands that has been abandoned for more than {0} days." +msgid "" +"§eFinding all islands that has been abandoned for more than {0} days below " +"level {1}" msgstr "" -"§eProcurando todas as ilhas que foram abandonadas por mais de {0} dias." #, java-format msgid "§4PURGE:§e Repeat the command within {0} to accept." @@ -821,11 +825,11 @@ msgid "set a player's island to your location" msgstr "definir a ilha do jogador para a sua localização" #, java-format -msgid "§aSet {0}'s island to the bedrock nearest you." -msgstr "§aDefinir a ilha de {0} para a bedrock perto de você." +msgid "§aSet {0}'s island to the current island." +msgstr "" -msgid "§4Bedrock not found: unable to set the island!" -msgstr "§4Bedrock não encontrada: impossível definir a ilha!" +msgid "§4Island not found: unable to set the island!" +msgstr "" msgid "reload configuration from file." msgstr "recarregar configuração do arquivo." @@ -1225,7 +1229,7 @@ msgid "Score Count Block" msgstr "Pontos por bloco" #, java-format -msgid "{0,number,#####.##} {1,number,#} {2}" +msgid "{0,number,00.00} {1,number,#} {2}" msgstr "" #, java-format @@ -2409,6 +2413,12 @@ msgid "" "§7({0})" msgstr "" +msgid "§a§lReturn to Spawn" +msgstr "" + +msgid "Teleport to the spawn area." +msgstr "" + msgid "§a§lJoin an Island" msgstr "§a§lEntrar em um grupo" diff --git a/uSkyBlock-Core/src/main/po/ru.po b/uSkyBlock-Core/src/main/po/ru.po index 8c28a73d0..61c006848 100644 --- a/uSkyBlock-Core/src/main/po/ru.po +++ b/uSkyBlock-Core/src/main/po/ru.po @@ -768,9 +768,14 @@ msgstr "очистка всех заброшенных островов" msgid "§4You must provide the age in days to purge!" msgstr "§4Вам нужно указать возраст в днях для очистки!" +msgid "§4The level must be a valid number" +msgstr "" + #, java-format -msgid "§eFinding all islands that has been abandoned for more than {0} days." -msgstr "§eПоиск всех островов, которые заброшены более {0} дней." +msgid "" +"§eFinding all islands that has been abandoned for more than {0} days below " +"level {1}" +msgstr "" #, java-format msgid "§4PURGE:§e Repeat the command within {0} to accept." @@ -826,11 +831,11 @@ msgid "set a player's island to your location" msgstr "установка острова игрока в вашей позиции" #, java-format -msgid "§aSet {0}'s island to the bedrock nearest you." -msgstr "§aУстановить остров игрока {0} на бедрок около себя." +msgid "§aSet {0}'s island to the current island." +msgstr "" -msgid "§4Bedrock not found: unable to set the island!" -msgstr "§4Бедрок не найден: нельзя установить остров!" +msgid "§4Island not found: unable to set the island!" +msgstr "" msgid "reload configuration from file." msgstr "перезагрузка конфигурации из файла" @@ -1234,7 +1239,7 @@ msgid "Score Count Block" msgstr "Score Count Block" #, java-format -msgid "{0,number,#####.##} {1,number,#} {2}" +msgid "{0,number,00.00} {1,number,#} {2}" msgstr "" #, java-format @@ -2412,6 +2417,12 @@ msgid "" "§7({0})" msgstr "" +msgid "§a§lReturn to Spawn" +msgstr "" + +msgid "Teleport to the spawn area." +msgstr "" + msgid "§a§lJoin an Island" msgstr "§a§lПрисоединиться к острову" diff --git a/uSkyBlock-Core/src/main/po/sv.po b/uSkyBlock-Core/src/main/po/sv.po index 9d582bea3..1cc540997 100644 --- a/uSkyBlock-Core/src/main/po/sv.po +++ b/uSkyBlock-Core/src/main/po/sv.po @@ -777,9 +777,14 @@ msgstr "tar bort alla övergivna öar" msgid "§4You must provide the age in days to purge!" msgstr "§cDu måste ange åldern i hur många dagar du vill rensa!" +msgid "§4The level must be a valid number" +msgstr "" + #, java-format -msgid "§eFinding all islands that has been abandoned for more than {0} days." -msgstr "§eHittar alla öar som har varit övergivna i mer än {0} dagar." +msgid "" +"§eFinding all islands that has been abandoned for more than {0} days below " +"level {1}" +msgstr "" #, java-format msgid "§4PURGE:§e Repeat the command within {0} to accept." @@ -835,11 +840,11 @@ msgid "set a player's island to your location" msgstr "sätt en spelares ö till din nuvarande position" #, java-format -msgid "§aSet {0}'s island to the bedrock nearest you." -msgstr "§aSätt {0}s ö till din närmaste bedrock." +msgid "§aSet {0}'s island to the current island." +msgstr "" -msgid "§4Bedrock not found: unable to set the island!" -msgstr "§4Bedrock hittades inte, kan inte ställa in öns position!" +msgid "§4Island not found: unable to set the island!" +msgstr "" msgid "reload configuration from file." msgstr "ladda om konfiguration från filen." @@ -1237,7 +1242,7 @@ msgid "Score Count Block" msgstr "Poäng Antal Blocktyp" #, java-format -msgid "{0,number,#####.##} {1,number,#} {2}" +msgid "{0,number,00.00} {1,number,#} {2}" msgstr "" #, java-format @@ -2411,6 +2416,12 @@ msgid "" "§7({0})" msgstr "" +msgid "§a§lReturn to Spawn" +msgstr "" + +msgid "Teleport to the spawn area." +msgstr "" + msgid "§a§lJoin an Island" msgstr "§a§lGå med i en ö" diff --git a/uSkyBlock-Core/src/main/po/vi_VN.po b/uSkyBlock-Core/src/main/po/vi_VN.po index 90834e7cd..307bd42e2 100644 --- a/uSkyBlock-Core/src/main/po/vi_VN.po +++ b/uSkyBlock-Core/src/main/po/vi_VN.po @@ -767,9 +767,14 @@ msgstr "Lọc toàn bộ đảo bị bỏ hoang" msgid "§4You must provide the age in days to purge!" msgstr "§4Bạn phải cung cấp số ngày để lọc!" +msgid "§4The level must be a valid number" +msgstr "" + #, java-format -msgid "§eFinding all islands that has been abandoned for more than {0} days." -msgstr "§eĐang tìm đảo đã bị bỏ haong hơn {0} ngày." +msgid "" +"§eFinding all islands that has been abandoned for more than {0} days below " +"level {1}" +msgstr "" #, java-format msgid "§4PURGE:§e Repeat the command within {0} to accept." @@ -825,11 +830,11 @@ msgid "set a player's island to your location" msgstr "Đặt đảo của người chơi tại vị trí của bạn" #, java-format -msgid "§aSet {0}'s island to the bedrock nearest you." -msgstr "§aĐặt đảo của người chơi {0} tới khối bedrock gần bạn." +msgid "§aSet {0}'s island to the current island." +msgstr "" -msgid "§4Bedrock not found: unable to set the island!" -msgstr "Không tìm that bedrock" +msgid "§4Island not found: unable to set the island!" +msgstr "" msgid "reload configuration from file." msgstr "reload lại config.yml" @@ -1219,7 +1224,7 @@ msgid "Score Count Block" msgstr "Điểm theo khối" #, java-format -msgid "{0,number,#####.##} {1,number,#} {2}" +msgid "{0,number,00.00} {1,number,#} {2}" msgstr "" #, java-format @@ -2358,6 +2363,12 @@ msgstr "" "§cKhông thể truy cập!\n" "§7({0})" +msgid "§a§lReturn to Spawn" +msgstr "" + +msgid "Teleport to the spawn area." +msgstr "" + msgid "§a§lJoin an Island" msgstr "§a§lGia nhập đảo" diff --git a/uSkyBlock-Core/src/main/po/xx_PIRATE.po b/uSkyBlock-Core/src/main/po/xx_PIRATE.po index a6981c53b..15b516e83 100644 --- a/uSkyBlock-Core/src/main/po/xx_PIRATE.po +++ b/uSkyBlock-Core/src/main/po/xx_PIRATE.po @@ -766,9 +766,14 @@ msgstr "purges all abandoned islands" msgid "§4You must provide the age in days to purge!" msgstr "§4Ye must provide the age in days to purge!" +msgid "§4The level must be a valid number" +msgstr "" + #, java-format -msgid "§eFinding all islands that has been abandoned for more than {0} days." -msgstr "§eFindin'' all islands that has been abandoned for more than {0} days." +msgid "" +"§eFinding all islands that has been abandoned for more than {0} days below " +"level {1}" +msgstr "" #, java-format msgid "§4PURGE:§e Repeat the command within {0} to accept." @@ -824,11 +829,11 @@ msgid "set a player's island to your location" msgstr "set a pirate's hideout to yer location" #, java-format -msgid "§aSet {0}'s island to the bedrock nearest you." -msgstr "§aSet {0}''s hideout to the bedrock nearest ye." +msgid "§aSet {0}'s island to the current island." +msgstr "" -msgid "§4Bedrock not found: unable to set the island!" -msgstr "§4Bedrock not found: unable to set the hideout!" +msgid "§4Island not found: unable to set the island!" +msgstr "" msgid "reload configuration from file." msgstr "reload configuration from file." @@ -1230,7 +1235,7 @@ msgid "Score Count Block" msgstr "Score Count Block" #, java-format -msgid "{0,number,#####.##} {1,number,#} {2}" +msgid "{0,number,00.00} {1,number,#} {2}" msgstr "" #, java-format @@ -2429,6 +2434,12 @@ msgstr "" "§cNay access!\n" "§7({0})" +msgid "§a§lReturn to Spawn" +msgstr "" + +msgid "Teleport to the spawn area." +msgstr "" + msgid "§a§lJoin an Island" msgstr "§a§lJoin an Island" @@ -2843,3 +2854,14 @@ msgstr "West" msgid "North-West" msgstr "North-West" + +#~ msgid "§aSet {0}'s island to the bedrock nearest you." +#~ msgstr "§aSet {0}''s hideout to the bedrock nearest ye." + +#~ msgid "§4Bedrock not found: unable to set the island!" +#~ msgstr "§4Bedrock not found: unable to set the hideout!" + +#~ msgid "" +#~ "§eFinding all islands that has been abandoned for more than {0} days." +#~ msgstr "" +#~ "§eFindin'' all islands that has been abandoned for more than {0} days." diff --git a/uSkyBlock-Core/src/main/po/xx_lol_US.po b/uSkyBlock-Core/src/main/po/xx_lol_US.po index 31eefe9e3..993cf133f 100644 --- a/uSkyBlock-Core/src/main/po/xx_lol_US.po +++ b/uSkyBlock-Core/src/main/po/xx_lol_US.po @@ -766,9 +766,14 @@ msgstr "purges all abandoned islands" msgid "§4You must provide the age in days to purge!" msgstr "§4You must provide teh age in dais to purrrge!" +msgid "§4The level must be a valid number" +msgstr "" + #, java-format -msgid "§eFinding all islands that has been abandoned for more than {0} days." -msgstr "§eFinding all islands that haz been abandoned for moar than {0} dais." +msgid "" +"§eFinding all islands that has been abandoned for more than {0} days below " +"level {1}" +msgstr "" #, java-format msgid "§4PURGE:§e Repeat the command within {0} to accept." @@ -824,11 +829,11 @@ msgid "set a player's island to your location" msgstr "set a kitteh's cathouz to yoor location" #, java-format -msgid "§aSet {0}'s island to the bedrock nearest you." -msgstr "§aSet {0}''s cathouz to teh bedrock nearest you." +msgid "§aSet {0}'s island to the current island." +msgstr "" -msgid "§4Bedrock not found: unable to set the island!" -msgstr "§4Bedrock not found: unable to set teh cathouz!" +msgid "§4Island not found: unable to set the island!" +msgstr "" msgid "reload configuration from file." msgstr "reload configuration from file." @@ -1231,7 +1236,7 @@ msgid "Score Count Block" msgstr "Score Count Blok" #, java-format -msgid "{0,number,#####.##} {1,number,#} {2}" +msgid "{0,number,00.00} {1,number,#} {2}" msgstr "" #, java-format @@ -2434,6 +2439,12 @@ msgstr "" "§cNoe access!\n" "§7({0})" +msgid "§a§lReturn to Spawn" +msgstr "" + +msgid "Teleport to the spawn area." +msgstr "" + msgid "§a§lJoin an Island" msgstr "§a§lJoin an Island" @@ -2849,3 +2860,14 @@ msgstr "West" msgid "North-West" msgstr "North-West" + +#~ msgid "§aSet {0}'s island to the bedrock nearest you." +#~ msgstr "§aSet {0}''s cathouz to teh bedrock nearest you." + +#~ msgid "§4Bedrock not found: unable to set the island!" +#~ msgstr "§4Bedrock not found: unable to set teh cathouz!" + +#~ msgid "" +#~ "§eFinding all islands that has been abandoned for more than {0} days." +#~ msgstr "" +#~ "§eFinding all islands that haz been abandoned for moar than {0} dais." diff --git a/uSkyBlock-Core/src/main/po/zh_CN.po b/uSkyBlock-Core/src/main/po/zh_CN.po index b692b688c..019977b1a 100644 --- a/uSkyBlock-Core/src/main/po/zh_CN.po +++ b/uSkyBlock-Core/src/main/po/zh_CN.po @@ -758,8 +758,13 @@ msgstr "" msgid "§4You must provide the age in days to purge!" msgstr "§4你必须指定一个天数来删除。" +msgid "§4The level must be a valid number" +msgstr "" + #, java-format -msgid "§eFinding all islands that has been abandoned for more than {0} days." +msgid "" +"§eFinding all islands that has been abandoned for more than {0} days below " +"level {1}" msgstr "" #, java-format @@ -816,11 +821,11 @@ msgid "set a player's island to your location" msgstr "" #, java-format -msgid "§aSet {0}'s island to the bedrock nearest you." -msgstr "§a设置 {0} 的岛屿的中心点(基岩)在你的附近。" +msgid "§aSet {0}'s island to the current island." +msgstr "" -msgid "§4Bedrock not found: unable to set the island!" -msgstr "§4基岩未找到:无法设置岛屿" +msgid "§4Island not found: unable to set the island!" +msgstr "" msgid "reload configuration from file." msgstr "" @@ -1209,7 +1214,7 @@ msgid "Score Count Block" msgstr "计分方块" #, java-format -msgid "{0,number,#####.##} {1,number,#} {2}" +msgid "{0,number,00.00} {1,number,#} {2}" msgstr "" #, java-format @@ -2294,6 +2299,12 @@ msgid "" "§7({0})" msgstr "" +msgid "§a§lReturn to Spawn" +msgstr "" + +msgid "Teleport to the spawn area." +msgstr "" + msgid "§a§lJoin an Island" msgstr "§a§l加入一个岛屿" diff --git a/uSkyBlock-Core/src/main/resources/config.yml b/uSkyBlock-Core/src/main/resources/config.yml index aa9c6e19f..6e560cfe3 100644 --- a/uSkyBlock-Core/src/main/resources/config.yml +++ b/uSkyBlock-Core/src/main/resources/config.yml @@ -294,8 +294,8 @@ island-schemes: skySMP: permission: usb.schematic.skysmp description: The original SkySMP island - displayItem: GRASS - enabled: true + displayItem: LEAVES + enabled: false index: 3 extraItems: 'OBSIDIAN:14 FLINT_AND_STEEL:1' maxPartySize: 4 @@ -307,6 +307,9 @@ island-schemes: scoreMultiply: 0.9 # But start with an offset of 40 scoreOffset: 40 + spawn: + description: The default spawn schematic + enabled: false # This section allows donors to get specific perks #donor-perks: @@ -442,7 +445,7 @@ placeholder: servercommandplaceholder: false # DO NOT TOUCH THE FIELDS BELOW -version: 64 +version: 65 force-replace: options.party.invite-timeout: 100 options.island.islandTeleportDelay: 5 diff --git a/uSkyBlock-Core/src/main/resources/schematics/default.schematic b/uSkyBlock-Core/src/main/resources/schematics/default.schematic index 6f6ecd432..cacc65cb4 100644 Binary files a/uSkyBlock-Core/src/main/resources/schematics/default.schematic and b/uSkyBlock-Core/src/main/resources/schematics/default.schematic differ