mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 14:46:46 +01:00
2.1.170 - papi fix
This commit is contained in:
parent
0b8f4b4733
commit
ba7b6826b4
@ -1,3 +1,6 @@
|
|||||||
|
Version 2.1.170
|
||||||
|
Reverted a change that broke compatibility with the mcMMO papi ecloud thingy
|
||||||
|
|
||||||
Version 2.1.169
|
Version 2.1.169
|
||||||
Fixed a few memory leaks involving arrows
|
Fixed a few memory leaks involving arrows
|
||||||
Fixed mcMMO inappropriately assigning metadata to projectiles not fired from players
|
Fixed mcMMO inappropriately assigning metadata to projectiles not fired from players
|
||||||
|
2
pom.xml
2
pom.xml
@ -2,7 +2,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
||||||
<artifactId>mcMMO</artifactId>
|
<artifactId>mcMMO</artifactId>
|
||||||
<version>2.1.169</version>
|
<version>2.1.170</version>
|
||||||
<name>mcMMO</name>
|
<name>mcMMO</name>
|
||||||
<url>https://github.com/mcMMO-Dev/mcMMO</url>
|
<url>https://github.com/mcMMO-Dev/mcMMO</url>
|
||||||
<scm>
|
<scm>
|
||||||
|
@ -46,6 +46,6 @@ public class AddlevelsCommand extends ExperienceCommand {
|
|||||||
if(isSilent)
|
if(isSilent)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
player.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardSkill.1", value, skill.getLocalizedName()));
|
player.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardSkill.1", value, skill.getName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,6 @@ public class AddxpCommand extends ExperienceCommand {
|
|||||||
if(isSilent)
|
if(isSilent)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
player.sendMessage(LocaleLoader.getString("Commands.addxp.AwardSkill", value, skill.getLocalizedName()));
|
player.sendMessage(LocaleLoader.getString("Commands.addxp.AwardSkill", value, skill.getName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -159,7 +159,7 @@ public abstract class ExperienceCommand implements TabExecutor {
|
|||||||
sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardAll.2", playerName));
|
sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardAll.2", playerName));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardSkill.2", skill.getLocalizedName(), playerName));
|
sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardSkill.2", skill.getName(), playerName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,6 +52,6 @@ public class MmoeditCommand extends ExperienceCommand {
|
|||||||
if(isSilent)
|
if(isSilent)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
player.sendMessage(LocaleLoader.getString("Commands.mmoedit.Modified.1", skill.getLocalizedName(), value));
|
player.sendMessage(LocaleLoader.getString("Commands.mmoedit.Modified.1", skill.getName(), value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -143,7 +143,7 @@ public class SkillresetCommand implements TabExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void handlePlayerMessageSkill(Player player, PrimarySkillType skill) {
|
protected void handlePlayerMessageSkill(Player player, PrimarySkillType skill) {
|
||||||
player.sendMessage(LocaleLoader.getString("Commands.Reset.Single", skill.getLocalizedName()));
|
player.sendMessage(LocaleLoader.getString("Commands.Reset.Single", skill.getName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean validateArguments(CommandSender sender, String skillName) {
|
private boolean validateArguments(CommandSender sender, String skillName) {
|
||||||
@ -155,7 +155,7 @@ public class SkillresetCommand implements TabExecutor {
|
|||||||
sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardAll.2", playerName));
|
sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardAll.2", playerName));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardSkill.2", skill.getLocalizedName(), playerName));
|
sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardSkill.2", skill.getName(), playerName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,6 +59,6 @@ public class HardcoreCommand extends HardcoreModeCommand {
|
|||||||
skill.setHardcoreStatLossEnabled(enable);
|
skill.setHardcoreStatLossEnabled(enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
mcMMO.p.getServer().broadcastMessage(LocaleLoader.getString("Hardcore.Mode." + (enable ? "Enabled" : "Disabled"), LocaleLoader.getString("Hardcore.DeathStatLoss.Name"), (skill == null ? "all skills" : skill.getLocalizedName())));
|
mcMMO.p.getServer().broadcastMessage(LocaleLoader.getString("Hardcore.Mode." + (enable ? "Enabled" : "Disabled"), LocaleLoader.getString("Hardcore.DeathStatLoss.Name"), (skill == null ? "all skills" : skill.getName())));
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -45,7 +45,7 @@ public abstract class SkillCommand implements TabExecutor {
|
|||||||
|
|
||||||
public SkillCommand(PrimarySkillType skill) {
|
public SkillCommand(PrimarySkillType skill) {
|
||||||
this.skill = skill;
|
this.skill = skill;
|
||||||
skillName = skill.getLocalizedName();
|
skillName = skill.getName();
|
||||||
skillGuideCommand = new SkillGuideCommand(skill);
|
skillGuideCommand = new SkillGuideCommand(skill);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -173,10 +173,10 @@ public abstract class SkillCommand implements TabExecutor {
|
|||||||
{
|
{
|
||||||
if(i+1 < parentList.size())
|
if(i+1 < parentList.size())
|
||||||
{
|
{
|
||||||
parentMessage.append(LocaleLoader.getString("Effects.Child.ParentList", parentList.get(i).getLocalizedName(), mcMMOPlayer.getSkillLevel(parentList.get(i))));
|
parentMessage.append(LocaleLoader.getString("Effects.Child.ParentList", parentList.get(i).getName(), mcMMOPlayer.getSkillLevel(parentList.get(i))));
|
||||||
parentMessage.append(ChatColor.GRAY).append(", ");
|
parentMessage.append(ChatColor.GRAY).append(", ");
|
||||||
} else {
|
} else {
|
||||||
parentMessage.append(LocaleLoader.getString("Effects.Child.ParentList", parentList.get(i).getLocalizedName(), mcMMOPlayer.getSkillLevel(parentList.get(i))));
|
parentMessage.append(LocaleLoader.getString("Effects.Child.ParentList", parentList.get(i).getName(), mcMMOPlayer.getSkillLevel(parentList.get(i))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ public class SkillGuideCommand implements CommandExecutor {
|
|||||||
private final String invalidPage = LocaleLoader.getString("Guides.Page.Invalid");
|
private final String invalidPage = LocaleLoader.getString("Guides.Page.Invalid");
|
||||||
|
|
||||||
public SkillGuideCommand(PrimarySkillType skill) {
|
public SkillGuideCommand(PrimarySkillType skill) {
|
||||||
header = LocaleLoader.getString("Guides.Header", skill.getLocalizedName());
|
header = LocaleLoader.getString("Guides.Header", skill.getName());
|
||||||
guide = getGuide(skill);
|
guide = getGuide(skill);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -919,7 +919,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
|
|||||||
}
|
}
|
||||||
int cap = Config.getInstance().getLevelCap(skill);
|
int cap = Config.getInstance().getLevelCap(skill);
|
||||||
if (Integer.parseInt(character[index]) > cap) {
|
if (Integer.parseInt(character[index]) > cap) {
|
||||||
mcMMO.p.getLogger().warning("Truncating " + skill.getLocalizedName() + " to configured max level for player " + character[USERNAME]);
|
mcMMO.p.getLogger().warning("Truncating " + skill.getName() + " to configured max level for player " + character[USERNAME]);
|
||||||
character[index] = cap + "";
|
character[index] = cap + "";
|
||||||
updated = true;
|
updated = true;
|
||||||
}
|
}
|
||||||
|
@ -192,7 +192,7 @@ public class McMMOPlayer implements Identified {
|
|||||||
if(hasReachedPowerLevelCap()) {
|
if(hasReachedPowerLevelCap()) {
|
||||||
NotificationManager.sendPlayerInformationChatOnly(player, "LevelCap.PowerLevel", String.valueOf(Config.getInstance().getPowerLevelCap()));
|
NotificationManager.sendPlayerInformationChatOnly(player, "LevelCap.PowerLevel", String.valueOf(Config.getInstance().getPowerLevelCap()));
|
||||||
} else if(hasReachedLevelCap(primarySkillType)) {
|
} else if(hasReachedLevelCap(primarySkillType)) {
|
||||||
NotificationManager.sendPlayerInformationChatOnly(player, "LevelCap.Skill", String.valueOf(Config.getInstance().getLevelCap(primarySkillType)), primarySkillType.getLocalizedName());
|
NotificationManager.sendPlayerInformationChatOnly(player, "LevelCap.Skill", String.valueOf(Config.getInstance().getLevelCap(primarySkillType)), primarySkillType.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
//Updates from Party sources
|
//Updates from Party sources
|
||||||
@ -827,7 +827,7 @@ public class McMMOPlayer implements Identified {
|
|||||||
int diff = RankUtils.getSuperAbilityUnlockRequirement(skill.getAbility()) - getSkillLevel(skill);
|
int diff = RankUtils.getSuperAbilityUnlockRequirement(skill.getAbility()) - getSkillLevel(skill);
|
||||||
|
|
||||||
//Inform the player they are not yet skilled enough
|
//Inform the player they are not yet skilled enough
|
||||||
NotificationManager.sendPlayerInformation(player, NotificationType.ABILITY_COOLDOWN, "Skills.AbilityGateRequirementFail", String.valueOf(diff), skill.getLocalizedName());
|
NotificationManager.sendPlayerInformation(player, NotificationType.ABILITY_COOLDOWN, "Skills.AbilityGateRequirementFail", String.valueOf(diff), skill.getName());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -983,7 +983,7 @@ public class McMMOPlayer implements Identified {
|
|||||||
String allCDStr = aSuperAbilityCD + ", " + bSuperAbilityCD;
|
String allCDStr = aSuperAbilityCD + ", " + bSuperAbilityCD;
|
||||||
|
|
||||||
NotificationManager.sendPlayerInformation(player, NotificationType.TOOL, "Skills.TooTired.Extra",
|
NotificationManager.sendPlayerInformation(player, NotificationType.TOOL, "Skills.TooTired.Extra",
|
||||||
primarySkillType.getLocalizedName(),
|
primarySkillType.getName(),
|
||||||
allCDStr);
|
allCDStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ public enum PrimarySkillType {
|
|||||||
subSkillNames.add(subSkillType.getNiceNameNoSpaces(subSkillType));
|
subSkillNames.add(subSkillType.getNiceNameNoSpaces(subSkillType));
|
||||||
}
|
}
|
||||||
|
|
||||||
names.add(skill.getLocalizedName());
|
names.add(skill.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
Collections.sort(names);
|
Collections.sort(names);
|
||||||
@ -234,7 +234,7 @@ public enum PrimarySkillType {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLocalizedName() {
|
public String getName() {
|
||||||
return StringUtils.getCapitalized(LocaleLoader.getString(StringUtils.getCapitalized(this.toString()) + ".SkillName"));
|
return StringUtils.getCapitalized(LocaleLoader.getString(StringUtils.getCapitalized(this.toString()) + ".SkillName"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -937,7 +937,7 @@ public class PlayerListener implements Listener {
|
|||||||
// Do these ACTUALLY have to be lower case to work properly?
|
// Do these ACTUALLY have to be lower case to work properly?
|
||||||
for (PrimarySkillType skill : PrimarySkillType.values()) {
|
for (PrimarySkillType skill : PrimarySkillType.values()) {
|
||||||
String skillName = skill.toString().toLowerCase(Locale.ENGLISH);
|
String skillName = skill.toString().toLowerCase(Locale.ENGLISH);
|
||||||
String localizedName = skill.getLocalizedName().toLowerCase(Locale.ENGLISH);
|
String localizedName = skill.getName().toLowerCase(Locale.ENGLISH);
|
||||||
|
|
||||||
if (lowerCaseCommand.equals(localizedName)) {
|
if (lowerCaseCommand.equals(localizedName)) {
|
||||||
event.setMessage(message.replace(command, skillName));
|
event.setMessage(message.replace(command, skillName));
|
||||||
|
@ -53,7 +53,7 @@ public class McrankCommandDisplayTask extends BukkitRunnable {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
rank = skills.get(skill);
|
rank = skills.get(skill);
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Skill", skill.getLocalizedName(), (rank == null ? LocaleLoader.getString("Commands.mcrank.Unranked") : rank)));
|
sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Skill", skill.getName(), (rank == null ? LocaleLoader.getString("Commands.mcrank.Unranked") : rank)));
|
||||||
}
|
}
|
||||||
|
|
||||||
rank = skills.get(null);
|
rank = skills.get(null);
|
||||||
|
@ -61,10 +61,10 @@ public class MctopCommandDisplayTask extends BukkitRunnable {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(sender instanceof Player) {
|
if(sender instanceof Player) {
|
||||||
sender.sendMessage(LocaleLoader.getString("Commands.Skill.Leaderboard", skill.getLocalizedName()));
|
sender.sendMessage(LocaleLoader.getString("Commands.Skill.Leaderboard", skill.getName()));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sender.sendMessage(ChatColor.stripColor(LocaleLoader.getString("Commands.Skill.Leaderboard", skill.getLocalizedName())));
|
sender.sendMessage(ChatColor.stripColor(LocaleLoader.getString("Commands.Skill.Leaderboard", skill.getName())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ public final class CommandRegistrationManager {
|
|||||||
private static void registerSkillCommands() {
|
private static void registerSkillCommands() {
|
||||||
for (PrimarySkillType skill : PrimarySkillType.values()) {
|
for (PrimarySkillType skill : PrimarySkillType.values()) {
|
||||||
String commandName = skill.toString().toLowerCase(Locale.ENGLISH);
|
String commandName = skill.toString().toLowerCase(Locale.ENGLISH);
|
||||||
String localizedName = skill.getLocalizedName().toLowerCase(Locale.ENGLISH);
|
String localizedName = skill.getName().toLowerCase(Locale.ENGLISH);
|
||||||
|
|
||||||
PluginCommand command;
|
PluginCommand command;
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ public class ExperienceBarManager {
|
|||||||
private void informPlayer(@NotNull ExperienceBarManager.@NotNull XPBarSettingTarget settingTarget, @Nullable PrimarySkillType skillType) {
|
private void informPlayer(@NotNull ExperienceBarManager.@NotNull XPBarSettingTarget settingTarget, @Nullable PrimarySkillType skillType) {
|
||||||
//Inform player of setting change
|
//Inform player of setting change
|
||||||
if(settingTarget != XPBarSettingTarget.RESET) {
|
if(settingTarget != XPBarSettingTarget.RESET) {
|
||||||
NotificationManager.sendPlayerInformationChatOnlyPrefixed(mcMMOPlayer.getPlayer(), "Commands.XPBar.SettingChanged", skillType.getLocalizedName(), settingTarget.toString());
|
NotificationManager.sendPlayerInformationChatOnlyPrefixed(mcMMOPlayer.getPlayer(), "Commands.XPBar.SettingChanged", skillType.getName(), settingTarget.toString());
|
||||||
} else {
|
} else {
|
||||||
NotificationManager.sendPlayerInformationChatOnlyPrefixed(mcMMOPlayer.getPlayer(), "Commands.XPBar.Reset");
|
NotificationManager.sendPlayerInformationChatOnlyPrefixed(mcMMOPlayer.getPlayer(), "Commands.XPBar.Reset");
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ public class ScoreboardManager {
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
for (PrimarySkillType type : PrimarySkillType.values()) {
|
for (PrimarySkillType type : PrimarySkillType.values()) {
|
||||||
// Include child skills
|
// Include child skills
|
||||||
skillLabelBuilder.put(type, getShortenedName(colors.get(i) + type.getLocalizedName(), false));
|
skillLabelBuilder.put(type, getShortenedName(colors.get(i) + type.getName(), false));
|
||||||
|
|
||||||
if (type.getAbility() != null) {
|
if (type.getAbility() != null) {
|
||||||
abilityLabelBuilder.put(type.getAbility(), getShortenedName(colors.get(i) + type.getAbility().getLocalizedName()));
|
abilityLabelBuilder.put(type.getAbility(), getShortenedName(colors.get(i) + type.getAbility().getLocalizedName()));
|
||||||
@ -115,7 +115,7 @@ public class ScoreboardManager {
|
|||||||
else {
|
else {
|
||||||
for (PrimarySkillType type : PrimarySkillType.values()) {
|
for (PrimarySkillType type : PrimarySkillType.values()) {
|
||||||
// Include child skills
|
// Include child skills
|
||||||
skillLabelBuilder.put(type, getShortenedName(ChatColor.GREEN + type.getLocalizedName()));
|
skillLabelBuilder.put(type, getShortenedName(ChatColor.GREEN + type.getName()));
|
||||||
|
|
||||||
if (type.getAbility() != null) {
|
if (type.getAbility() != null) {
|
||||||
abilityLabelBuilder.put(type.getAbility(), formatAbility(type.getAbility().getLocalizedName()));
|
abilityLabelBuilder.put(type.getAbility(), formatAbility(type.getAbility().getLocalizedName()));
|
||||||
|
Loading…
Reference in New Issue
Block a user