From 2325c4eb6b308af6a50695f55afe56725f4addfe Mon Sep 17 00:00:00 2001 From: nossr50 Date: Mon, 27 Apr 2020 19:01:40 -0700 Subject: [PATCH] New Command mmoxpbar --- Changelog.txt | 6 + .../nossr50/commands/player/XPBarCommand.java | 104 ++++++++++++++++++ .../nossr50/datatypes/player/McMMOPlayer.java | 4 + .../nossr50/listeners/EntityListener.java | 1 - .../commands/CommandRegistrationManager.java | 8 ++ .../util/experience/ExperienceBarManager.java | 91 +++++++++++++-- .../resources/locale/locale_cs_CZ.properties | 2 + .../resources/locale/locale_cy.properties | 2 + .../resources/locale/locale_da.properties | 2 + .../resources/locale/locale_de.properties | 2 + .../resources/locale/locale_en_US.properties | 4 + .../resources/locale/locale_es.properties | 2 + .../resources/locale/locale_fi.properties | 2 + .../resources/locale/locale_fr.properties | 2 + .../resources/locale/locale_hu_HU.properties | 2 + .../resources/locale/locale_it.properties | 2 + .../resources/locale/locale_ja_JP.properties | 4 +- .../resources/locale/locale_ko.properties | 2 + .../resources/locale/locale_lt_LT.properties | 2 + .../resources/locale/locale_nl.properties | 2 + .../resources/locale/locale_pl.properties | 2 + .../resources/locale/locale_pt_BR.properties | 2 + .../resources/locale/locale_ru.properties | 2 + .../resources/locale/locale_sv.properties | 2 + .../resources/locale/locale_th_TH.properties | 2 + .../resources/locale/locale_zh_CN.properties | 2 + .../resources/locale/locale_zh_TW.properties | 2 + src/main/resources/plugin.yml | 3 + 28 files changed, 251 insertions(+), 12 deletions(-) create mode 100644 src/main/java/com/gmail/nossr50/commands/player/XPBarCommand.java diff --git a/Changelog.txt b/Changelog.txt index 1d3a5d572..be4b284e9 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -2,11 +2,17 @@ Version 2.1.126 mcMMO now relies on NMS for some of its features, if NMS cannot properly be wired up when initializing mcMMO behaviours relying on NMS will either be partially supported or disabled mcMMO now has a compatibility mode, any features that require specific versions of Minecraft for full functionality will be disabled if your server is not running a compatible version, mcMMO will still function in compatibility mode, but either the feature will be modified or disabled depending on the version of the server software New command /mmocompat - Shows information about whether or not mcMMO is fully functional or if some features are disabled due to the server software not being fully supported. Can be used by players or console. + New command /mmoxpbar (alias /xpbarsettings) - Players can choose to always show XP bars or to never show XP bars on a per skill basis + XPBars now last for 3 seconds before hiding instead of 2 seconds Fixed an exploit involving fishing rods mcMMO is now less verbose about unsupported materials found in configs Notes: There are no features that rely on NMS in this version, it took a lot of work to write the NMS framework and I'm going to delay implementation for future versions. + /mmoxpbar (or /xpbarsettings) example usages + /mmoxpbar show archery - Always show archery XP bar + /mmoxpbar hide acrobatics - Never show acrobatics XP bar + /mmoxpbar reset - Reset all settings related to XP bars (hide/show) Version 2.1.125 *Fixed a bug where you could not place blocks on top of certain repair/salvage anvils diff --git a/src/main/java/com/gmail/nossr50/commands/player/XPBarCommand.java b/src/main/java/com/gmail/nossr50/commands/player/XPBarCommand.java new file mode 100644 index 000000000..0029f4844 --- /dev/null +++ b/src/main/java/com/gmail/nossr50/commands/player/XPBarCommand.java @@ -0,0 +1,104 @@ +package com.gmail.nossr50.commands.player; + +import com.gmail.nossr50.datatypes.player.McMMOPlayer; +import com.gmail.nossr50.datatypes.skills.PrimarySkillType; +import com.gmail.nossr50.util.experience.ExperienceBarManager; +import com.gmail.nossr50.util.player.UserManager; +import com.gmail.nossr50.util.skills.SkillUtils; +import com.google.common.collect.ImmutableList; +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; +import org.bukkit.command.TabExecutor; +import org.bukkit.entity.Player; +import org.bukkit.util.StringUtil; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.ArrayList; +import java.util.List; + +public class XPBarCommand implements TabExecutor { + + @Override + public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) { + if(sender instanceof Player) { + McMMOPlayer mmoPlayer = UserManager.getPlayer((Player) sender); + if(mmoPlayer == null) { + sender.sendMessage("Your mcMMO data has not loaded yet! Try again in a few moments."); + return false; + } + + if(args.length == 0) { + return false; + } else if(args.length < 2) { + String option = args[0]; + + if(option.equalsIgnoreCase(ExperienceBarManager.XPBarSettingTarget.RESET.toString())) { + mmoPlayer.getExperienceBarManager().xpBarSettingToggle(ExperienceBarManager.XPBarSettingTarget.RESET, null); + return true; + } else { + return false; + } + + //Per skill Settings path + } else if (args.length == 2) { + String skillName = args[1]; + + if(SkillUtils.isSkill(skillName)) { + + PrimarySkillType targetSkill = PrimarySkillType.getSkill(skillName); + + //Target setting + String option = args[0].toLowerCase(); + + ExperienceBarManager.XPBarSettingTarget settingTarget = getSettingTarget(option); + if(settingTarget != null && settingTarget != ExperienceBarManager.XPBarSettingTarget.RESET) { + //Change setting + mmoPlayer.getExperienceBarManager().xpBarSettingToggle(settingTarget, targetSkill); + return true; + } else { + return false; + } + } else { + return false; + } + } else { + return false; + } + } else { + return false; + } + } + + private @Nullable ExperienceBarManager.XPBarSettingTarget getSettingTarget(String string) { + switch (string.toLowerCase()) { + case "hide": + return ExperienceBarManager.XPBarSettingTarget.HIDE; + case "show": + return ExperienceBarManager.XPBarSettingTarget.SHOW; + case "reset": + return ExperienceBarManager.XPBarSettingTarget.RESET; + } + + return null; + } + + @Override + public List onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, String[] args) { + switch (args.length) { + case 1: + List options = new ArrayList<>(); + + for(ExperienceBarManager.XPBarSettingTarget settingTarget : ExperienceBarManager.XPBarSettingTarget.values()) { + options.add(settingTarget.toString()); + } + + return StringUtil.copyPartialMatches(args[0], options, new ArrayList<>(ExperienceBarManager.XPBarSettingTarget.values().length)); + case 2: + if(!args[0].equalsIgnoreCase(ExperienceBarManager.XPBarSettingTarget.RESET.toString())) + return StringUtil.copyPartialMatches(args[1], PrimarySkillType.SKILL_NAMES, new ArrayList(PrimarySkillType.SKILL_NAMES.size())); + default: + return ImmutableList.of(); + } + } +} diff --git a/src/main/java/com/gmail/nossr50/datatypes/player/McMMOPlayer.java b/src/main/java/com/gmail/nossr50/datatypes/player/McMMOPlayer.java index d6da1bb03..a90280805 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/player/McMMOPlayer.java +++ b/src/main/java/com/gmail/nossr50/datatypes/player/McMMOPlayer.java @@ -207,6 +207,10 @@ public class McMMOPlayer { return (currentXP / maxXP); } + public ExperienceBarManager getExperienceBarManager() { + return experienceBarManager; + } + public AcrobaticsManager getAcrobaticsManager() { return (AcrobaticsManager) skillManagers.get(PrimarySkillType.ACROBATICS); } diff --git a/src/main/java/com/gmail/nossr50/listeners/EntityListener.java b/src/main/java/com/gmail/nossr50/listeners/EntityListener.java index ce6eb0b87..5b79227ba 100644 --- a/src/main/java/com/gmail/nossr50/listeners/EntityListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/EntityListener.java @@ -28,7 +28,6 @@ import com.gmail.nossr50.util.skills.CombatUtils; import com.gmail.nossr50.util.skills.SkillActivationType; import com.gmail.nossr50.worldguard.WorldGuardManager; import com.gmail.nossr50.worldguard.WorldGuardUtils; -import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.OfflinePlayer; import org.bukkit.block.Block; diff --git a/src/main/java/com/gmail/nossr50/util/commands/CommandRegistrationManager.java b/src/main/java/com/gmail/nossr50/util/commands/CommandRegistrationManager.java index 4f4d628da..819ba26b7 100644 --- a/src/main/java/com/gmail/nossr50/util/commands/CommandRegistrationManager.java +++ b/src/main/java/com/gmail/nossr50/util/commands/CommandRegistrationManager.java @@ -429,8 +429,16 @@ public final class CommandRegistrationManager { command.setExecutor(new CompatibilityCommand()); } + private static void registerXPBarCommand() { + PluginCommand command = mcMMO.p.getCommand("mmoxpbar"); //TODO: Localize + command.setDescription(LocaleLoader.getString("Commands.Description.mmoxpbar")); + command.setUsage(LocaleLoader.formatString("Commands.Usage.1", "mmoxpbar", "", "")); + command.setExecutor(new XPBarCommand()); + } + public static void registerCommands() { // Generic Commands + registerXPBarCommand(); registerMmoInfoCommand(); registerMmoDebugCommand(); registerMcImportCommand(); diff --git a/src/main/java/com/gmail/nossr50/util/experience/ExperienceBarManager.java b/src/main/java/com/gmail/nossr50/util/experience/ExperienceBarManager.java index e21843c8a..bc7b8b649 100644 --- a/src/main/java/com/gmail/nossr50/util/experience/ExperienceBarManager.java +++ b/src/main/java/com/gmail/nossr50/util/experience/ExperienceBarManager.java @@ -3,33 +3,51 @@ package com.gmail.nossr50.util.experience; import com.gmail.nossr50.config.experience.ExperienceConfig; import com.gmail.nossr50.datatypes.player.McMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; +import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.runnables.skills.ExperienceBarHideTask; +import com.gmail.nossr50.util.player.NotificationManager; import org.bukkit.plugin.Plugin; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import java.util.HashMap; +import java.util.HashSet; /** * ExperienceBarManager handles displaying and updating mcMMO experience bars for players * Each ExperienceBarManager only manages a single player */ public class ExperienceBarManager { - private McMMOPlayer mcMMOPlayer; + private final McMMOPlayer mcMMOPlayer; + int delaySeconds = 3; - HashMap experienceBars; - HashMap experienceBarHideTaskHashMap; + private HashMap experienceBars; + private HashMap experienceBarHideTaskHashMap; + + private HashSet alwaysVisible; + private HashSet disabledBars; public ExperienceBarManager(McMMOPlayer mcMMOPlayer) { - //Init map + this.mcMMOPlayer = mcMMOPlayer; + init(); + } + + public void init() { + //Init maps experienceBars = new HashMap<>(); experienceBarHideTaskHashMap = new HashMap<>(); - this.mcMMOPlayer = mcMMOPlayer; + //Init sets + alwaysVisible = new HashSet<>(); + disabledBars = new HashSet<>(); } public void updateExperienceBar(PrimarySkillType primarySkillType, Plugin plugin) { - if(!ExperienceConfig.getInstance().isExperienceBarsEnabled() || !ExperienceConfig.getInstance().isExperienceBarEnabled(primarySkillType)) + if(disabledBars.contains(primarySkillType) + || !ExperienceConfig.getInstance().isExperienceBarsEnabled() + || !ExperienceConfig.getInstance().isExperienceBarEnabled(primarySkillType)) return; //Init Bar @@ -49,15 +67,17 @@ public class ExperienceBarManager { if(experienceBarHideTaskHashMap.get(primarySkillType) != null) { experienceBarHideTaskHashMap.get(primarySkillType).cancel(); - scheduleHideTask(primarySkillType, plugin); - } else { - scheduleHideTask(primarySkillType, plugin); } + + scheduleHideTask(primarySkillType, plugin); } private void scheduleHideTask(PrimarySkillType primarySkillType, Plugin plugin) { + if(alwaysVisible.contains(primarySkillType)) + return; + ExperienceBarHideTask experienceBarHideTask = new ExperienceBarHideTask(this, mcMMOPlayer, primarySkillType); - experienceBarHideTask.runTaskLater(plugin, 20*2); + experienceBarHideTask.runTaskLater(plugin, 20* delaySeconds); experienceBarHideTaskHashMap.put(primarySkillType, experienceBarHideTask); } @@ -70,4 +90,55 @@ public class ExperienceBarManager { { experienceBarHideTaskHashMap.remove(primarySkillType); } + + public void xpBarSettingToggle(@NotNull XPBarSettingTarget settingTarget, @Nullable PrimarySkillType skillType) { + switch(settingTarget) { + case SHOW: + disabledBars.remove(skillType); + alwaysVisible.add(skillType); + + //Remove lingering tasks + if(experienceBarHideTaskHashMap.containsKey(skillType)) { + experienceBarHideTaskHashMap.get(skillType).cancel(); + } + + updateExperienceBar(skillType, mcMMO.p); + break; + case HIDE: + alwaysVisible.remove(skillType); + disabledBars.add(skillType); + + //Remove lingering tasks + if(experienceBarHideTaskHashMap.containsKey(skillType)) { + experienceBarHideTaskHashMap.get(skillType).cancel(); + } + + hideExperienceBar(skillType); + break; + case RESET: + //Hide all currently permanent bars + for(PrimarySkillType permanent : alwaysVisible) { + hideExperienceBar(permanent); + } + + alwaysVisible.clear(); + disabledBars.clear(); + + break; + } + + informPlayer(settingTarget, skillType); + + } + + private void informPlayer(@NotNull ExperienceBarManager.@NotNull XPBarSettingTarget settingTarget, @Nullable PrimarySkillType skillType) { + //Inform player of setting change + if(settingTarget != XPBarSettingTarget.RESET) { + NotificationManager.sendPlayerInformationChatOnlyPrefixed(mcMMOPlayer.getPlayer(), "Commands.XPBar.SettingChanged", skillType.getName(), settingTarget.toString()); + } else { + NotificationManager.sendPlayerInformationChatOnlyPrefixed(mcMMOPlayer.getPlayer(), "Commands.XPBar.Reset"); + } + } + + public enum XPBarSettingTarget { SHOW, HIDE, RESET } } diff --git a/src/main/resources/locale/locale_cs_CZ.properties b/src/main/resources/locale/locale_cs_CZ.properties index bba15218e..afbb75542 100644 --- a/src/main/resources/locale/locale_cs_CZ.properties +++ b/src/main/resources/locale/locale_cs_CZ.properties @@ -645,3 +645,5 @@ Scoreboard.Misc.Level=Level Scoreboard.Misc.CurrentXP=Aktualn\u00ed XP Scoreboard.Misc.RemainingXP=Zb\u00fdvaj\u00edc\u00ed XP Scoreboard.Misc.Overall=Celkov\u011b +Commands.XPBar.Usage=Proper usage is /mmoxpbar +Commands.Description.mmoxpbar=Player settings for mcMMO XP bars diff --git a/src/main/resources/locale/locale_cy.properties b/src/main/resources/locale/locale_cy.properties index dd6fc8bd6..a7093305e 100644 --- a/src/main/resources/locale/locale_cy.properties +++ b/src/main/resources/locale/locale_cy.properties @@ -465,3 +465,5 @@ MOTD.Version=[[GOLD]][mcMMO] Running version [[DARK_AQUA]]{0} MOTD.Website=[[GOLD]][mcMMO] [[GREEN]]{0}[[YELLOW]] - mcMMO Website Skills.AbilityGateRequirementFail= Smelting.SubSkill.UnderstandingTheArt.Name= +Commands.XPBar.Usage=Proper usage is /mmoxpbar +Commands.Description.mmoxpbar=Player settings for mcMMO XP bars diff --git a/src/main/resources/locale/locale_da.properties b/src/main/resources/locale/locale_da.properties index 087f11d89..f61c86c9b 100644 --- a/src/main/resources/locale/locale_da.properties +++ b/src/main/resources/locale/locale_da.properties @@ -464,3 +464,5 @@ MOTD.Hardcore.Vampirism.Stats=[[GOLD]][mcMMO] [[DARK_AQUA]Vampyr Statistik Igle: MOTD.PerksPrefix=[mcMMO Frynsegoder] MOTD.Version=[[GOLD]][mcMMO] K\u00f8rer version [[DARK_AQUA]]{0} MOTD.Website=[[GOLD]][mcMMO] [[GREEN]]{0}[[YELLOW]] - mcMMO Hjemmeside +Commands.XPBar.Usage=Proper usage is /mmoxpbar +Commands.Description.mmoxpbar=Player settings for mcMMO XP bars diff --git a/src/main/resources/locale/locale_de.properties b/src/main/resources/locale/locale_de.properties index 4a1fb3f96..7156c0c06 100644 --- a/src/main/resources/locale/locale_de.properties +++ b/src/main/resources/locale/locale_de.properties @@ -1032,3 +1032,5 @@ Profile.PendingLoad=&cDeine mcMMO Daten wurden noch nicht geladen. Profile.Loading.FailureNotice=&4[A] &cmcMMO konnte die Spielerdaten von &e{0}&c leider nicht laden. Bitte überprüfe deine Datenbankeinstellungen. &dVersuche: {1}. Reminder.Squelched=&7Erinnerung: Du erhälst aktuell keinerlei Benachrichtigungen von mcMMO, um dies zu ändern, nutze den /mcnotify Befehl. Dies ist eine stündliche, automatische Erinnerung. Profile.Loading.FailurePlayer=&cmcMMO hat Probleme beim Laden deiner Daten nach &a{0}&c Versuchen. &8Kontaktiere den Serveradmin bezüglich diesem Problem. mcMMO wird weiterhin versuchen, deine Daten zu laden, bis du den Server verlässt. So lange kannst du keine Skillerfahrung sammeln und diese auch nicht nutzen. +Commands.XPBar.Usage=Proper usage is /mmoxpbar +Commands.Description.mmoxpbar=Player settings for mcMMO XP bars diff --git a/src/main/resources/locale/locale_en_US.properties b/src/main/resources/locale/locale_en_US.properties index 9d2b3ca7a..802288f64 100644 --- a/src/main/resources/locale/locale_en_US.properties +++ b/src/main/resources/locale/locale_en_US.properties @@ -699,6 +699,8 @@ Commands.Scoreboard.Help.2=[[DARK_AQUA]]/mcscoreboard[[AQUA]] keep [[WHITE]] - k Commands.Scoreboard.Help.3=[[DARK_AQUA]]/mcscoreboard[[AQUA]] time [n] [[WHITE]] - clear the McMMO scoreboard after [[LIGHT_PURPLE]]n[[WHITE]] seconds Commands.Scoreboard.Tip.Keep=[[GOLD]]Tip: Use [[RED]]/mcscoreboard keep[[GOLD]] while the scoreboard is shown to keep it from going away. Commands.Scoreboard.Tip.Clear=[[GOLD]]Tip: Use [[RED]]/mcscoreboard clear[[GOLD]] to get rid of the scoreboard. +Commands.XPBar.Reset=[[GOLD]]XP Bar settings for mcMMO have been reset. +Commands.XPBar.SettingChanged=[[GOLD]]XP Bar setting for [[GREEN]]{0}[[GOLD]] is now set to [[GREEN]]{1} Commands.Skill.Invalid=That is not a valid skillname! Commands.Skill.ChildSkill=Child skills are not valid for this command! Commands.Skill.Leaderboard=--mcMMO [[BLUE]]{0}[[YELLOW]] Leaderboard-- @@ -1108,3 +1110,5 @@ Locale.Reloaded=[[GREEN]]Locale reloaded! #Player Leveling Stuff LevelCap.PowerLevel=[[GOLD]]([[GREEN]]mcMMO[[GOLD]]) [[YELLOW]]You have reached the power level cap of [[RED]]{0}[[YELLOW]]. You will cease to level in skills from this point on. LevelCap.Skill=[[GOLD]]([[GREEN]]mcMMO[[GOLD]]) [[YELLOW]]You have reached the level cap of [[RED]]{0}[[YELLOW]] for [[GOLD]]{1}[[YELLOW]]. You will cease to level in this skill from this point on. +Commands.XPBar.Usage=Proper usage is /mmoxpbar +Commands.Description.mmoxpbar=Player settings for mcMMO XP bars diff --git a/src/main/resources/locale/locale_es.properties b/src/main/resources/locale/locale_es.properties index ef38d8b78..9cd35df70 100644 --- a/src/main/resources/locale/locale_es.properties +++ b/src/main/resources/locale/locale_es.properties @@ -673,3 +673,5 @@ Scoreboard.Misc.Level=Nivel Scoreboard.Misc.CurrentXP=XP actual Scoreboard.Misc.RemainingXP=XP restante Scoreboard.Misc.Overall=Total +Commands.XPBar.Usage=Proper usage is /mmoxpbar +Commands.Description.mmoxpbar=Player settings for mcMMO XP bars diff --git a/src/main/resources/locale/locale_fi.properties b/src/main/resources/locale/locale_fi.properties index 16ced7dab..f56261299 100644 --- a/src/main/resources/locale/locale_fi.properties +++ b/src/main/resources/locale/locale_fi.properties @@ -197,3 +197,5 @@ Stats.Header.Combat=[[GOLD]]-=TAISTELUTAIDOT=- Stats.Header.Gathering=[[GOLD]]-=Resurssinkeruutaidot=- Stats.Header.Misc=[[GOLD]]-=SEKALAISET TAIDOT=- Stats.Own.Stats=[[GREEN]][mcMMO] Tilastot +Commands.XPBar.Usage=Proper usage is /mmoxpbar +Commands.Description.mmoxpbar=Player settings for mcMMO XP bars diff --git a/src/main/resources/locale/locale_fr.properties b/src/main/resources/locale/locale_fr.properties index 8c6eb9a26..cee540aea 100644 --- a/src/main/resources/locale/locale_fr.properties +++ b/src/main/resources/locale/locale_fr.properties @@ -863,3 +863,5 @@ Scoreboard.Misc.Ability=Capacit\u00e9 Profile.Loading.Success=[[GREEN]]G\u00e9nial! Vos donn\u00e9es McMMO ont \u00e9t\u00e9 charg\u00e9es. Profile.Loading.Failure=McMMO ne peut toujours pas charger vos donn\u00e9es. Vous devriez sans doute [[AQUA]]contacter le possesseur du serveur.\n[[YELLOW]]Vous pouvez toujours jouer sur le serveur, mais vous n\'aurez [[BOLD]]pas de niveaux McMMO[[YELLOW]] et chaque EXP obtenu[[BOLD]]ne sera pas sauvergard\u00e9[[YELLOW]]. Profile.Loading.AdminFailureNotice=[[DARK_RED]][A][[RED]] McMMO a \u00e9t\u00e9 incapable de charger les donn\u00e9es du joueur [[YELLOW]]{0}[[RED]]. [[LIGHT_PURPLE]]Veuillez inspecter votre installation de la base de donn\u00e9es. +Commands.XPBar.Usage=Proper usage is /mmoxpbar +Commands.Description.mmoxpbar=Player settings for mcMMO XP bars diff --git a/src/main/resources/locale/locale_hu_HU.properties b/src/main/resources/locale/locale_hu_HU.properties index fc239ba87..f50315c1d 100644 --- a/src/main/resources/locale/locale_hu_HU.properties +++ b/src/main/resources/locale/locale_hu_HU.properties @@ -1108,3 +1108,5 @@ Locale.Reloaded=[[GREEN]]Ford\u00EDt\u00E1s \u00FAjrat\u00F6ltve! #Player Leveling Stuff LevelCap.PowerLevel=[[GOLD]]([[GREEN]]mcMMO[[GOLD]]) [[YELLOW]]El\u00E9rted ezt a teljes\u00EDtm\u00E9nyszintet [[RED]]{0}[[YELLOW]]. Ezen a ponton megsz\u0171nik a k\u00E9pess\u00E9gek szintje. LevelCap.Skill=[[GOLD]]([[GREEN]]mcMMO[[GOLD]]) [[YELLOW]]El\u00E9rted ezt a szintet [[RED]]{0}[[YELLOW]] ebben [[GOLD]]{1}[[YELLOW]]. Ezen a ponton megsz\u0171nik a k\u00E9pess\u00E9g szintje. +Commands.XPBar.Usage=Proper usage is /mmoxpbar +Commands.Description.mmoxpbar=Player settings for mcMMO XP bars diff --git a/src/main/resources/locale/locale_it.properties b/src/main/resources/locale/locale_it.properties index 7fc89d026..cb5786395 100644 --- a/src/main/resources/locale/locale_it.properties +++ b/src/main/resources/locale/locale_it.properties @@ -1139,3 +1139,5 @@ Locale.Reloaded=[[GREEN]]Traduzioni ricaricate! #Player Leveling Stuff LevelCap.PowerLevel=[[GOLD]]([[GREEN]]mcMMO[[GOLD]]) [[YELLOW]]Hai raggiunto il livello massimo di potenza di [[RED]]{0}[[YELLOW]]. Da questo punto in poi cesserai di aumentare di livello nelle tue abilit\u00E0. LevelCap.Skill=[[GOLD]]([[GREEN]]mcMMO[[GOLD]]) [[YELLOW]]Hai raggiunto il livello massimo di [[RED]]{0}[[YELLOW]] per [[GOLD]]{1}[[YELLOW]]. Da questo punto in poi cesserai di salire di livello in questa abilit\u00E0. +Commands.XPBar.Usage=Proper usage is /mmoxpbar +Commands.Description.mmoxpbar=Player settings for mcMMO XP bars diff --git a/src/main/resources/locale/locale_ja_JP.properties b/src/main/resources/locale/locale_ja_JP.properties index 87771d5d3..71f1ddec2 100644 --- a/src/main/resources/locale/locale_ja_JP.properties +++ b/src/main/resources/locale/locale_ja_JP.properties @@ -1124,4 +1124,6 @@ Locale.Reloaded=[[GREEN]]\u30ed\u30b1\u30fc\u30eb \u30ea\u30ed\u30fc\u30c9\uff01 # Player Leveling Stuff LevelCap.PowerLevel=[[GOLD]]([[GREEN]]mcMMO[[GOLD]]) [[RED]]{0}[[YELLOW]]\u306e\u30d1\u30ef\u30fc\u30ec\u30d9\u30eb\u306e\u30ec\u30d9\u30eb\u30ad\u30e3\u30c3\u30d7\u306b\u9054\u3057\u307e\u3057\u305f\u3002\u3053\u308c\u4ee5\u964d\u30b9\u30ad\u30eb\u306e\u30ec\u30d9\u30eb\u30a2\u30c3\u30d7\u306f\u3057\u307e\u305b\u3093\u3002 -LevelCap.Skill=[[GOLD]]([[GREEN]]mcMMO[[GOLD]]) [[GOLD]]{1}[[YELLOW]]\u306e\u30ec\u30d9\u30eb\u30ad\u30e3\u30c3\u30d7[[RED]]{0}[[YELLOW]]\u306b\u9054\u3057\u307e\u3057\u305f\u3002\u3053\u308c\u4ee5\u964d\u30b9\u30ad\u30eb\u306e\u30ec\u30d9\u30eb\u30a2\u30c3\u30d7\u306f\u3057\u307e\u305b\u3093\u3002 \ No newline at end of file +LevelCap.Skill=[[GOLD]]([[GREEN]]mcMMO[[GOLD]]) [[GOLD]]{1}[[YELLOW]]\u306e\u30ec\u30d9\u30eb\u30ad\u30e3\u30c3\u30d7[[RED]]{0}[[YELLOW]]\u306b\u9054\u3057\u307e\u3057\u305f\u3002\u3053\u308c\u4ee5\u964d\u30b9\u30ad\u30eb\u306e\u30ec\u30d9\u30eb\u30a2\u30c3\u30d7\u306f\u3057\u307e\u305b\u3093\u3002 +Commands.XPBar.Usage=Proper usage is /mmoxpbar +Commands.Description.mmoxpbar=Player settings for mcMMO XP bars \ No newline at end of file diff --git a/src/main/resources/locale/locale_ko.properties b/src/main/resources/locale/locale_ko.properties index a06114f3b..bffa20558 100644 --- a/src/main/resources/locale/locale_ko.properties +++ b/src/main/resources/locale/locale_ko.properties @@ -968,4 +968,6 @@ Scoreboard.Misc.Overall=[[GOLD]]\uC885\uD569 Profile.Loading.Success=[[GREEN]]\uB2F9\uC2E0\uC758 mcMMO \uD504\uB85C\uD30C\uC77C\uC774 \uBD88\uB7EC\uC640\uC84C\uC2B5\uB2C8\uB2E4. Profile.Loading.Failure=mcMMO\uB294 \uC5EC\uC804\uD788 \uB2F9\uC2E0\uC758 \uB370\uC774\uD130\uB97C \uC77D\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB2F9\uC2E0\uC740 \uC544\uB9C8\uB3C4 [[AQUA]]\uC11C\uBC84\uAD00\uB9AC\uC790\uC640 \uC5F0\uB77D[[RED]]\uD558\uAE30\uB97C \uC6D0\uD560 \uAC83\uC785\uB2C8\uB2E4.\n[[YELLOW]]\uB2F9\uC2E0\uC740 \uC5EC\uC804\uD788 \uC11C\uBC84\uC5D0\uC11C \uAC8C\uC784\uC911\uC774\uC9C0\uB9CC, \uB2F9\uC2E0\uC740 [[BOLD]]mcMMO \uB808\uBCA8\uC774 \uC5C6\uACE0[[YELLOW]] \uB2F9\uC2E0\uC774 \uC5BB\uC740 \uC5B4\uB290 XP\uB3C4 [[BOLD]]\uC800\uC7A5\uB418\uC9C0 \uC54A\uC744 \uAC81\uB2C8\uB2E4[[YELLOW]]. Profile.Loading.AdminFailureNotice=[[DARK_RED]][A][[RED]] mcMMO\uB294 [[YELLOW]]{0}[[RED]] \uD50C\uB808\uC774\uC5B4 \uB370\uC774\uD130 \uC77D\uAE30\uAC00 \uBD88\uAC00\uB2A5\uD569\uB2C8\uB2E4. [[LIGHT_PURPLE]]\uB2F9\uC2E0\uC758 \uB370\uC774\uD130\uBCA0\uC774\uC2A4 \uC124\uCE58\uB97C \uAC80\uC0AC\uD574\uC8FC\uC138\uC694. +Commands.XPBar.Usage=Proper usage is /mmoxpbar +Commands.Description.mmoxpbar=Player settings for mcMMO XP bars diff --git a/src/main/resources/locale/locale_lt_LT.properties b/src/main/resources/locale/locale_lt_LT.properties index 03296ff8a..6952e727b 100644 --- a/src/main/resources/locale/locale_lt_LT.properties +++ b/src/main/resources/locale/locale_lt_LT.properties @@ -1108,3 +1108,5 @@ Locale.Reloaded=[[GREEN]]Kalbos nustatymai atnaujinti! #Player Leveling Stuff LevelCap.PowerLevel=[[GOLD]]([[GREEN]]mcMMO[[GOLD]]) [[YELLOW]]You have reached the power level cap of [[RED]]{0}[[YELLOW]]. You will cease to level in skills from this point on. LevelCap.Skill=[[GOLD]]([[GREEN]]mcMMO[[GOLD]]) [[YELLOW]]You have reached the level cap of [[RED]]{0}[[YELLOW]] for [[GOLD]]{1}[[YELLOW]]. You will cease to level in this skill from this point on. +Commands.XPBar.Usage=Proper usage is /mmoxpbar +Commands.Description.mmoxpbar=Player settings for mcMMO XP bars diff --git a/src/main/resources/locale/locale_nl.properties b/src/main/resources/locale/locale_nl.properties index 83479f641..3c4bb7f19 100644 --- a/src/main/resources/locale/locale_nl.properties +++ b/src/main/resources/locale/locale_nl.properties @@ -429,3 +429,5 @@ Scoreboard.Misc.Level=Niveau Scoreboard.Misc.CurrentXP=Huidige XP Scoreboard.Misc.RemainingXP=Resterende XP Scoreboard.Misc.Overall=Globaal +Commands.XPBar.Usage=Proper usage is /mmoxpbar +Commands.Description.mmoxpbar=Player settings for mcMMO XP bars diff --git a/src/main/resources/locale/locale_pl.properties b/src/main/resources/locale/locale_pl.properties index ea44c55fc..3a2d5422f 100644 --- a/src/main/resources/locale/locale_pl.properties +++ b/src/main/resources/locale/locale_pl.properties @@ -573,3 +573,5 @@ Commands.Description.mcnotify=Wlacza/wylacza informacje na temat umiejetnosci mc Commands.Description.vampirism=Zmodyfikuj wartosc procentowa na aktywowanie wampiryzmu mcMMO lub go wlacz/wylacz UpdateChecker.Outdated=Uzywasz przestarzalej wersji mcMMO! UpdateChecker.NewAvailable=Dostepna jest nowa wersja na BukkitDev. +Commands.XPBar.Usage=Proper usage is /mmoxpbar +Commands.Description.mmoxpbar=Player settings for mcMMO XP bars diff --git a/src/main/resources/locale/locale_pt_BR.properties b/src/main/resources/locale/locale_pt_BR.properties index 95c800825..292fc5b58 100644 --- a/src/main/resources/locale/locale_pt_BR.properties +++ b/src/main/resources/locale/locale_pt_BR.properties @@ -576,3 +576,5 @@ Scoreboard.Misc.Overall=[[GOLD]]Geral Profile.Loading.Success=[[GREEN]]Seu perfil mcMMO foi carregado. Profile.Loading.Failure=[[RED]]mcMMO still cannot load your data. You may want to [[AQUA]]contact the server owner.\n[[YELLOW]]You can still play on the server, but you will have [[BOLD]]no mcMMO levels[[YELLOW]] and any XP you get [[BOLD]]will not be saved[[YELLOW]]. Profile.Loading.AdminFailureNotice=[[DARK_RED]][A][[RED]] mcMMO was unable to load the player data for [[YELLOW]]{0}[[RED]]. [[LIGHT_PURPLE]]Please inspect your database setup. +Commands.XPBar.Usage=Proper usage is /mmoxpbar +Commands.Description.mmoxpbar=Player settings for mcMMO XP bars diff --git a/src/main/resources/locale/locale_ru.properties b/src/main/resources/locale/locale_ru.properties index 2710d8151..d9b502e3c 100644 --- a/src/main/resources/locale/locale_ru.properties +++ b/src/main/resources/locale/locale_ru.properties @@ -1164,3 +1164,5 @@ Locale.Reloaded=[[GREEN]]\u041b\u043e\u043a\u0430\u043b\u044c \u043f\u0435\u0440 #Player Leveling Stuff LevelCap.PowerLevel=[[GOLD]]([[GREEN]]mcMMO[[GOLD]]) [[YELLOW]]\u0412\u044b \u0434\u043e\u0441\u0442\u0438\u0433\u043b\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f [[RED]]{0}[[YELLOW]]. \u0412\u0430\u0448\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0443\u043b\u0443\u0447\u0448\u0430\u0442\u044c\u0441\u044f. LevelCap.Skill=[[GOLD]]([[GREEN]]mcMMO[[GOLD]]) [[YELLOW]]\u0412\u044b \u0434\u043e\u0441\u0442\u0438\u0433\u043b\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f [[RED]]{0}[[YELLOW]] \u0434\u043b\u044f [[GOLD]]{1}[[YELLOW]]. \u0412\u0430\u0448\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0443\u043b\u0443\u0447\u0448\u0430\u0442\u044c\u0441\u044f. +Commands.XPBar.Usage=Proper usage is /mmoxpbar +Commands.Description.mmoxpbar=Player settings for mcMMO XP bars diff --git a/src/main/resources/locale/locale_sv.properties b/src/main/resources/locale/locale_sv.properties index 8e4ed3028..37ec6b2cd 100644 --- a/src/main/resources/locale/locale_sv.properties +++ b/src/main/resources/locale/locale_sv.properties @@ -149,3 +149,5 @@ Stats.Header.Combat=[[GOLD]]-=Stridsf\u00e4rdigheter=- Stats.Header.Gathering=[[GOLD]]-=SAMLA F\u00d6RM\u00c5GOR=- Stats.Header.Misc=[[GOLD]]-=Varierande F\u00e4rdogheter=- Stats.Own.Stats=[[GREEN]][mcMMO] Stats +Commands.XPBar.Usage=Proper usage is /mmoxpbar +Commands.Description.mmoxpbar=Player settings for mcMMO XP bars diff --git a/src/main/resources/locale/locale_th_TH.properties b/src/main/resources/locale/locale_th_TH.properties index 003fd5246..8b4f6f353 100644 --- a/src/main/resources/locale/locale_th_TH.properties +++ b/src/main/resources/locale/locale_th_TH.properties @@ -633,3 +633,5 @@ Commands.Description.xplock=\u0e25\u0e47\u0e2d\u0e04 mcMMO \u0e1a\u0e32\u0e23\u0 Commands.Description.xprate=\u0e41\u0e01\u0e49\u0e44\u0e02\u0e2d\u0e31\u0e15\u0e23\u0e32 mcMMO EXP \u0e2b\u0e23\u0e37\u0e2d\u0e40\u0e23\u0e34\u0e48\u0e21\u0e15\u0e49\u0e19\u0e40\u0e2b\u0e15\u0e38\u0e01\u0e32\u0e23\u0e13\u0e4c mcMMO EXP UpdateChecker.Outdated=You are using an outdated version of mcMMO! UpdateChecker.NewAvailable=There is a new version available on BukkitDev. +Commands.XPBar.Usage=Proper usage is /mmoxpbar +Commands.Description.mmoxpbar=Player settings for mcMMO XP bars diff --git a/src/main/resources/locale/locale_zh_CN.properties b/src/main/resources/locale/locale_zh_CN.properties index f1473c859..a1d6bc175 100644 --- a/src/main/resources/locale/locale_zh_CN.properties +++ b/src/main/resources/locale/locale_zh_CN.properties @@ -1108,3 +1108,5 @@ Locale.Reloaded=[[GREEN]]\u8bed\u8a00\u914d\u7f6e\u5df2\u91cd\u65b0\u52a0\u8f7d\ #Player Leveling Stuff LevelCap.PowerLevel=[[GOLD]]([[GREEN]]mcMMO[[GOLD]]) [[YELLOW]]\u4f60\u5df2\u7ecf\u5230\u8fbe\u4e86\u6218\u6597\u529b\u7684\u7b49\u7ea7\u5c01\u9876 [[RED]]{0}[[YELLOW]] \u7ea7. \u4f60\u5c06\u505c\u6b62\u83b7\u53d6\u6280\u80fd\u7ecf\u9a8c. LevelCap.Skill=[[GOLD]]([[GREEN]]mcMMO[[GOLD]]) [[YELLOW]]\u4f60\u5df2\u7ecf\u5230\u8fbe\u4e86 [[GOLD]]{1}[[YELLOW]] \u6280\u80fd\u7684\u7b49\u7ea7\u5c01\u9876 [[RED]]{0}[[YELLOW]] . \u4f60\u7684\u8be5\u6280\u80fd\u5c06\u65e0\u6cd5\u518d\u5347\u7ea7. +Commands.XPBar.Usage=Proper usage is /mmoxpbar +Commands.Description.mmoxpbar=Player settings for mcMMO XP bars diff --git a/src/main/resources/locale/locale_zh_TW.properties b/src/main/resources/locale/locale_zh_TW.properties index 85b97acea..e75749afe 100644 --- a/src/main/resources/locale/locale_zh_TW.properties +++ b/src/main/resources/locale/locale_zh_TW.properties @@ -775,3 +775,5 @@ Recovery.Notice=\u6ce8\u610f: mcMMO[[DARK_RED]]\u7121\u6cd5\u8f09\u5165\u4f60\u7 Recovery.Success=[[GREEN]]\u6210\u529f!\u4f60\u7684mcMMO\u8cc7\u6599\u5df2\u8f09\u5165. Recovery.Failure=mcMMO\u7121\u6cd5\u8f09\u5165\u4f60\u7684\u8cc7\u6599,\u4f60\u53ef\u80fd\u9700\u8981\u806f\u7e6b[[AQUA]]\u904a\u6232\u7ba1\u7406\u54e1\n[[YELLOW]]\u4f60\u53ef\u4ee5\u7e7c\u7e8c\u904a\u6232,\u4f46\u4f60[[BOLD]]\u7121\u6cd5\u5f97\u5230mcMMO\u7b49\u7d1a[[YELLOW]]\u548c\u4efb\u4f55\u7d93\u9a57[[BOLD]]\u6240\u6709\u8cc7\u6599\u4e0d\u6703\u88ab\u5132\u5b58[[YELLOW]]. Recovery.AdminFailureNotice=[[DARK_RED]][A][[RED]]mcMMO\u7121\u6cd5\u8f09\u5165\u73a9\u5bb6[[YELLOW]]{0}[[RED]]\u7684\u8cc7\u6599. [[LIGHT_PURPLE]]\u8acb\u6aa2\u67e5\u4f60\u7684\u8cc7\u6599\u5eab\u6216\u8a2d\u5b9a. +Commands.XPBar.Usage=Proper usage is /mmoxpbar +Commands.Description.mmoxpbar=Player settings for mcMMO XP bars diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index c8f1c2afa..0de7167d5 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -19,6 +19,9 @@ load: POSTWORLD api-version: 1.13 commands: + mmoxpbar: + aliases: xpbarsettings + description: Change XP bar settings mmocompat: description: Information about the server and whether or not its considered fully compatible or running in compatibility mode mmodebug: