diff --git a/locales/en-US.yml b/locales/en-US.yml index 02c27a745..17714beed 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -72,6 +72,15 @@ commands: parameters: "" description: "make player the team's leader" already-leader: "&cPlayer is already the leader!" + range: + display: + already-off: "&cIndicators are already off" + already-on: "&cIndicators are already on" + description: "Show/hide island range indicators" + hiding: "&2Hiding range indicators" + hint: "&cRed &fbarrier icons show the protected range limit. Particles show the max island limit" + showing: "&2Showing range indicators" + description: "Admin island range command" register: parameters: "" description: "register player to unowned island you are on" @@ -316,6 +325,9 @@ protection: description: "Toggle chest access" name: Chests hint: "Chest access disabled" + CHEST_DAMAGE: + description: "Toggle chest damage from explosions" + name: "Chest Damage" CHORUS_FRUIT: description: "Toggle teleportation" name: "Chorus fruits" @@ -342,6 +354,13 @@ protection: description: "Toggle use" name: Workbenches hint: "No workbench use" + CREEPER_DAMAGE: + description: "Toggle creeper damage" + name: "Creeper damage" + CREEPER_GRIEFING: + description: "Toggle creeper griefing" + name: "Creeper griefing" + hint: "No creeper griefing allowed" CROP_TRAMPLE: description: "Toggle crop trampling" name: "Trample crops" @@ -434,10 +453,10 @@ protection: LEASH: description: "Toggle use" name: "Leash use" - LEVER_BUTTON: + LEVER: description: "Toggle use" - name: "Leaver or button use" - hint: "No leash use" + name: "Leaver use" + hint: "No lever use" LOCK: description: "Toggle lock" name: "Lock island" @@ -521,6 +540,9 @@ protection: description: "Toggle use" name: "Spawn eggs" hint: "No throwing spawn eggs" + TNT: + description: "Toggle TNT damage" + name: "TNT damage" TRADING: description: "Toggle trading" name: "Village trading" diff --git a/src/main/java/us/tastybento/bskyblock/commands/admin/range/AdminRangeCommand.java b/src/main/java/us/tastybento/bskyblock/commands/admin/range/AdminRangeCommand.java index 6a9014b0c..dbd654703 100644 --- a/src/main/java/us/tastybento/bskyblock/commands/admin/range/AdminRangeCommand.java +++ b/src/main/java/us/tastybento/bskyblock/commands/admin/range/AdminRangeCommand.java @@ -1,10 +1,10 @@ package us.tastybento.bskyblock.commands.admin.range; +import java.util.List; + import us.tastybento.bskyblock.api.commands.CompositeCommand; import us.tastybento.bskyblock.api.user.User; -import java.util.List; - /** * @author Poslovitch */ @@ -17,7 +17,6 @@ public class AdminRangeCommand extends CompositeCommand { @Override public void setup() { setPermission("admin.range"); - setParameters("commands.admin.range.parameters"); setDescription("commands.admin.range.description"); new AdminRangeDisplayCommand(this); diff --git a/src/main/java/us/tastybento/bskyblock/commands/admin/range/AdminRangeDisplayCommand.java b/src/main/java/us/tastybento/bskyblock/commands/admin/range/AdminRangeDisplayCommand.java index 9cbfde2d2..5af97187a 100644 --- a/src/main/java/us/tastybento/bskyblock/commands/admin/range/AdminRangeDisplayCommand.java +++ b/src/main/java/us/tastybento/bskyblock/commands/admin/range/AdminRangeDisplayCommand.java @@ -1,16 +1,17 @@ package us.tastybento.bskyblock.commands.admin.range; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.Particle; import org.bukkit.entity.Player; + import us.tastybento.bskyblock.api.commands.CompositeCommand; import us.tastybento.bskyblock.api.user.User; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - /** * @author Poslovitch */ @@ -24,9 +25,7 @@ public class AdminRangeDisplayCommand extends CompositeCommand { @Override public void setup() { - setOnlyPlayer(true); setPermission("admin.range.display"); - setParameters("commands.admin.range.display.parameters"); setDescription("commands.admin.range.display.description"); } @@ -39,23 +38,23 @@ public class AdminRangeDisplayCommand extends CompositeCommand { if (!display.containsKey(user)) { switch (label) { - case "display": - case "show": - showZones(user); - break; - case "hide": - user.sendMessage("commands.admin.range.display.already-off"); - break; + case "display": + case "show": + showZones(user); + break; + case "hide": + user.sendMessage("commands.admin.range.display.already-off"); + break; } } else { switch (label) { - case "display": - case "hide": - hideZones(user); - break; - case "show": - user.sendMessage("commands.admin.range.display.already-on"); - break; + case "display": + case "hide": + hideZones(user); + break; + case "show": + user.sendMessage("commands.admin.range.display.already-on"); + break; } } @@ -98,10 +97,10 @@ public class AdminRangeDisplayCommand extends CompositeCommand { // Draw 3 "stages" (one line below, at and above player's y coordinate) for (int stage = -1 ; stage <= 1 ; stage++) { for (int i = -range ; i <= range ; i++) { - player.spawnParticle(particle, (double) (center.getBlockX() + i), (double) (playerY + stage), (double) (center.getBlockZ() + range), 1); - player.spawnParticle(particle, (double) (center.getBlockX() + i), (double) (playerY + stage), (double) (center.getBlockZ() - range), 1); - player.spawnParticle(particle, (double) (center.getBlockX() + range), (double) (playerY + stage), (double) (center.getBlockZ() + i), 1); - player.spawnParticle(particle, (double) (center.getBlockX() - range), (double) (playerY + stage), (double) (center.getBlockZ() + i), 1); + player.spawnParticle(particle, center.getBlockX() + i, playerY + stage, center.getBlockZ() + range, 1); + player.spawnParticle(particle, center.getBlockX() + i, playerY + stage, center.getBlockZ() - range, 1); + player.spawnParticle(particle, center.getBlockX() + range, playerY + stage, center.getBlockZ() + i, 1); + player.spawnParticle(particle, center.getBlockX() - range, playerY + stage, center.getBlockZ() + i, 1); } } }