From d0a66299de11df105196bd77b1da5bb2b37b7edc Mon Sep 17 00:00:00 2001 From: Florian CUNY Date: Sat, 28 Apr 2018 12:31:53 +0200 Subject: [PATCH] Edited some references and manually updated REFERENCES.md --- REFERENCES.md | 112 +++++++++++++++++- locales/en-US.yml | 7 +- .../island/builders/IslandBuilder.java | 10 +- .../listeners/JoinLeaveListener.java | 2 +- .../bskyblock/listeners/NetherPortals.java | 2 +- .../bskyblock/listeners/ObsidianToLava.java | 2 +- .../bskyblock/managers/IslandsManager.java | 2 +- 7 files changed, 120 insertions(+), 17 deletions(-) diff --git a/REFERENCES.md b/REFERENCES.md index 20d777054..f10fb0abb 100644 --- a/REFERENCES.md +++ b/REFERENCES.md @@ -1,18 +1,23 @@ # Locale References -This file contains a list of the hard-coded locale references in the source code. See the commit date/time for the last update. +This file contains a list of the locale references in the source code. See the commit date/time for the last update. ## References ``` commands.admin.setrange.range-updated +commands.help.description commands.help.end commands.help.header +commands.help.parameters commands.help.syntax +commands.island.about.description commands.island.create.creating-island commands.island.create.unable-create-island -commands.island.go.island.go.teleported +commands.island.go.description +commands.island.go.parameters commands.island.go.teleport +commands.island.go.teleported commands.island.reset.must-remove-members commands.island.sethome.home-set commands.island.sethome.must-be-on-your-island @@ -48,7 +53,6 @@ commands.island.team.setowner.errors.cant-transfer-to-yourself commands.island.team.setowner.errors.target-is-not-member commands.island.team.setowner.name-is-the-owner commands.island.team.setowner.you-are-the-owner -errors.general.no-permission general.errors.already-have-island general.errors.command-cancelled general.errors.no-island @@ -61,8 +65,106 @@ general.errors.player-has-no-island general.errors.unknown-player general.errors.use-in-game general.success -general.tips.changing-ob-to-lava +general.tips.changing-obsidian-to-lava language.edited -locked.islandlocked +language.panel-title +language.selected +new-island.sign.line0 +new-island.sign.line1 +new-island.sign.line2 +new-island.sign.line3 +protection.flags.ANIMAL_SPAWN.name +protection.flags.ANIMAL_SPAWN.description +protection.flags.ANVIL.name +protection.flags.ANVIL.description +protection.flags.ARMOR_STAND.name +protection.flags.ARMOR_STAND.description +protection.flags.BED.name +protection.flags.BED.description +protection.flags.BREAK_BLOCKS.name +protection.flags.BREAK_BLOCKS.description +protection.flags.BREEDING.name +protection.flags.BREEDING.description +protection.flags.BREWING.name +protection.flags.BREWING.description +protection.flags.BUCKET.name +protection.flags.BUCKET.description +protection.flags.COLLECT_WATER.name +protection.flags.COLLECT_WATER.description +protection.flags.COLLECT_LAVA.name +protection.flags.COLLECT_LAVA.description +protection.flags.CHEST.name +protection.flags.CHEST.description +protection.flags.CHORUS_FRUIT.name +protection.flags.CHORUS_FRUIT.description +protection.flags.CRAFTING.name +protection.flags.CRAFTING.description +protection.flags.CROP_TRAMPLE.name +protection.flags.CROP_TRAMPLE.description +protection.flags.DOOR.name +protection.flags.DOOR.description +protection.flags.EGGS.name +protection.flags.EGGS.description +protection.flags.ELYTRA.name +protection.flags.ELYTRA.description +protection.flags.ENCHANTING.name +protection.flags.ENCHANTING.description +protection.flags.ENTER_EXIT_MESSAGES.name +protection.flags.ENTER_EXIT_MESSAGES.description +protection.flags.FIRE.name +protection.flags.FIRE.description +protection.flags.FIRE_EXTINGUISH.name +protection.flags.FIRE_EXTINGUISH.description +protection.flags.FIRE_SPREAD.name +protection.flags.FIRE_SPREAD.description +protection.flags.FURNACE.name +protection.flags.FURNACE.description +protection.flags.GATE.name +protection.flags.GATE.description +protection.flags.HURT_ANIMALS.name +protection.flags.HURT_ANIMALS.description +protection.flags.HURT_MONSTERS.name +protection.flags.HURT_MONSTERS.description +protection.flags.HURT_VILLAGERS.name +protection.flags.HURT_VILLAGERS.description +protection.flags.ITEM_DROP.name +protection.flags.ITEM_DROP.description +protection.flags.LEASH.name +protection.flags.LEASH.description +protection.flags.MILKING.name +protection.flags.MILKING.description +protection.flags.MONSTER_SPAWN.name +protection.flags.MONSTER_SPAWN.description +protection.flags.MOUNT_INVENTORY.name +protection.flags.MOUNT_INVENTORY.description +protection.flags.MUSIC.name +protection.flags.MUSIC.description +protection.flags.PLACE_BLOCKS.name +protection.flags.PLACE_BLOCKS.description +protection.flags.PORTAL.name +protection.flags.PORTAL.description +protection.flags.PRESSURE_PLATE.name +protection.flags.PRESSURE_PLATE.description +protection.flags.PVP_END.name +protection.flags.PVP_END.description +protection.flags.PVP_NETHER.name +protection.flags.PVP_NETHER.description +protection.flags.PVP_OVERWORLD.name +protection.flags.PVP_OVERWORLD.description +protection.flags.REDSTONE.name +protection.flags.REDSTONE.description +protection.flags.RIDING.name +protection.flags.RIDING.description +protection.flags.SHEARING.name +protection.flags.SHEARING.description +protection.flags.SPAWN_EGGS.name +protection.flags.SPAWN_EGGS.description +protection.flags.TRADING.name +protection.flags.TRADING.description +protection.locked +protection.panel.title +protection.panel.flag-item.name-layout +protection.panel.flag-item.description-layout +protection.panel.help-item.name protection.protected ``` diff --git a/locales/en-US.yml b/locales/en-US.yml index d3b3a64fb..b8d814b8b 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -16,8 +16,6 @@ banner: - "SQUARE_TOP_RIGHT:BLUE" general: - deaths: "Deaths" - unlimited: "Unlimited" success: "&aSuccess!" errors: command-cancelled: "&cCommand cancelled" @@ -37,7 +35,7 @@ general: warp-not-safe: "&cThat warp is not safe right now!" wrong-world: "&cYou are not in the right world to do that!" tips: - changing-ob-to-lava: "Changing obsidian back into lava. Be careful!" + changing-obsidian-to-lava: "Changing obsidian back into lava. Be careful!" commands: help: @@ -177,6 +175,7 @@ ranks: protection: protected: "&cIsland protected!" + locked: "&cThis island is locked!" flags: ANVIL: name: "Anvils" @@ -260,8 +259,6 @@ protection: &7Allowed for: &f[rank] help-item: name: "&aNeed some help?" - island: - locked: "&cThis island is locked!" language: panel-title: "Select your language" diff --git a/src/main/java/us/tastybento/bskyblock/island/builders/IslandBuilder.java b/src/main/java/us/tastybento/bskyblock/island/builders/IslandBuilder.java index b551194e7..8314b755e 100644 --- a/src/main/java/us/tastybento/bskyblock/island/builders/IslandBuilder.java +++ b/src/main/java/us/tastybento/bskyblock/island/builders/IslandBuilder.java @@ -461,9 +461,13 @@ public class IslandBuilder { if (playerUUID != null) { Sign sign = (Sign) blockToChange.getState(); User user = User.getInstance(playerUUID); - for (int i = 0; i < 4; i++) { - sign.setLine(i, user.getTranslation("new-island.sign.line" + i, "[player]", playerName)); - } + + // Sets the lines of the sign + sign.setLine(0, user.getTranslation("new-island.sign.line0", "[player]", playerName)); + sign.setLine(1, user.getTranslation("new-island.sign.line1", "[player]", playerName)); + sign.setLine(2, user.getTranslation("new-island.sign.line2", "[player]", playerName)); + sign.setLine(3, user.getTranslation("new-island.sign.line3", "[player]", playerName)); + ((org.bukkit.material.Sign) sign.getData()).setFacingDirection(BlockFace.NORTH); sign.update(); } diff --git a/src/main/java/us/tastybento/bskyblock/listeners/JoinLeaveListener.java b/src/main/java/us/tastybento/bskyblock/listeners/JoinLeaveListener.java index 111df26ef..c150e383e 100644 --- a/src/main/java/us/tastybento/bskyblock/listeners/JoinLeaveListener.java +++ b/src/main/java/us/tastybento/bskyblock/listeners/JoinLeaveListener.java @@ -60,7 +60,7 @@ public class JoinLeaveListener implements Listener { Island currentIsland = plugin.getIslands().getIslandAt(user.getLocation()).orElse(null); if (currentIsland != null && (currentIsland.isLocked() || plugin.getPlayers().isBanned(currentIsland.getOwner(),user.getUniqueId()))) { if (!currentIsland.getMemberSet().contains(playerUUID) && !user.hasPermission(Constants.PERMPREFIX + "mod.bypassprotect")) { - user.sendMessage("locked.islandlocked"); + user.sendMessage("protection.locked"); plugin.getIslands().homeTeleport(user.getPlayer()); } } diff --git a/src/main/java/us/tastybento/bskyblock/listeners/NetherPortals.java b/src/main/java/us/tastybento/bskyblock/listeners/NetherPortals.java index bae513587..1da43fa84 100644 --- a/src/main/java/us/tastybento/bskyblock/listeners/NetherPortals.java +++ b/src/main/java/us/tastybento/bskyblock/listeners/NetherPortals.java @@ -27,7 +27,7 @@ import us.tastybento.bskyblock.api.user.User; import us.tastybento.bskyblock.util.teleport.SafeTeleportBuilder; public class NetherPortals implements Listener { - private static final String ERROR_NO_PERMISSION = "errors.general.no-permission"; + private static final String ERROR_NO_PERMISSION = "general.errors.no-permission"; private final BSkyBlock plugin; private World world; private World nether; diff --git a/src/main/java/us/tastybento/bskyblock/listeners/ObsidianToLava.java b/src/main/java/us/tastybento/bskyblock/listeners/ObsidianToLava.java index 064c1da94..e975eb829 100644 --- a/src/main/java/us/tastybento/bskyblock/listeners/ObsidianToLava.java +++ b/src/main/java/us/tastybento/bskyblock/listeners/ObsidianToLava.java @@ -63,7 +63,7 @@ public class ObsidianToLava implements Listener { } } - user.sendMessage("general.tips.changing-ob-to-lava"); + user.sendMessage("general.tips.changing-obsidian-to-lava"); e.getItem().setType(Material.LAVA_BUCKET); e.getPlayer().getWorld().playSound(e.getPlayer().getLocation(), Sound.ITEM_BUCKET_FILL_LAVA, 1F, 1F); e.getClickedBlock().setType(Material.AIR); diff --git a/src/main/java/us/tastybento/bskyblock/managers/IslandsManager.java b/src/main/java/us/tastybento/bskyblock/managers/IslandsManager.java index e30bb1ff6..d6af66f50 100644 --- a/src/main/java/us/tastybento/bskyblock/managers/IslandsManager.java +++ b/src/main/java/us/tastybento/bskyblock/managers/IslandsManager.java @@ -543,7 +543,7 @@ public class IslandsManager { if (number == 1) { user.sendMessage("commands.island.go.teleport", "[label]", Constants.ISLANDCOMMAND); } else { - user.sendMessage("commands.island.go.island.go.teleported", "[number]", String.valueOf(number)); + user.sendMessage("commands.island.go.teleported", "[number]", String.valueOf(number)); } // Exit spectator mode if in it if (player.getGameMode().equals(GameMode.SPECTATOR)) {