Skip to content

Commit

Permalink
[CORE] Stats (Part 2 of 3) - Add missing Language Strings to test realm
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfieheart committed Oct 2, 2023
1 parent e969baa commit e253acb
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public CommandEx(ArmorStandEditorPlugin armorStandEditorPlugin) {

@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {

if (sender instanceof ConsoleCommandSender) { //Fix to Support #267
if (args.length == 0) {
sender.sendMessage(VERSION);
Expand Down Expand Up @@ -305,8 +306,8 @@ private void commandMode(Player player, String[] args) {
if (args.length > 1) {
for (EditMode mode : EditMode.values()) {
if (mode.toString().toLowerCase().contentEquals(args[1].toLowerCase())) {
if (args[1].equals("invisible") && !checkPermission(player, "togglearmorstandvisibility", true)) return;
if (args[1].equals("itemframe") && !checkPermission(player, "toggleitemframevisibility", true)) return;
if (args[1].equals("invisible") && !(checkPermission(player, "togglearmorstandvisibility", true) || plugin.getArmorStandVisibility())) return;
if (args[1].equals("itemframe") && !(checkPermission(player, "toggleitemframevisibility", true) || plugin.getItemFrameVisibility())) return;
plugin.editorManager.getPlayerEditor(player.getUniqueId()).setMode(mode);
return;
}
Expand Down Expand Up @@ -417,7 +418,7 @@ private void commandStats(Player player) {
boolean isSmall = as.isSmall();
boolean isLocked = plugin.scoreboard.getTeam(plugin.lockedTeam).hasEntry(as.getUniqueId().toString());

player.sendMessage(ChatColor.YELLOW + "--------- Armor Stand Statistics ---------");
player.sendMessage(ChatColor.YELLOW + "----------- Armor Stand Statistics -----------");
player.sendMessage(ChatColor.YELLOW + plugin.getLang().getMessage("stats"));
player.sendMessage(ChatColor.YELLOW + "Head: " + ChatColor.AQUA + headX + " / " + headY + " / " + headZ);
player.sendMessage(ChatColor.YELLOW + "Body: " + ChatColor.AQUA + bodyX + " / " + bodyY + " / " + bodyZ);
Expand All @@ -429,9 +430,9 @@ private void commandStats(Player player) {
player.sendMessage(ChatColor.YELLOW + "Is Visible: " + ChatColor.AQUA + isVisible + ". " + ChatColor.YELLOW + "Arms Visible: " + ChatColor.AQUA + armsVisible + ". " + ChatColor.YELLOW + "Base Plate Visible: "+ ChatColor.AQUA + basePlateVisible);
player.sendMessage(ChatColor.YELLOW + "Is Vulnerable: " + ChatColor.AQUA + isVulnerable + ". " + ChatColor.YELLOW + "Affected by Gravity: " + ChatColor.AQUA + hasGravity);
player.sendMessage(ChatColor.YELLOW + "Is Small: " + ChatColor.AQUA + isSmall + ". " + ChatColor.YELLOW + "Is Locked: " + ChatColor.AQUA + isLocked);
player.sendMessage(ChatColor.YELLOW + "---------------------------------------------");
player.sendMessage(ChatColor.YELLOW + "----------------------------------------------");
} else{
player.sendMessage("nopermoption", "warn", "stats");
player.sendMessage(plugin.getLang().getMessage("norangeforstats", "warn"));
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/main/resources/lang/en_US.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ unabledestroycreative:
msg: Unable to Destroy this Invulnerable ArmorStand in Creative Mode.
notincorrectworld:
msg: Sorry but you are not in the correct world to use ArmorStandEditor.
stats:
msg: Here are the statistics for your ArmorStand.
playerheadhelp:
msg: "Please use /ase playerhead <name> to get a players head. Ex of the command - /ase playerhead Wolfieheart_"
help:
Expand Down Expand Up @@ -134,6 +136,9 @@ nopermoption:
paste: Paste ArmorStand Config
copy: Copy ArmorStand Config
reset: Reset ArmorStand Config
stats: View ArmorStand Statistics
norangestats:
msg: Please get next to an ArmorStand before running this command.
noslotnumcom:
msg: You must specify a slot number!
noadjcom:
Expand Down
29 changes: 16 additions & 13 deletions src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ permissions:
default: true
asedit.rename:
description: Rename armorstands - Now Supports Color
default: false
default: true
asedit.equipment:
description: Access armorstand equipment GUI
default: false
default: true
asedit.disableSlots:
description: Allows locking and unlocking the contents of an ArmorStand. When locked, armor and equipment can not be added or removed without unlocking it first.
default: false
default: true
asedit.give:
description: Gives player the EditTool with Proper CustomModelData
default: false
Expand All @@ -52,10 +52,10 @@ permissions:
default: false
asedit.movement:
description: Changes whether the armor stand can be moved using the item for editing
default: false
default: true
asedit.rotation:
description: Allows player to rotate the ArmorStand
default: false
default: true
asedit.copy:
description: Allows the players to create copies of their ArmorStand Configurations.
default: false
Expand All @@ -64,28 +64,31 @@ permissions:
default: false
asedit.reset:
description: Allows the reset of the ArmorStand back to Default values
default: false
default: true
asedit.togglearmorstandvisibility:
description: Toggles ArmorStand visibility.
default: false
default: true
asedit.toggleitemframevisibility:
description: Allows setting of ItemFrame Visibility
default: false
default: true
asedit.toggleInvulnerability:
description: Allows players to toggle the vulnerability state of an ArmorStand.
default: false
default: true
asedit.togglebaseplate:
description: Allows the toggling of the Baseplate of an ArmorStand.
default: false
default: true
asedit.togglearms:
description: Allows the toggling of the Arms of an ArmorStand.
default: false
default: true
asedit.togglesize:
description: Allows the toggling of the size of an ArmorStand.
default: false
default: true
asedit.togglegravity:
description: Changes whether the armor stand has gravity
default: false
default: true
asedit.stats:
description: Ability to view ArmorStand Stats.
default: true

asedit.ignoreProtection.towny:
description: Allows user to ignore Towny's Protection Limitations.
Expand Down

0 comments on commit e253acb

Please sign in to comment.