Added text strings for localization.

This commit is contained in:
tastybento 2018-07-18 22:42:50 -07:00
parent 3210c7873b
commit d093925938
3 changed files with 50 additions and 30 deletions

View File

@ -72,6 +72,15 @@ commands:
parameters: "<player>"
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: "<player>"
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"

View File

@ -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);

View File

@ -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);
}
}
}