mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-24 22:26:46 +01:00
Merge branch 'configurable' of github.com:mcMMO-Dev/mcmmo into nbt
This commit is contained in:
commit
ab0fc06dc2
12
.github/FUNDING.yml
vendored
Normal file
12
.github/FUNDING.yml
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [nossr50] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: nossr50 # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: https://paypal.me/nossr50 # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -11,6 +11,7 @@ nbdist/
|
||||
|
||||
### Bash Scripts
|
||||
*.sh
|
||||
!mcmmo-core/src/main/resources/com/gmail/nossr50/locale/doTranslation.sh
|
||||
|
||||
### JetBrains template
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
|
||||
|
11
1
Normal file
11
1
Normal file
@ -0,0 +1,11 @@
|
||||
SkillShot tweaks
|
||||
# Please enter the commit message for your changes. Lines starting
|
||||
# with '#' will be ignored, and an empty message aborts the commit.
|
||||
#
|
||||
# On branch master
|
||||
# Your branch is up to date with 'origin/master'.
|
||||
#
|
||||
# Changes to be committed:
|
||||
# modified: src/main/java/com/gmail/nossr50/skills/archery/Archery.java
|
||||
# modified: src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java
|
||||
#
|
@ -5,6 +5,8 @@ Version 2.2.0
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
mcMMO's config system has been rewritten
|
||||
Retro and Standard mode have been removed, now levels are based around 1-1000 and are changed based on a new setting
|
||||
Added Cosmetic Level Scaling setting to the leveling config, you can use this to for example, make the max level 100 instead of 1000
|
||||
mcMMO build management is now handled by Gradle (KTS) instead of Maven
|
||||
Nearly every config setting has been renamed and most have brand new comments
|
||||
You can now add an unlimited number of custom XP perks with custom defined XP boosts
|
||||
@ -200,8 +202,56 @@ Version 2.2.0
|
||||
Added API method to grab the level cap of a skill by its PrimarySkillType ENUM definition
|
||||
Added API method to check if a skill was being level capped
|
||||
Added 'UndefinedSkillBehaviour' for trying to use a method that has no behaviour defined for the provided skill
|
||||
|
||||
Version 2.1.114
|
||||
Fix some more locale usages, should aim to further prevent issues with oddball locales
|
||||
Fixed a bug where newer versions of MySQL did not like our rank command
|
||||
Added a new setting to turn off the Snow Golem Exploit prevention to experience.yml next to the other exploit fixes
|
||||
Fixed a bug which stopped the optional Endermite XP exploit fix from working
|
||||
|
||||
Version 2.1.113
|
||||
Activating Berserk on a soft block (glass, snow, dirts) will break that material right away instead of only breaking subsequent blocks hit by the player
|
||||
Berserk will now break glass and glass pane blocks
|
||||
Hitting glass with berserk readied will activate it
|
||||
Added GLASS settings to sounds.yml for Berserk
|
||||
Fixed bug where BlockCracker didn't work on infested_stone_bricks
|
||||
Fixed a bug where beacons could be duplicated
|
||||
Check player's PTP world permissions before executing a party teleport
|
||||
Improved how mcMMO handles randomness
|
||||
|
||||
Version 2.1.112
|
||||
Correct locale usage for enum access, now enforces using the english locale to prevent issues with oddball locales for configs/commands
|
||||
Fixed a NPE that can occur if a player engages in combat with specific skills before their profile is loaded
|
||||
mcMMO is now more compatible with certain mob stacking plugins
|
||||
Improved behaviour for mob health bars
|
||||
Archery's Skill Shot bonus damage is now multiplicative instead of additive (nerfing early game skill shot ranks)
|
||||
Sweet Berry Bush's default Herbalism XP is now 50 instead of 300 (Update your experience.yml or delete it to generate a new one)
|
||||
|
||||
Version 2.1.111
|
||||
mcMMO is compatible with the following versions of MC: 1.15 / 1.14.4 / 1.14.3 / 1.14.2 / 1.14.1 / 1.14 / 1.13.2
|
||||
Further prevent nesting of bleed damage calls
|
||||
Warn about reparable/salvage configs with missing sections
|
||||
Added Bee combat experience modifier to experience.yml (Update your experience.yml file, see notes)
|
||||
Breaking a Bee Nest will result in Herbalism XP (Update your experience.yml file, see notes)
|
||||
Breeding bees will now result in Taming XP (Update your experience.yml file, see notes)
|
||||
|
||||
NOTES:
|
||||
You will need to update your experience.yml by hand or delete it to get XP from new things in 1.15
|
||||
The default version of mcMMO's experience.yml looks like this: https://paste.gg/p/anonymous/15c34df6e60d45d9a3508b379a5e6514
|
||||
You'll want to add Bee to combat XP section, and Bee_Nest to Herbalism XP, and Bee to Taming XP section.
|
||||
|
||||
Version 2.1.110
|
||||
Fixed a dupe bug
|
||||
Actually fixed Block Cracker
|
||||
You can now crack Infested Stone Bricks with Block Cracker
|
||||
Added Lithuanian locale (thanks Vyciokazz)
|
||||
|
||||
Version 2.1.109
|
||||
Block Cracker will now correctly crack stone_bricks during Berserk again
|
||||
Added Lily_Of_The_Valley to the Bonus Drops list in config.yml (you'll probably want to add this manually) which enables it to double drop
|
||||
Added missing 1.14 blocks to ability/tool activation blacklists
|
||||
Fixed spamming of incompatible worldguard version message
|
||||
Updated Italian locale (thanks Fabrimat)
|
||||
|
||||
Version 2.1.108
|
||||
Fixed an amusing exploit for easy leveling in Acrobatics
|
||||
|
@ -7,7 +7,7 @@ subprojects {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
maven("https://repo.spongepowered.org/maven")
|
||||
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshoits")
|
||||
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots")
|
||||
maven("https://repo.codemc.org/repository/maven-public")
|
||||
maven("https://maven.sk89q.com/repo")
|
||||
maven("https://mvnrepository.com/artifact/org.jetbrains/annotations")
|
||||
|
@ -11,6 +11,8 @@ import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public class PartyItemShareCommand implements CommandExecutor {
|
||||
|
||||
private final mcMMO pluginRef;
|
||||
@ -35,7 +37,7 @@ public class PartyItemShareCommand implements CommandExecutor {
|
||||
|
||||
switch (args.length) {
|
||||
case 2:
|
||||
ShareMode mode = ShareMode.getShareMode(args[1].toUpperCase());
|
||||
ShareMode mode = ShareMode.getShareMode(args[1].toUpperCase(Locale.ENGLISH));
|
||||
|
||||
if (mode == null) {
|
||||
sender.sendMessage(pluginRef.getLocaleManager().getString("Commands.Usage.2", "party", "itemshare", "<NONE | EQUAL | RANDOM>"));
|
||||
@ -58,7 +60,7 @@ public class PartyItemShareCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
try {
|
||||
handleToggleItemShareCategory(party, ItemShareType.valueOf(args[1].toUpperCase()), toggle);
|
||||
handleToggleItemShareCategory(party, ItemShareType.valueOf(args[1].toUpperCase(Locale.ENGLISH)), toggle);
|
||||
} catch (IllegalArgumentException ex) {
|
||||
sender.sendMessage(pluginRef.getLocaleManager().getString("Commands.Usage.2", "party", "itemshare", "<loot | mining | herbalism | woodcutting | misc> <true | false>"));
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import com.gmail.nossr50.datatypes.party.PartyTeleportRecord;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@ -159,6 +160,22 @@ public class PtpCommand implements TabExecutor {
|
||||
McMMOPlayer mcMMOTarget = pluginRef.getUserManager().getPlayer(targetName);
|
||||
Player target = mcMMOTarget.getPlayer();
|
||||
|
||||
if (pluginRef.getConfigManager().getConfigParty().getPTP().isPtpWorldBasedPermissions()) {
|
||||
World targetWorld = target.getWorld();
|
||||
World playerWorld = player.getWorld();
|
||||
|
||||
if (!pluginRef.getPermissionTools().partyTeleportAllWorlds(player)) {
|
||||
if (!pluginRef.getPermissionTools().partyTeleportWorld(target, targetWorld)) {
|
||||
player.sendMessage(pluginRef.getLocaleManager().formatString("Commands.ptp.NoWorldPermissions", targetWorld.getName()));
|
||||
return;
|
||||
}
|
||||
else if (targetWorld != playerWorld && !pluginRef.getPermissionTools().partyTeleportWorld(player, targetWorld)) {
|
||||
player.sendMessage(pluginRef.getLocaleManager().formatString("Commands.ptp.NoWorldPermissions", targetWorld.getName()));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PartyTeleportRecord ptpRecord = mcMMOTarget.getPartyTeleportRecord();
|
||||
|
||||
if (!ptpRecord.isConfirmRequired()) {
|
||||
|
@ -19,6 +19,7 @@ import org.bukkit.entity.Player;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
|
||||
public abstract class SkillCommand implements TabExecutor {
|
||||
@ -131,7 +132,7 @@ public abstract class SkillCommand implements TabExecutor {
|
||||
}
|
||||
}
|
||||
|
||||
player.sendMessage(pluginRef.getLocaleManager().getString("Guides.Available", skillName, skillName.toLowerCase()));
|
||||
player.sendMessage(pluginRef.getLocaleManager().getString("Guides.Available", skillName, skillName.toLowerCase(Locale.ENGLISH)));
|
||||
}
|
||||
|
||||
private void sendSkillCommandHeader(Player player, McMMOPlayer mcMMOPlayer, int skillValue) {
|
||||
@ -223,10 +224,10 @@ public abstract class SkillCommand implements TabExecutor {
|
||||
String statDescriptionKey = !isExtra ? subSkillType.getLocaleKeyStatDescription(pluginRef) : subSkillType.getLocaleKeyStatExtraDescription(pluginRef);
|
||||
|
||||
if (isCustom)
|
||||
return pluginRef.getLocaleManager().getString(templateKey, pluginRef.getLocaleManager().getString(statDescriptionKey, vars));
|
||||
return pluginRef.getLocaleManager().getString(templateKey, pluginRef.getLocaleManager().getString(statDescriptionKey, (Object[]) vars));
|
||||
else {
|
||||
String[] mergedList = pluginRef.getNotificationManager().addItemToFirstPositionOfArray(pluginRef.getLocaleManager().getString(statDescriptionKey), vars);
|
||||
return pluginRef.getLocaleManager().getString(templateKey, mergedList);
|
||||
return pluginRef.getLocaleManager().getString(templateKey, (Object[]) mergedList);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,6 @@ import com.gmail.nossr50.datatypes.experience.FormulaType;
|
||||
import com.gmail.nossr50.datatypes.party.PartyFeature;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.DamageProperty;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
|
||||
import com.gmail.nossr50.datatypes.skills.subskills.taming.CallOfTheWildType;
|
||||
import com.gmail.nossr50.datatypes.skills.subskills.taming.TamingSummon;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
@ -266,7 +265,6 @@ public final class ConfigManager {
|
||||
customSerializers.registerType(TypeToken.of(CustomXPPerk.class), new CustomXPPerkSerializer());
|
||||
customSerializers.registerType(TypeToken.of(DamageProperty.class), new DamagePropertySerializer());
|
||||
customSerializers.registerType(TypeToken.of(SkillRankProperty.class), new SkillRankPropertySerializer());
|
||||
customSerializers.registerType(TypeToken.of(MaxBonusLevel.class), new MaxBonusLevelSerializer());
|
||||
customSerializers.registerType(TypeToken.of(PlayerNotificationSettings.class), new PlayerNotificationSerializer());
|
||||
customSerializers.registerType(TypeToken.of(SoundSetting.class), new SoundSettingSerializer());
|
||||
// customSerializers.registerType(TypeToken.of(ItemWildcards.class), new ItemWildcardSerializer());
|
||||
@ -483,17 +481,6 @@ public final class ConfigManager {
|
||||
return configRanks.getRootNode();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if this plugin is using retro mode
|
||||
* Retro mode is a 0-1000 skill system
|
||||
* Standard mode is scaled for 1-100
|
||||
*
|
||||
* @return true if retro mode is enabled
|
||||
*/
|
||||
public boolean isRetroMode() {
|
||||
return getConfigLeveling().getConfigSectionLevelingGeneral().getConfigSectionLevelScaling().isRetroModeEnabled();
|
||||
}
|
||||
|
||||
public ConfigExperience getConfigExperience() {
|
||||
return configExperience.getConfig();
|
||||
}
|
||||
|
@ -5,5 +5,4 @@ import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
@ConfigSerializable
|
||||
public class General {
|
||||
|
||||
|
||||
}
|
||||
|
@ -2,6 +2,8 @@ package com.gmail.nossr50.config;
|
||||
|
||||
import com.gmail.nossr50.util.StringUtils;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public final class HOCONUtil {
|
||||
|
||||
public static String serializeENUMName(String hyphenedString) {
|
||||
@ -24,7 +26,7 @@ public final class HOCONUtil {
|
||||
|
||||
for (int x = 0; x < split.length; x++) {
|
||||
if (x + 1 >= split.length)
|
||||
formattedString.append(split[x].toUpperCase());
|
||||
formattedString.append(split[x].toUpperCase(Locale.ENGLISH));
|
||||
else
|
||||
formattedString.append(split[x]).append('_');
|
||||
}
|
||||
|
@ -4,11 +4,13 @@ import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.util.StringUtils;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public class SkillConfigFactory {
|
||||
|
||||
protected static SerializedConfigLoader initSkillConfig(mcMMO pluginRef, PrimarySkillType primarySkillType, Class<?> clazz) {
|
||||
return new SerializedConfigLoader(pluginRef, clazz,
|
||||
primarySkillType.toString().toLowerCase() + ".conf",
|
||||
primarySkillType.toString().toLowerCase(Locale.ENGLISH) + ".conf",
|
||||
StringUtils.getCapitalized(primarySkillType.toString()),
|
||||
null);
|
||||
}
|
||||
|
@ -119,4 +119,8 @@ public class ConfigExploitPrevention {
|
||||
public ConfigSectionExploitTaming getConfigSectionExploitTaming() {
|
||||
return configSectionExploitSkills.getConfigSectionExploitTaming();
|
||||
}
|
||||
|
||||
public boolean isSnowGolemExploitPrevented() {
|
||||
return configSectionExploitSkills.isSnowGolemExploitPrevented();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,17 @@
|
||||
package com.gmail.nossr50.config.antiexploit;
|
||||
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ConfigSerializable
|
||||
public class ConfigSectionExploitExcavation {
|
||||
|
||||
public static final boolean DEFAULT_SNOW_GOLEM = true;
|
||||
@Setting(value = "Snow-Golem-Exploit", comment = "If set to true, the snow made by snow golems will not reward XP." +
|
||||
"\nDefault value: "+DEFAULT_SNOW_GOLEM)
|
||||
private boolean snowGolemExploit = DEFAULT_SNOW_GOLEM;
|
||||
|
||||
public boolean isSnowGolemExploitPrevented() {
|
||||
return snowGolemExploit;
|
||||
}
|
||||
}
|
@ -26,6 +26,9 @@ public class ConfigSectionExploitSkills {
|
||||
@Setting(value = "Taming", comment = "Exploit settings related to Taming")
|
||||
private ConfigSectionExploitTaming configSectionExploitTaming = new ConfigSectionExploitTaming();
|
||||
|
||||
@Setting(value = "Excavation", comment = "Exploit settings related to Excavation.")
|
||||
private ConfigSectionExploitExcavation configSectionExploitExcavation = new ConfigSectionExploitExcavation();
|
||||
|
||||
public ConfigSectionExploitAcrobatics getConfigSectionExploitAcrobatics() {
|
||||
return configSectionExploitAcrobatics;
|
||||
}
|
||||
@ -46,6 +49,10 @@ public class ConfigSectionExploitSkills {
|
||||
return configSectionExploitMining.isPreventCobblestoneStoneGeneratorXP();
|
||||
}
|
||||
|
||||
public boolean isSnowGolemExploitPrevented() {
|
||||
return configSectionExploitExcavation.isSnowGolemExploitPrevented();
|
||||
}
|
||||
|
||||
public boolean areSummonsBreedable() {
|
||||
return configSectionExploitTaming.areSummonsBreedable();
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ public class ConfigExperienceCombat {
|
||||
|
||||
static {
|
||||
COMBAT_EXPERIENCE_DEFAULT = new HashMap<>();
|
||||
|
||||
// TODO: namespace
|
||||
COMBAT_EXPERIENCE_DEFAULT.put("creeper", 4.0);
|
||||
COMBAT_EXPERIENCE_DEFAULT.put("cat", 1.0);
|
||||
COMBAT_EXPERIENCE_DEFAULT.put("fox", 1.0);
|
||||
@ -74,6 +74,7 @@ public class ConfigExperienceCombat {
|
||||
COMBAT_EXPERIENCE_DEFAULT.put("dolphin", 1.0);
|
||||
COMBAT_EXPERIENCE_DEFAULT.put("phantom", 4.0);
|
||||
COMBAT_EXPERIENCE_DEFAULT.put("wandering_trader", 1.0);
|
||||
COMBAT_EXPERIENCE_DEFAULT.put("bee", 1.5);
|
||||
|
||||
//SPECIAL
|
||||
SPECIAL_COMBAT_EXPERIENCE_DEFAULT = new HashMap<>();
|
||||
|
@ -84,8 +84,9 @@ public class ConfigExperienceHerbalism {
|
||||
HERBALISM_EXPERIENCE_DEFAULT.put("minecraft:dead_bush", 30);
|
||||
|
||||
/* MISC */
|
||||
HERBALISM_EXPERIENCE_DEFAULT.put("minecraft:bee_nest", 200);
|
||||
HERBALISM_EXPERIENCE_DEFAULT.put("minecraft:lily_pad", 100);
|
||||
HERBALISM_EXPERIENCE_DEFAULT.put("minecraft:sweet_berry_bush", 300);
|
||||
HERBALISM_EXPERIENCE_DEFAULT.put("minecraft:sweet_berry_bush", 50);
|
||||
|
||||
/* MUSHROOMS */
|
||||
HERBALISM_EXPERIENCE_DEFAULT.put("minecraft:red_mushroom", 150);
|
||||
|
@ -12,7 +12,7 @@ public class ConfigExperienceTaming {
|
||||
|
||||
static {
|
||||
TAMING_EXPERIENCE_DEFAULT = new HashMap<>();
|
||||
|
||||
// TODO: namespace
|
||||
TAMING_EXPERIENCE_DEFAULT.put("wolf", 250);
|
||||
TAMING_EXPERIENCE_DEFAULT.put("ocelot", 500);
|
||||
TAMING_EXPERIENCE_DEFAULT.put("cat", 500);
|
||||
@ -25,6 +25,7 @@ public class ConfigExperienceTaming {
|
||||
TAMING_EXPERIENCE_DEFAULT.put("parrot", 1100);
|
||||
TAMING_EXPERIENCE_DEFAULT.put("fox", 1000);
|
||||
TAMING_EXPERIENCE_DEFAULT.put("panda", 1000);
|
||||
TAMING_EXPERIENCE_DEFAULT.put("bee", 100);
|
||||
}
|
||||
|
||||
@Setting(value = "Taming-XP-Values")
|
||||
|
@ -129,6 +129,10 @@ public class ConfigLeveling {
|
||||
return configSectionLevelCaps;
|
||||
}
|
||||
|
||||
public int getCosmeticLevelScaleModifier() {
|
||||
return configSectionLevelingGeneral.getCosmeticLevelScaleModifier();
|
||||
}
|
||||
|
||||
public ConfigSectionSkillLevelCap getPowerLevelSettings() {
|
||||
return configSectionLevelCaps.getPowerLevelSettings();
|
||||
}
|
||||
@ -161,10 +165,6 @@ public class ConfigLeveling {
|
||||
return configExperienceFormula.getFormulaType();
|
||||
}
|
||||
|
||||
public boolean isRetroModeEnabled() {
|
||||
return getConfigSectionLevelScaling().isRetroModeEnabled();
|
||||
}
|
||||
|
||||
public ConfigExperienceFormulaLinear getConfigExperienceFormulaLinear() {
|
||||
return configExperienceFormula.getConfigExperienceFormulaLinear();
|
||||
}
|
||||
|
@ -7,22 +7,19 @@ import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
public class ConfigSectionLevelScaling {
|
||||
|
||||
/* DEFAULT VALUES */
|
||||
public static final boolean USE_RETRO_MODE_DEFAULT = true;
|
||||
public static final int LEVEL_SCALE_MODIFIER_DEFAULT = 1;
|
||||
|
||||
/*
|
||||
* CONFIG NODES
|
||||
*/
|
||||
|
||||
@Setting(value = "Use-Retro-Mode",
|
||||
comment = "Enables 1-1000 Level Scaling" +
|
||||
"\nIf set to false, Standard Scaling is used instead (1-100 Level Scaling)")
|
||||
private boolean useRetroMode = USE_RETRO_MODE_DEFAULT;
|
||||
@Setting(value = "Cosmetic-Level-Scaling",
|
||||
comment = "Changes the max number of levels and adjusts settings appropriately" +
|
||||
"\nThe default value will make level 1000 the max level, settings in the configs are based around that and are mutated based on this setting." +
|
||||
"\nLeave this setting at a value of 1 if you do not wish to change the cosmetic amount of levels")
|
||||
private int cosmeticLevelScaleModifier = LEVEL_SCALE_MODIFIER_DEFAULT;
|
||||
|
||||
/*
|
||||
* GETTER BOILERPLATE
|
||||
*/
|
||||
|
||||
public boolean isRetroModeEnabled() {
|
||||
return useRetroMode;
|
||||
public int getCosmeticLevelScaleModifier() {
|
||||
return cosmeticLevelScaleModifier;
|
||||
}
|
||||
}
|
||||
|
@ -15,16 +15,8 @@ public class ConfigSectionLevelingGeneral {
|
||||
|
||||
@Setting(value = "Player-Level-Scaling",
|
||||
comment = "Level Scaling is a new feature of mcMMO." +
|
||||
"\nServer admins can choose between two level scaling modes." +
|
||||
"\nEach mode is meant to be identical to each other in terms of the speed of progression." +
|
||||
"\nIn Retro player skills and levels scale the way they always have, on a 1-1000 scale." +
|
||||
"\nIn Standard player skills scale instead from 1-100." +
|
||||
"\nAs an example, reaching level 10 in Standard will take the same amount of time as reaching level 100 in Retro" +
|
||||
"\n\nTo make upgrading mcMMO easier for the vast majority of existing servers, RetroMode will be turned on by default in the following circumstances" +
|
||||
"\n1) That your server has a config.yml file that does not yet have a RetroMode setting (this means your server has not yet updated from the old system which did not have two level scaling options)" +
|
||||
"\n2) You are already using RetroMode in your old YAML config files" +
|
||||
"\n\nIf either of these is true, RetroMode will be turned on by default. If for some reason you had wiped your config files, you will need to come in here and turn RetroMode back on." +
|
||||
"\nNOTE: RetroMode and Standard use the EXACT same DB, it does not alter any information within that DB. It is not dangerous to switch between Standard and Retro.")
|
||||
"\nServer admins can adjust level scaling modifiers to tweak a bunch of settings related to progression at once." +
|
||||
"\nIt is not recommended to change this away from defaults unless you know what you are doing.")
|
||||
private ConfigSectionLevelScaling configSectionLevelScaling = new ConfigSectionLevelScaling();
|
||||
|
||||
@Setting(value = "Player-Starting-Level",
|
||||
@ -44,4 +36,8 @@ public class ConfigSectionLevelingGeneral {
|
||||
public ConfigSectionLevelScaling getConfigSectionLevelScaling() {
|
||||
return configSectionLevelScaling;
|
||||
}
|
||||
|
||||
public int getCosmeticLevelScaleModifier() {
|
||||
return configSectionLevelScaling.getCosmeticLevelScaleModifier();
|
||||
}
|
||||
}
|
||||
|
@ -1,33 +0,0 @@
|
||||
package com.gmail.nossr50.config.serializers;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.properties.AbstractMaxBonusLevel;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
|
||||
import com.google.common.reflect.TypeToken;
|
||||
import ninja.leaping.configurate.ConfigurationNode;
|
||||
import ninja.leaping.configurate.objectmapping.ObjectMappingException;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.TypeSerializer;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
public class MaxBonusLevelSerializer implements TypeSerializer<MaxBonusLevel> {
|
||||
|
||||
public static final String STANDARD_NODE = "Standard-Max-Bonus-Level";
|
||||
public static final String RETRO_NODE = "Retro-Max-Bonus-Level";
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public MaxBonusLevel deserialize(@NonNull TypeToken<?> type, @NonNull ConfigurationNode value) throws ObjectMappingException {
|
||||
int standard = value.getNode(STANDARD_NODE).getValue(TypeToken.of(Integer.class));
|
||||
int retro = value.getNode(RETRO_NODE).getValue(TypeToken.of(Integer.class));
|
||||
|
||||
AbstractMaxBonusLevel maxBonusLevel = new AbstractMaxBonusLevel(standard, retro);
|
||||
return maxBonusLevel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(@NonNull TypeToken<?> type, @Nullable MaxBonusLevel obj, @NonNull ConfigurationNode value) throws ObjectMappingException {
|
||||
value.getNode(STANDARD_NODE).setValue(obj.getStandardScaleValue());
|
||||
value.getNode(RETRO_NODE).setValue(obj.getRetroScaleValue());
|
||||
}
|
||||
|
||||
}
|
@ -13,21 +13,17 @@ import java.util.Map;
|
||||
|
||||
public class SkillRankPropertySerializer implements TypeSerializer<SkillRankProperty> {
|
||||
|
||||
private static final String STANDARD_RANK_UNLOCK_LEVEL_REQUIREMENTS = "Standard-Rank-Unlock-Level-Requirements";
|
||||
private static final String RETRO_RANK_UNLOCK_LEVEL_REQUIREMENTS = "Retro-Rank-Unlock-Level-Requirements";
|
||||
private static final String RANK_UNLOCK_LEVEL_REQUIREMENTS = "Standard-Rank-Unlock-Level-Requirements";
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public SkillRankProperty deserialize(@NonNull TypeToken<?> type, @NonNull ConfigurationNode value) throws ObjectMappingException {
|
||||
HashMap<Integer, Integer> standardHashMap;
|
||||
HashMap<Integer, Integer> retroHashMap;
|
||||
|
||||
try {
|
||||
Map<? extends Integer, ? extends Integer> standardMap = value.getNode(STANDARD_RANK_UNLOCK_LEVEL_REQUIREMENTS).getValue(new TypeToken<Map<? extends Integer, ? extends Integer>>() {});
|
||||
Map<? extends Integer, ? extends Integer> retroMap = value.getNode(RETRO_RANK_UNLOCK_LEVEL_REQUIREMENTS).getValue(new TypeToken<Map<? extends Integer, ? extends Integer>>() {});
|
||||
Map<? extends Integer, ? extends Integer> standardMap = value.getNode(RANK_UNLOCK_LEVEL_REQUIREMENTS).getValue(new TypeToken<Map<? extends Integer, ? extends Integer>>() {});
|
||||
|
||||
standardHashMap = new HashMap<>(standardMap);
|
||||
retroHashMap = new HashMap<>(retroMap);
|
||||
|
||||
} catch (ObjectMappingException e) {
|
||||
System.out.println("[mcMMO Deserializer Debug] Unable to deserialize rank property information from the config, make sure the ranks are correctly set in the config. You can delete the rank config to generate a new one if problems persist.");
|
||||
@ -35,15 +31,13 @@ public class SkillRankPropertySerializer implements TypeSerializer<SkillRankProp
|
||||
}
|
||||
|
||||
SkillRankProperty skillRankProperty = new SkillRankProperty();
|
||||
skillRankProperty.setStandardRanks(standardHashMap);
|
||||
skillRankProperty.setRetroRanks(retroHashMap);
|
||||
skillRankProperty.setRanks(standardHashMap);
|
||||
|
||||
return skillRankProperty;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(@NonNull TypeToken<?> type, @Nullable SkillRankProperty obj, @NonNull ConfigurationNode value) throws ObjectMappingException {
|
||||
value.getNode(STANDARD_RANK_UNLOCK_LEVEL_REQUIREMENTS).setValue(obj.getStandardRanks());
|
||||
value.getNode(RETRO_RANK_UNLOCK_LEVEL_REQUIREMENTS).setValue(obj.getRetroRanks());
|
||||
value.getNode(RANK_UNLOCK_LEVEL_REQUIREMENTS).setValue(obj.getRanks());
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
package com.gmail.nossr50.config.skills;
|
||||
|
||||
import com.gmail.nossr50.config.ConfigConstants;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.AbstractMaxBonusLevel;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ -11,9 +9,9 @@ public class ConfigMaxLevel {
|
||||
@Setting(value = ConfigConstants.MAX_BONUS_LEVEL_FIELD_NAME, comment = "Max bonus level is the level a player needs to reach in this skill to receive maximum benefits, such as better RNG odds or otherwise." +
|
||||
"\nSkills dynamically adjust their rewards to match the max bonus level, you can think of it as a curve that calculates what bonuses " +
|
||||
"\n a player should have based on how far they are from the max bonus level value, and the other parameters used for the scaling of the sub-skill.")
|
||||
private MaxBonusLevel maxBonusLevel = new AbstractMaxBonusLevel(100);
|
||||
private int maxBonusLevel = 1000;
|
||||
|
||||
public MaxBonusLevel getMaxBonusLevel() {
|
||||
public int getMaxBonusLevel() {
|
||||
return maxBonusLevel;
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
package com.gmail.nossr50.config.skills.acrobatics.dodge;
|
||||
|
||||
import com.gmail.nossr50.config.ConfigConstants;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.AbstractMaxBonusLevel;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ -22,25 +20,11 @@ public class ConfigDodge {
|
||||
"\nDefault value: " + DAMAGE_REDUCTION_DIVISOR_DEFAULT)
|
||||
private double damageReductionDivisor = DAMAGE_REDUCTION_DIVISOR_DEFAULT;
|
||||
|
||||
@Setting(value = ConfigConstants.MAX_BONUS_LEVEL_FIELD_NAME, comment = "Max bonus level is the level a player needs to reach in this skill to receive maximum benefits, such as better RNG odds or otherwise." +
|
||||
"\nSkills dynamically adjust their rewards to match the max bonus level, you can think of it as a curve that calculates what bonuses " +
|
||||
"\n a player should have based on how far they are from the max bonus level value, and the other parameters used for the scaling of the sub-skill.")
|
||||
private MaxBonusLevel maxBonusLevel = new AbstractMaxBonusLevel(100);
|
||||
|
||||
@Setting(value = ConfigConstants.MAX_CHANCE_FIELD_NAME, comment = "The maximum success chance for this Sub-Skill." +
|
||||
"\nA value of 100.0 would be equivalent to 100% chance of success." +
|
||||
"\nPlayers only have Max-Success-Chance when their skill level has reached the maximum bonus level." +
|
||||
"\nMax skill chance is dynamically adjusted based on the players level difference from the \"Max-Bonus-Level\", you can think of it as a curve where reaching \"Max-Bonus-Level\" is the peak." +
|
||||
"\nAs an example, imagine \""+ConfigConstants.MAX_CHANCE_FIELD_NAME+"\" was set to " + FIFTY_PERCENT_EXAMPLE + " and the \""+ConfigConstants.MAX_BONUS_LEVEL_FIELD_NAME+"\" was " + MAX_BONUS_LEVEL_EXAMPLE + "," +
|
||||
"\n and the player was level " + FIFTY_PERCENT_EXAMPLE + " for this skill, that would give the player " + ODDS_PERCENTAGE_EXAMPLE + " odds to succeed with this skill.")
|
||||
private double chanceAtMaxSkill = CHANCE_AT_MAX_SKILL_DEFAULT;
|
||||
|
||||
public MaxBonusLevel getMaxBonusLevel() {
|
||||
return maxBonusLevel;
|
||||
}
|
||||
@Setting(value = ConfigConstants.MAX_CHANCE_FIELD_NAME, comment = ConfigConstants.MAX_CHANCE_FIELD_DESCRIPTION)
|
||||
private double maxChance = 100.0;
|
||||
|
||||
public double getChanceAtMaxSkill() {
|
||||
return chanceAtMaxSkill;
|
||||
return maxChance;
|
||||
}
|
||||
|
||||
public double getDamageReductionDivisor() {
|
||||
|
@ -1,8 +1,6 @@
|
||||
package com.gmail.nossr50.config.skills.acrobatics.roll;
|
||||
|
||||
import com.gmail.nossr50.config.ConfigConstants;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.AbstractMaxBonusLevel;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ -10,9 +8,6 @@ import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
public class ConfigRoll {
|
||||
|
||||
public static final double ROLL_DAMAGE_THRESHOLD_DEFAULT = 7.0D;
|
||||
public static final String FIFTY_PERCENT_EXAMPLE = "50";
|
||||
public static final String MAX_BONUS_LEVEL_EXAMPLE = "100";
|
||||
public static final String ODDS_PERCENTAGE_EXAMPLE = "25%";
|
||||
public static final double CHANCE_AT_MAX_SKILL_DEFAULT = 100.0D;
|
||||
|
||||
@Setting(value = "Damage-Threshold", comment = "Rolling will reduce up to this much damage." +
|
||||
@ -24,24 +19,10 @@ public class ConfigRoll {
|
||||
return damageTheshold;
|
||||
}
|
||||
|
||||
@Setting(value = ConfigConstants.MAX_BONUS_LEVEL_FIELD_NAME, comment = "Max bonus level is the level a player needs to reach in this skill to receive maximum benefits, such as better RNG odds or otherwise." +
|
||||
"\nSkills dynamically adjust their rewards to match the max bonus level, you can think of it as a curve that calculates what bonuses " +
|
||||
"\n a player should have based on how far they are from the max bonus level value, and the other parameters used for the scaling of the sub-skill.")
|
||||
private MaxBonusLevel maxBonusLevel = new AbstractMaxBonusLevel(100);
|
||||
|
||||
@Setting(value = ConfigConstants.MAX_CHANCE_FIELD_NAME, comment = "The maximum success chance for this Sub-Skill." +
|
||||
"\nA value of 100.0 would be equivalent to 100% chance of success." +
|
||||
"\nPlayers only have Max-Success-Chance when their skill level has reached the maximum bonus level." +
|
||||
"\nMax skill chance is dynamically adjusted based on the players level difference from the \"Max-Bonus-Level\", you can think of it as a curve where reaching \"Max-Bonus-Level\" is the peak." +
|
||||
"\nAs an example, imagine \""+ConfigConstants.MAX_CHANCE_FIELD_NAME+"\" was set to " + FIFTY_PERCENT_EXAMPLE + " and the \""+ConfigConstants.MAX_BONUS_LEVEL_FIELD_NAME+"\" was " + MAX_BONUS_LEVEL_EXAMPLE + "," +
|
||||
"\n and the player was level " + FIFTY_PERCENT_EXAMPLE + " for this skill, that would give the player " + ODDS_PERCENTAGE_EXAMPLE + " odds to succeed with this skill.")
|
||||
private double chanceAtMaxSkill = CHANCE_AT_MAX_SKILL_DEFAULT;
|
||||
|
||||
public MaxBonusLevel getMaxBonusLevel() {
|
||||
return maxBonusLevel;
|
||||
}
|
||||
@Setting(value = ConfigConstants.MAX_CHANCE_FIELD_NAME, comment = ConfigConstants.MAX_CHANCE_FIELD_DESCRIPTION)
|
||||
private double maxChance = 100.0D;
|
||||
|
||||
public double getChanceAtMaxSkill() {
|
||||
return chanceAtMaxSkill;
|
||||
return maxChance;
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
package com.gmail.nossr50.config.skills.archery;
|
||||
|
||||
import com.gmail.nossr50.config.ConfigConstants;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.AbstractMaxBonusLevel;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ -12,14 +10,7 @@ public class ConfigArcheryArrowRetrieval {
|
||||
@Setting(value = ConfigConstants.MAX_CHANCE_FIELD_NAME, comment = ConfigConstants.MAX_CHANCE_FIELD_DESCRIPTION)
|
||||
private double maxChance = 100.0D;
|
||||
|
||||
@Setting(value = ConfigConstants.MAX_BONUS_LEVEL_FIELD_NAME)
|
||||
private MaxBonusLevel maxBonusLevel = new AbstractMaxBonusLevel(100);
|
||||
|
||||
public double getMaxChance() {
|
||||
return maxChance;
|
||||
}
|
||||
|
||||
public MaxBonusLevel getMaxBonusLevel() {
|
||||
return maxBonusLevel;
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
package com.gmail.nossr50.config.skills.archery;
|
||||
|
||||
import com.gmail.nossr50.config.ConfigConstants;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.AbstractMaxBonusLevel;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ -15,9 +13,6 @@ public class ConfigArcheryDaze {
|
||||
+ "\nDefault value: "+DAZE_MAX_CHANCE_DEFAULT)
|
||||
private double maxChance = DAZE_MAX_CHANCE_DEFAULT;
|
||||
|
||||
@Setting(value = ConfigConstants.MAX_BONUS_LEVEL_FIELD_NAME)
|
||||
private MaxBonusLevel maxBonusLevel = new AbstractMaxBonusLevel(100);
|
||||
|
||||
@Setting(value = "Bonus-Damage", comment = "How much bonus damage is applied when daze is applied to a target." +
|
||||
"\nDefault value: "+DAZE_BONUS_DMG_DEFAULT)
|
||||
private double bonusDamage = DAZE_BONUS_DMG_DEFAULT;
|
||||
@ -26,10 +21,6 @@ public class ConfigArcheryDaze {
|
||||
return maxChance;
|
||||
}
|
||||
|
||||
public MaxBonusLevel getMaxBonusLevel() {
|
||||
return maxBonusLevel;
|
||||
}
|
||||
|
||||
public double getDazeBonusDamage() {
|
||||
return bonusDamage;
|
||||
}
|
||||
|
@ -2,7 +2,6 @@ package com.gmail.nossr50.config.skills.axes;
|
||||
|
||||
import com.gmail.nossr50.config.ConfigConstants;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.AbstractDamageProperty;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.AbstractMaxBonusLevel;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.DamageProperty;
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
@ -12,18 +11,14 @@ public class ConfigAxesCriticalStrikes {
|
||||
|
||||
private static final double MAX_ACTIVATION_CHANCE_DEFAULT = 37.50D;
|
||||
|
||||
@Setting(value = ConfigConstants.MAX_CHANCE_FIELD_NAME, comment = "This is max percentage chance that is used to determine whether or not the ability is successful." +
|
||||
"\nA value of 50.0 would mean at most the ability can only have a 50% chance to work at max skill level.")
|
||||
private double maxActivationChance = MAX_ACTIVATION_CHANCE_DEFAULT;
|
||||
|
||||
@Setting(value = ConfigConstants.MAX_BONUS_LEVEL_FIELD_NAME, comment = ConfigConstants.MAX_BONUS_LEVEL_DESCRIPTION)
|
||||
private AbstractMaxBonusLevel maximumProgressionLevel = new AbstractMaxBonusLevel(100);
|
||||
@Setting(value = ConfigConstants.MAX_CHANCE_FIELD_NAME, comment = ConfigConstants.MAX_CHANCE_FIELD_DESCRIPTION)
|
||||
private double maxChance = MAX_ACTIVATION_CHANCE_DEFAULT;
|
||||
|
||||
@Setting(value = "Damage-Modifiers", comment = "Damage dealt is multiplied by these values when this skill is successfully activated.")
|
||||
private DamageProperty damageProperty = new AbstractDamageProperty(1.5, 2.0);
|
||||
|
||||
public double getMaxActivationChance() {
|
||||
return maxActivationChance;
|
||||
return maxChance;
|
||||
}
|
||||
|
||||
public DamageProperty getDamageProperty() {
|
||||
|
@ -1,8 +1,6 @@
|
||||
package com.gmail.nossr50.config.skills.herbalism;
|
||||
|
||||
import com.gmail.nossr50.config.ConfigConstants;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.AbstractMaxBonusLevel;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ -11,8 +9,4 @@ public class ConfigHerbalismDoubleDrops {
|
||||
|
||||
@Setting(value = ConfigConstants.MAX_CHANCE_FIELD_NAME, comment = ConfigConstants.MAX_CHANCE_FIELD_DESCRIPTION)
|
||||
private double maxChance = 100.0;
|
||||
|
||||
@Setting(value = ConfigConstants.MAX_BONUS_LEVEL_FIELD_NAME)
|
||||
private MaxBonusLevel maxBonusLevel = new AbstractMaxBonusLevel(100);
|
||||
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
package com.gmail.nossr50.config.skills.herbalism;
|
||||
|
||||
import com.gmail.nossr50.config.ConfigConstants;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.AbstractMaxBonusLevel;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ -11,8 +9,4 @@ public class ConfigHerbalismGreenThumb {
|
||||
|
||||
@Setting(value = ConfigConstants.MAX_CHANCE_FIELD_NAME, comment = ConfigConstants.MAX_CHANCE_FIELD_DESCRIPTION)
|
||||
private double maxChance = 100.0;
|
||||
|
||||
@Setting(value = ConfigConstants.MAX_BONUS_LEVEL_FIELD_NAME)
|
||||
private MaxBonusLevel maxBonusLevel = new AbstractMaxBonusLevel(100);
|
||||
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
package com.gmail.nossr50.config.skills.herbalism;
|
||||
|
||||
import com.gmail.nossr50.config.ConfigConstants;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.AbstractMaxBonusLevel;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ -11,8 +9,4 @@ public class ConfigHerbalismHylianLuck {
|
||||
|
||||
@Setting(value = ConfigConstants.MAX_CHANCE_FIELD_NAME, comment = ConfigConstants.MAX_CHANCE_FIELD_DESCRIPTION)
|
||||
private double maxChance = 10.0;
|
||||
|
||||
@Setting(value = ConfigConstants.MAX_BONUS_LEVEL_FIELD_NAME)
|
||||
private MaxBonusLevel maxBonusLevel = new AbstractMaxBonusLevel(100);
|
||||
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
package com.gmail.nossr50.config.skills.herbalism;
|
||||
|
||||
import com.gmail.nossr50.config.ConfigConstants;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.AbstractMaxBonusLevel;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ -12,7 +10,4 @@ public class ConfigHerbalismShroomThumb {
|
||||
@Setting(value = ConfigConstants.MAX_CHANCE_FIELD_NAME, comment = ConfigConstants.MAX_CHANCE_FIELD_DESCRIPTION)
|
||||
private double maxChance = 50.0;
|
||||
|
||||
@Setting(value = ConfigConstants.MAX_BONUS_LEVEL_FIELD_NAME)
|
||||
private MaxBonusLevel maxBonusLevel = new AbstractMaxBonusLevel(100);
|
||||
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
package com.gmail.nossr50.config.skills.mining;
|
||||
|
||||
import com.gmail.nossr50.config.ConfigConstants;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.AbstractMaxBonusLevel;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ -11,9 +9,6 @@ public class ConfigMiningDoubleDrops {
|
||||
@Setting(value = ConfigConstants.MAX_CHANCE_FIELD_NAME, comment = ConfigConstants.MAX_CHANCE_FIELD_DESCRIPTION)
|
||||
private double maxChance = 100.0;
|
||||
|
||||
@Setting(value = ConfigConstants.MAX_BONUS_LEVEL_FIELD_NAME)
|
||||
private MaxBonusLevel maxBonusLevel = new AbstractMaxBonusLevel(100);
|
||||
|
||||
@Setting(value = "Silk-Touch-Double-Drops", comment = "Allow silk touch to benefit from double drops.")
|
||||
private boolean allowSilkTouchDoubleDrops = true;
|
||||
|
||||
|
@ -2,13 +2,14 @@ package com.gmail.nossr50.config.skills.ranks;
|
||||
|
||||
import com.gmail.nossr50.api.exceptions.MissingSkillPropertyDefinition;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.SkillProperty;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public class SkillRankProperty implements SkillProperty {
|
||||
|
||||
private HashMap<Integer, Integer> standardRanks;
|
||||
private HashMap<Integer, Integer> retroRanks;
|
||||
private HashMap<Integer, Integer> ranks;
|
||||
|
||||
public SkillRankProperty(Integer... rankDefinitions) {
|
||||
initRankMaps();
|
||||
@ -16,88 +17,59 @@ public class SkillRankProperty implements SkillProperty {
|
||||
for(int x = 0; x < rankDefinitions.length; x++) {
|
||||
int curRank = x+1;
|
||||
|
||||
addStandardAndRetroRank(curRank, rankDefinitions[x]);
|
||||
addRank(curRank, rankDefinitions[x]);
|
||||
}
|
||||
}
|
||||
|
||||
public SkillRankProperty(HashMap<Integer, Integer> standardRanks, HashMap<Integer, Integer> retroRanks) {
|
||||
this.standardRanks = standardRanks;
|
||||
this.retroRanks = retroRanks;
|
||||
public SkillRankProperty(HashMap<Integer, Integer> ranks) {
|
||||
this.ranks = ranks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience method to add Standard and Retro at the same time for default initialization of values
|
||||
* Only requires standard values be passed
|
||||
* Fill in the rank map and mutate it by the cosmetic modifier
|
||||
* @param curRank the rank to fill in the value for
|
||||
* @param standardValue the value of the rank in Standard
|
||||
* @param rankValue the value of the rank in Standard
|
||||
*/
|
||||
private void addStandardAndRetroRank(int curRank, int standardValue) {
|
||||
//Retro will be equal to standards rank requirement multiplied by 10 unless that value is 1, in which case it will also be 1
|
||||
int retroValue = standardValue == 1 ? 1 : standardValue * 10;
|
||||
|
||||
private void addRank(int curRank, int rankValue) {
|
||||
//Avoid negative numbers
|
||||
if(standardValue < 0) {
|
||||
standardRanks.put(curRank, 0);
|
||||
retroRanks.put(curRank, 0);
|
||||
} else {
|
||||
standardRanks.put(curRank, standardValue);
|
||||
retroRanks.put(curRank, retroValue);
|
||||
}
|
||||
}
|
||||
rankValue = Math.max(0, rankValue);
|
||||
|
||||
/**
|
||||
* Convenience method to add Standard and Retro at the same time
|
||||
* @param curRank the rank to fill in the value for
|
||||
* @param standardValue the value of the rank in Standard
|
||||
* @param retroValue the value of the rank in Retro
|
||||
*/
|
||||
private void addStandardAndRetroRank(int curRank, int standardValue, int retroValue) {
|
||||
//Avoid negative numbers
|
||||
standardValue = Math.max(0, standardValue);
|
||||
retroValue = Math.max(0, retroValue);
|
||||
|
||||
standardRanks.put(curRank, standardValue);
|
||||
retroRanks.put(curRank, retroValue);
|
||||
ranks.put(curRank, rankValue);
|
||||
}
|
||||
|
||||
private void initRankMaps() {
|
||||
standardRanks = new HashMap<>();
|
||||
retroRanks = new HashMap<>();
|
||||
ranks = new HashMap<>();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the unlock level for this skill as defined by this SkillRankProperty
|
||||
* @param retroMode whether or not mcMMO is using RetroMode, true for if it is
|
||||
* @param targetRank the rank to get the unlock level for
|
||||
* @return the unlock level for target rank
|
||||
*/
|
||||
public int getUnlockLevel(boolean retroMode, int targetRank) throws MissingSkillPropertyDefinition {
|
||||
if(retroMode) {
|
||||
if(retroRanks.get(targetRank) == null) {
|
||||
throw new MissingSkillPropertyDefinition("No definition found for rank:"+targetRank+" using Retro scaling");
|
||||
}
|
||||
return retroRanks.get(targetRank);
|
||||
} else {
|
||||
if(standardRanks.get(targetRank) == null) {
|
||||
public int getUnlockLevel(mcMMO pluginRef, int targetRank) throws MissingSkillPropertyDefinition {
|
||||
if(ranks.get(targetRank) == null) {
|
||||
throw new MissingSkillPropertyDefinition("No definition found for rank:"+targetRank+" using Standard scaling");
|
||||
}
|
||||
return standardRanks.get(targetRank);
|
||||
}
|
||||
|
||||
//Avoid zero or lower
|
||||
int cosmeticModifier = Math.max(1, pluginRef.getPlayerLevelingSettings().getCosmeticLevelScaleModifier());
|
||||
|
||||
if(cosmeticModifier == 1)
|
||||
return ranks.get(targetRank);
|
||||
|
||||
//Mutate rank
|
||||
int rankValue = ranks.get(targetRank);
|
||||
rankValue = rankValue / cosmeticModifier;
|
||||
|
||||
return rankValue;
|
||||
}
|
||||
|
||||
public void setStandardRanks(HashMap<Integer, Integer> standardRanks) {
|
||||
this.standardRanks = standardRanks;
|
||||
public void setRanks(HashMap<Integer, Integer> ranks) {
|
||||
this.ranks = ranks;
|
||||
}
|
||||
|
||||
public void setRetroRanks(HashMap<Integer, Integer> retroRanks) {
|
||||
this.retroRanks = retroRanks;
|
||||
public HashMap<Integer, Integer> getRanks() {
|
||||
return ranks;
|
||||
}
|
||||
|
||||
public HashMap<Integer, Integer> getStandardRanks() {
|
||||
return standardRanks;
|
||||
}
|
||||
|
||||
public HashMap<Integer, Integer> getRetroRanks() {
|
||||
return retroRanks;
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
package com.gmail.nossr50.config.skills.repair;
|
||||
|
||||
import com.gmail.nossr50.config.ConfigConstants;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.AbstractMaxBonusLevel;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ -14,17 +12,7 @@ public class ConfigRepairSuperRepair {
|
||||
private static final String ODDS_PERCENTAGE_EXAMPLE = "25%";
|
||||
private static final double CHANCE_AT_MAX_SKILL_DEFAULT = 100.0D;
|
||||
|
||||
@Setting(value = ConfigConstants.MAX_BONUS_LEVEL_FIELD_NAME, comment = "Max bonus level is the level a player needs to reach in this skill to receive maximum benefits, such as better RNG odds or otherwise." +
|
||||
"\nSkills dynamically adjust their rewards to match the max bonus level, you can think of it as a curve that calculates what bonuses " +
|
||||
"\n a player should have based on how far they are from the max bonus level value, and the other parameters used for the scaling of the sub-skill.")
|
||||
private MaxBonusLevel maxBonusLevel = new AbstractMaxBonusLevel(100);
|
||||
|
||||
@Setting(value = ConfigConstants.MAX_CHANCE_FIELD_NAME, comment = "The maximum success chance for this Sub-Skill." +
|
||||
"\nA value of 100.0 would be equivalent to 100% chance of success." +
|
||||
"\nPlayers only have Max-Success-Chance when their skill level has reached the maximum bonus level." +
|
||||
"\nMax skill chance is dynamically adjusted based on the players level difference from the \"Max-Bonus-Level\", you can think of it as a curve where reaching \"Max-Bonus-Level\" is the peak." +
|
||||
"\nAs an example, imagine \""+ConfigConstants.MAX_CHANCE_FIELD_NAME+"\" was set to " + FIFTY_PERCENT_EXAMPLE + " and the \""+ConfigConstants.MAX_BONUS_LEVEL_FIELD_NAME+"\" was " + MAX_BONUS_LEVEL_EXAMPLE + "," +
|
||||
"\n and the player was level " + FIFTY_PERCENT_EXAMPLE + " for this skill, that would give the player " + ODDS_PERCENTAGE_EXAMPLE + " odds to succeed with this skill.")
|
||||
private double chanceAtMaxSkill = CHANCE_AT_MAX_SKILL_DEFAULT;
|
||||
@Setting(value = ConfigConstants.MAX_CHANCE_FIELD_NAME, comment = ConfigConstants.MAX_CHANCE_FIELD_DESCRIPTION)
|
||||
private double maxChance = 100.0;
|
||||
|
||||
}
|
@ -1,8 +1,6 @@
|
||||
package com.gmail.nossr50.config.skills.repair.repairmastery;
|
||||
|
||||
import com.gmail.nossr50.config.ConfigConstants;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.AbstractMaxBonusLevel;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ -12,14 +10,7 @@ public class ConfigRepairRepairMastery {
|
||||
@Setting(value = ConfigConstants.MAX_BONUS_PERCENTAGE_FIELD_NAME)
|
||||
private double maxBonusPercentage = 200.0D;
|
||||
|
||||
@Setting(value = ConfigConstants.MAX_BONUS_LEVEL_FIELD_NAME, comment = ConfigConstants.MAX_BONUS_LEVEL_DESCRIPTION)
|
||||
private MaxBonusLevel maxBonusLevel = new AbstractMaxBonusLevel(100);
|
||||
|
||||
public double getMaxBonusPercentage() {
|
||||
return maxBonusPercentage;
|
||||
}
|
||||
|
||||
public MaxBonusLevel getMaxBonusLevel() {
|
||||
return maxBonusLevel;
|
||||
}
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
package com.gmail.nossr50.config.skills.smelting;
|
||||
|
||||
import com.gmail.nossr50.config.ConfigConstants;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ -13,7 +12,7 @@ public class ConfigSmelting {
|
||||
@Setting(value = ConfigConstants.SUB_SKILL_NODE)
|
||||
private ConfigSmeltingSubSkills subskills = new ConfigSmeltingSubSkills();
|
||||
|
||||
public ConfigSmeltingSubSkills getSubskills() {
|
||||
public ConfigSmeltingSubSkills getSubSkills() {
|
||||
return subskills;
|
||||
}
|
||||
|
||||
@ -26,10 +25,6 @@ public class ConfigSmelting {
|
||||
return subskills.getMaxChance();
|
||||
}
|
||||
|
||||
public MaxBonusLevel getMaxBonusLevel() {
|
||||
return subskills.getMaxBonusLevel();
|
||||
}
|
||||
|
||||
public HashMap<Integer, Integer> getXpMultiplierTable() {
|
||||
return subskills.getXpMultiplierTable();
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
package com.gmail.nossr50.config.skills.smelting;
|
||||
|
||||
import com.gmail.nossr50.config.ConfigConstants;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.AbstractMaxBonusLevel;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ -28,17 +26,10 @@ public class ConfigSmeltingSecondSmelt {
|
||||
@Setting(value = ConfigConstants.MAX_CHANCE_FIELD_NAME, comment = ConfigConstants.MAX_CHANCE_FIELD_DESCRIPTION)
|
||||
private double maxChance = 50.0;
|
||||
|
||||
@Setting(value = ConfigConstants.MAX_BONUS_LEVEL_FIELD_NAME, comment = ConfigConstants.MAX_BONUS_LEVEL_DESCRIPTION)
|
||||
private MaxBonusLevel maxBonusLevel = new AbstractMaxBonusLevel(100);
|
||||
|
||||
public double getMaxChance() {
|
||||
return maxChance;
|
||||
}
|
||||
|
||||
public MaxBonusLevel getMaxBonusLevel() {
|
||||
return maxBonusLevel;
|
||||
}
|
||||
|
||||
@Setting(value = "XP-Multiplier-Per-Rank")
|
||||
private HashMap<Integer, Integer> xpMultiplierTable = XP_MULT_MAP_DEFAULT;
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.gmail.nossr50.config.skills.smelting;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ -20,10 +19,6 @@ public class ConfigSmeltingSubSkills {
|
||||
return smeltingSecondSmelt.getMaxChance();
|
||||
}
|
||||
|
||||
public MaxBonusLevel getMaxBonusLevel() {
|
||||
return smeltingSecondSmelt.getMaxBonusLevel();
|
||||
}
|
||||
|
||||
public HashMap<Integer, Integer> getXpMultiplierTable() {
|
||||
return smeltingSecondSmelt.getXpMultiplierTable();
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
package com.gmail.nossr50.config.skills.swords;
|
||||
|
||||
import com.gmail.nossr50.config.ConfigConstants;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ -31,10 +30,6 @@ public class ConfigSwords {
|
||||
return subSkills.getCounterAttackMaxChance();
|
||||
}
|
||||
|
||||
public MaxBonusLevel getCounterAttackMaxBonusLevel() {
|
||||
return subSkills.getCounterAttackMaxBonusLevel();
|
||||
}
|
||||
|
||||
public double getCounterAttackDamageModifier() {
|
||||
return subSkills.getCounterAttackDamageModifier();
|
||||
}
|
||||
@ -47,10 +42,6 @@ public class ConfigSwords {
|
||||
return subSkills.getRuptureMaxChance();
|
||||
}
|
||||
|
||||
public MaxBonusLevel getRuptureMaxBonusLevel() {
|
||||
return subSkills.getRuptureMaxBonusLevel();
|
||||
}
|
||||
|
||||
public double getRuptureDamagePlayer() {
|
||||
return subSkills.getRuptureDamagePlayer();
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
package com.gmail.nossr50.config.skills.swords;
|
||||
|
||||
import com.gmail.nossr50.config.ConfigConstants;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.AbstractMaxBonusLevel;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ -14,9 +12,6 @@ public class ConfigSwordsCounterAttack {
|
||||
@Setting(value = ConfigConstants.MAX_CHANCE_FIELD_NAME, comment = ConfigConstants.MAX_CHANCE_FIELD_DESCRIPTION)
|
||||
private double maxChance = 30.0;
|
||||
|
||||
@Setting(value = ConfigConstants.MAX_BONUS_LEVEL_FIELD_NAME, comment = ConfigConstants.MAX_BONUS_LEVEL_DESCRIPTION)
|
||||
private MaxBonusLevel maxBonusLevel = new AbstractMaxBonusLevel(100);
|
||||
|
||||
@Setting(value = "Damage-Modifier", comment = "The damage returned from Counter-Attack will be equal to the damage dealt divided by this number." +
|
||||
"\nDefault value: "+DAMAGE_MODIFIER_DEFAULT)
|
||||
private double damageModifier = DAMAGE_MODIFIER_DEFAULT;
|
||||
@ -25,10 +20,6 @@ public class ConfigSwordsCounterAttack {
|
||||
return maxChance;
|
||||
}
|
||||
|
||||
public MaxBonusLevel getCounterAttackMaxBonusLevel() {
|
||||
return maxBonusLevel;
|
||||
}
|
||||
|
||||
public double getCounterAttackDamageModifier() {
|
||||
return damageModifier;
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
package com.gmail.nossr50.config.skills.swords;
|
||||
|
||||
import com.gmail.nossr50.config.ConfigConstants;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.AbstractMaxBonusLevel;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ -17,9 +15,6 @@ public class ConfigSwordsRupture {
|
||||
@Setting(value = ConfigConstants.MAX_CHANCE_FIELD_NAME, comment = ConfigConstants.MAX_CHANCE_FIELD_DESCRIPTION)
|
||||
private double maxChance = MAX_CHANCE_DEFAULT;
|
||||
|
||||
@Setting(value = ConfigConstants.MAX_BONUS_LEVEL_FIELD_NAME)
|
||||
private MaxBonusLevel maxBonusLevel = new AbstractMaxBonusLevel(100);
|
||||
|
||||
@Setting(value = "Damage-Per-Tick-PVP")
|
||||
private double damagePlayer = DAMAGE_PVP_DEFAULT;
|
||||
|
||||
@ -35,10 +30,6 @@ public class ConfigSwordsRupture {
|
||||
return maxChance;
|
||||
}
|
||||
|
||||
public MaxBonusLevel getRuptureMaxBonusLevel() {
|
||||
return maxBonusLevel;
|
||||
}
|
||||
|
||||
public double getRuptureDamagePlayer() {
|
||||
return damagePlayer;
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.gmail.nossr50.config.skills.swords;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ -35,10 +34,6 @@ public class ConfigSwordsSubSkills {
|
||||
return counterAttack.getCounterAttackMaxChance();
|
||||
}
|
||||
|
||||
public MaxBonusLevel getCounterAttackMaxBonusLevel() {
|
||||
return counterAttack.getCounterAttackMaxBonusLevel();
|
||||
}
|
||||
|
||||
public double getCounterAttackDamageModifier() {
|
||||
return counterAttack.getCounterAttackDamageModifier();
|
||||
}
|
||||
@ -51,10 +46,6 @@ public class ConfigSwordsSubSkills {
|
||||
return rupture.getRuptureMaxChance();
|
||||
}
|
||||
|
||||
public MaxBonusLevel getRuptureMaxBonusLevel() {
|
||||
return rupture.getRuptureMaxBonusLevel();
|
||||
}
|
||||
|
||||
public double getRuptureDamagePlayer() {
|
||||
return rupture.getRuptureDamagePlayer();
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
package com.gmail.nossr50.config.skills.taming;
|
||||
|
||||
import com.gmail.nossr50.config.ConfigConstants;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.AbstractMaxBonusLevel;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ -15,9 +13,6 @@ public class ConfigTamingGore {
|
||||
@Setting(value = "Gore-Bleed-Tick-Length", comment = "How many times to apply the bleed DOT from gore before it wears off.")
|
||||
private int goreBleedTicks = 2;
|
||||
|
||||
@Setting(value = ConfigConstants.MAX_BONUS_LEVEL_FIELD_NAME, comment = ConfigConstants.MAX_BONUS_LEVEL_DESCRIPTION)
|
||||
private MaxBonusLevel maxBonusLevel = new AbstractMaxBonusLevel(100);
|
||||
|
||||
@Setting(value = "Gore-Damage-Modifier")
|
||||
private double goreMofifier = 2.0;
|
||||
|
||||
@ -25,10 +20,6 @@ public class ConfigTamingGore {
|
||||
return maxChance;
|
||||
}
|
||||
|
||||
public MaxBonusLevel getMaxBonusLevel() {
|
||||
return maxBonusLevel;
|
||||
}
|
||||
|
||||
public double getGoreMofifier() {
|
||||
return goreMofifier;
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
package com.gmail.nossr50.config.skills.woodcutting;
|
||||
|
||||
import com.gmail.nossr50.config.ConfigConstants;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.AbstractMaxBonusLevel;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ -14,15 +12,8 @@ public class ConfigWoodcuttingHarvest {
|
||||
@Setting(value = ConfigConstants.MAX_CHANCE_FIELD_NAME, comment = ConfigConstants.MAX_CHANCE_FIELD_DESCRIPTION)
|
||||
private double maxChance = MAX_CHANCE_DEFAULT;
|
||||
|
||||
@Setting(value = ConfigConstants.MAX_BONUS_LEVEL_FIELD_NAME)
|
||||
private MaxBonusLevel maxBonusLevel = new AbstractMaxBonusLevel(100);
|
||||
|
||||
public double getMaxChance() {
|
||||
return maxChance;
|
||||
}
|
||||
|
||||
public MaxBonusLevel getMaxBonusLevel() {
|
||||
return maxBonusLevel;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -29,6 +29,7 @@ public class ConfigSound {
|
||||
SOUND_SETTINGS_MAP_DEFAULT.put(SoundType.ABILITY_ACTIVATED_BERSERK, new SoundSetting(0.5, 1.7));
|
||||
SOUND_SETTINGS_MAP_DEFAULT.put(SoundType.TIRED, new SoundSetting(1.0, 1.7));
|
||||
SOUND_SETTINGS_MAP_DEFAULT.put(SoundType.BLEED, new SoundSetting(2.0, 2.0));
|
||||
SOUND_SETTINGS_MAP_DEFAULT.put(SoundType.GLASS, new SoundSetting(1.0, 1.0));
|
||||
}
|
||||
|
||||
@Setting(value = "Sound-Settings", comment = "Adjust sound settings for various mcMMO sounds here." +
|
||||
|
@ -3,6 +3,7 @@ package com.gmail.nossr50.core;
|
||||
import org.bukkit.Material;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Stores hash tables for item and block names
|
||||
@ -21,6 +22,7 @@ public class MaterialMapStore {
|
||||
private HashSet<String> canMakeShroomyWhiteList;
|
||||
private HashSet<String> multiBlockPlant;
|
||||
private HashSet<String> foodItemWhiteList;
|
||||
private HashSet<String> glassBlocks;
|
||||
|
||||
public MaterialMapStore() {
|
||||
abilityBlackList = new HashSet<>();
|
||||
@ -32,6 +34,7 @@ public class MaterialMapStore {
|
||||
canMakeShroomyWhiteList = new HashSet<>();
|
||||
multiBlockPlant = new HashSet<>();
|
||||
foodItemWhiteList = new HashSet<>();
|
||||
glassBlocks = new HashSet<>();
|
||||
|
||||
fillHardcodedHashSets();
|
||||
}
|
||||
@ -79,6 +82,44 @@ public class MaterialMapStore {
|
||||
fillShroomyWhiteList();
|
||||
fillMultiBlockEntitiesList();
|
||||
fillFoodWhiteList();
|
||||
fillGlassBlockWhiteList();
|
||||
}
|
||||
|
||||
private void fillGlassBlockWhiteList() {
|
||||
glassBlocks.add("glass");
|
||||
glassBlocks.add("glass_pane");
|
||||
glassBlocks.add("black_stained_glass");
|
||||
glassBlocks.add("black_stained_glass_pane");
|
||||
glassBlocks.add("blue_stained_glass");
|
||||
glassBlocks.add("blue_stained_glass_pane");
|
||||
glassBlocks.add("brown_stained_glass");
|
||||
glassBlocks.add("brown_stained_glass_pane");
|
||||
glassBlocks.add("cyan_stained_glass");
|
||||
glassBlocks.add("cyan_stained_glass_pane");
|
||||
glassBlocks.add("gray_stained_glass");
|
||||
glassBlocks.add("gray_stained_glass_pane");
|
||||
glassBlocks.add("green_stained_glass");
|
||||
glassBlocks.add("green_stained_glass_pane");
|
||||
glassBlocks.add("light_blue_stained_glass");
|
||||
glassBlocks.add("light_blue_stained_glass_pane");
|
||||
glassBlocks.add("light_gray_stained_glass");
|
||||
glassBlocks.add("light_gray_stained_glass_pane");
|
||||
glassBlocks.add("lime_stained_glass");
|
||||
glassBlocks.add("lime_stained_glass_pane");
|
||||
glassBlocks.add("magenta_stained_glass");
|
||||
glassBlocks.add("magenta_stained_glass_pane");
|
||||
glassBlocks.add("orange_stained_glass");
|
||||
glassBlocks.add("orange_stained_glass_pane");
|
||||
glassBlocks.add("pink_stained_glass");
|
||||
glassBlocks.add("pink_stained_glass_pane");
|
||||
glassBlocks.add("purple_stained_glass");
|
||||
glassBlocks.add("purple_stained_glass_pane");
|
||||
glassBlocks.add("red_stained_glass");
|
||||
glassBlocks.add("red_stained_glass_pane");
|
||||
glassBlocks.add("white_stained_glass");
|
||||
glassBlocks.add("white_stained_glass_pane");
|
||||
glassBlocks.add("yellow_stained_glass");
|
||||
glassBlocks.add("yellow_stained_glass_pane");
|
||||
}
|
||||
|
||||
private void fillFoodWhiteList() {
|
||||
@ -120,6 +161,10 @@ public class MaterialMapStore {
|
||||
foodItemWhiteList.add("tropical_fish");
|
||||
}
|
||||
|
||||
public boolean isGlass(Material material) {
|
||||
return glassBlocks.contains(material.getKey().getKey());
|
||||
}
|
||||
|
||||
public boolean isFood(Material material) {
|
||||
return foodItemWhiteList.contains(material.getKey().getKey());
|
||||
}
|
||||
@ -146,6 +191,8 @@ public class MaterialMapStore {
|
||||
|
||||
private void fillBlockCrackerWhiteList() {
|
||||
blockCrackerWhiteList.add("stone_bricks");
|
||||
blockCrackerWhiteList.add("infested_stone_bricks");
|
||||
|
||||
}
|
||||
|
||||
private void fillHerbalismAbilityBlackList() {
|
||||
@ -426,7 +473,8 @@ public class MaterialMapStore {
|
||||
toolBlackList.add("stonecutter");
|
||||
}
|
||||
|
||||
private void addToHashSet(String string, HashSet<String> stringHashSet) {
|
||||
stringHashSet.add(string.toLowerCase());
|
||||
private void addToHashSet(String string, HashSet<String> stringHashSet)
|
||||
{
|
||||
stringHashSet.add(string.toLowerCase(Locale.ENGLISH));
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,6 @@ package com.gmail.nossr50.core;
|
||||
import com.gmail.nossr50.config.ConfigConstants;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.util.random.InvalidStaticChance;
|
||||
import com.google.common.reflect.TypeToken;
|
||||
@ -31,8 +30,8 @@ public class SkillPropertiesManager {
|
||||
staticActivationChanceMap = new HashMap<>();
|
||||
}
|
||||
|
||||
public void registerMaxBonusLevel(SubSkillType subSkillType, MaxBonusLevel maxBonusLevel) {
|
||||
maxBonusLevelMap.put(subSkillType, pluginRef.isRetroModeEnabled() ? maxBonusLevel.getRetroScaleValue() : maxBonusLevel.getStandardScaleValue());
|
||||
public void registerMaxBonusLevel(SubSkillType subSkillType, int maxBonusLevel) {
|
||||
maxBonusLevelMap.put(subSkillType, maxBonusLevel);
|
||||
}
|
||||
|
||||
public void registerMaxBonus(SubSkillType subSkillType, double maxBonus) {
|
||||
@ -133,13 +132,9 @@ public class SkillPropertiesManager {
|
||||
}
|
||||
|
||||
private void attemptRegisterMaxBonusLevel(SubSkillType subSkillType, CommentedConfigurationNode childNode) {
|
||||
try {
|
||||
pluginRef.getLogger().info("Registering MaxBonusLevel for "+subSkillType.toString());
|
||||
MaxBonusLevel maxBonusLevel = childNode.getValue(TypeToken.of(MaxBonusLevel.class));
|
||||
int maxBonusLevel = childNode.getInt();
|
||||
registerMaxBonusLevel(subSkillType, maxBonusLevel);
|
||||
} catch (ObjectMappingException e) {
|
||||
//This time a silent exception is fine
|
||||
}
|
||||
}
|
||||
|
||||
private void attemptRegisterMaxChance(SubSkillType subSkillType, CommentedConfigurationNode childNode) {
|
||||
|
@ -530,11 +530,6 @@ public final class FlatFileDatabaseManager implements DatabaseManager {
|
||||
|
||||
// Didn't find the player, create a new one
|
||||
if (create) {
|
||||
if (uuid == null) {
|
||||
newUser(playerName, uuid);
|
||||
return new PlayerProfile(pluginRef, playerName, true);
|
||||
}
|
||||
|
||||
newUser(playerName, uuid);
|
||||
return new PlayerProfile(pluginRef, playerName, uuid, true);
|
||||
}
|
||||
@ -554,10 +549,6 @@ public final class FlatFileDatabaseManager implements DatabaseManager {
|
||||
}
|
||||
|
||||
// Return unloaded profile
|
||||
if (uuid == null) {
|
||||
return new PlayerProfile(pluginRef, playerName);
|
||||
}
|
||||
|
||||
return new PlayerProfile(pluginRef, playerName, uuid);
|
||||
}
|
||||
|
||||
|
@ -361,7 +361,7 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
public List<PlayerStat> readLeaderboard(PrimarySkillType skill, int pageNumber, int statsPerPage) {
|
||||
List<PlayerStat> stats = new ArrayList<>();
|
||||
|
||||
String query = skill == null ? ALL_QUERY_VERSION : skill.name().toLowerCase();
|
||||
String query = skill == null ? ALL_QUERY_VERSION : skill.name().toLowerCase(Locale.ENGLISH);
|
||||
ResultSet resultSet = null;
|
||||
PreparedStatement statement = null;
|
||||
Connection connection = null;
|
||||
@ -403,9 +403,9 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
try {
|
||||
connection = getConnection(PoolIdentifier.MISC);
|
||||
for (PrimarySkillType primarySkillType : pluginRef.getSkillTools().NON_CHILD_SKILLS) {
|
||||
String skillName = primarySkillType.name().toLowerCase();
|
||||
String skillName = primarySkillType.name().toLowerCase(Locale.ENGLISH);
|
||||
// Get count of all users with higher skill level than player
|
||||
String sql = "SELECT COUNT(*) AS rank FROM " + tablePrefix + "users JOIN " + tablePrefix + "skills ON user_id = id WHERE " + skillName + " > 0 " +
|
||||
String sql = "SELECT COUNT(*) AS 'rank' FROM " + tablePrefix + "users JOIN " + tablePrefix + "skills ON user_id = id WHERE " + skillName + " > 0 " +
|
||||
"AND " + skillName + " > (SELECT " + skillName + " FROM " + tablePrefix + "users JOIN " + tablePrefix + "skills ON user_id = id " +
|
||||
"WHERE user = ?)";
|
||||
|
||||
@ -439,7 +439,7 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
statement.close();
|
||||
}
|
||||
|
||||
String sql = "SELECT COUNT(*) AS rank FROM " + tablePrefix + "users JOIN " + tablePrefix + "skills ON user_id = id " +
|
||||
String sql = "SELECT COUNT(*) AS 'rank' FROM " + tablePrefix + "users JOIN " + tablePrefix + "skills ON user_id = id " +
|
||||
"WHERE " + ALL_QUERY_VERSION + " > 0 " +
|
||||
"AND " + ALL_QUERY_VERSION + " > " +
|
||||
"(SELECT " + ALL_QUERY_VERSION + " " +
|
||||
@ -564,10 +564,10 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
id = newUser(connection, playerName, uuid);
|
||||
create = false;
|
||||
if (id == -1) {
|
||||
return new PlayerProfile(pluginRef, playerName, false);
|
||||
return new PlayerProfile(pluginRef, playerName, uuid, false);
|
||||
}
|
||||
} else {
|
||||
return new PlayerProfile(pluginRef, playerName, false);
|
||||
return new PlayerProfile(pluginRef, playerName, uuid,false);
|
||||
}
|
||||
}
|
||||
// There is such a user
|
||||
@ -634,7 +634,7 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
|
||||
// return unloaded profile
|
||||
if (!retry) {
|
||||
return new PlayerProfile(pluginRef, playerName, false);
|
||||
return new PlayerProfile(pluginRef, playerName, uuid, false);
|
||||
}
|
||||
|
||||
// Retry, and abort on re-failure
|
||||
@ -914,7 +914,7 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
|
||||
//Shrink skills above the cap
|
||||
int cap = pluginRef.getPlayerLevelingSettings().getSkillLevelCap(skill);
|
||||
statement = connection.prepareStatement("UPDATE `" + tablePrefix + "skills` SET `" + skill.name().toLowerCase() + "` = " + cap + " WHERE `" + skill.name().toLowerCase() + "` > " + cap);
|
||||
statement = connection.prepareStatement("UPDATE `" + tablePrefix + "skills` SET `" + skill.name().toLowerCase(Locale.ENGLISH) + "` = " + cap + " WHERE `" + skill.name().toLowerCase(Locale.ENGLISH) + "` > " + cap);
|
||||
statement.executeUpdate();
|
||||
tryClose(statement);
|
||||
}
|
||||
@ -951,7 +951,7 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
break;
|
||||
}
|
||||
if (connection == null) {
|
||||
throw new RuntimeException("getConnection() for " + identifier.name().toLowerCase() + " pool timed out. Increase max connections settings.");
|
||||
throw new RuntimeException("getConnection() for " + identifier.name().toLowerCase(Locale.ENGLISH) + " pool timed out. Increase max connections settings.");
|
||||
}
|
||||
return connection;
|
||||
}
|
||||
@ -1249,7 +1249,7 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
pluginRef.getLogger().info("Indexing tables, this may take a while on larger databases");
|
||||
|
||||
for (PrimarySkillType skill : pluginRef.getSkillTools().NON_CHILD_SKILLS) {
|
||||
String skill_name = skill.name().toLowerCase();
|
||||
String skill_name = skill.name().toLowerCase(Locale.ENGLISH);
|
||||
|
||||
try {
|
||||
statement.executeUpdate("ALTER TABLE `" + tablePrefix + "skills` ADD INDEX `idx_" + skill_name + "` (`" + skill_name + "`) USING BTREE");
|
||||
|
@ -34,11 +34,6 @@ public class PlayerProfile {
|
||||
private HashMap<PrimarySkillType, Double> rollingSkillsXp = new HashMap<PrimarySkillType, Double>();
|
||||
private final mcMMO pluginRef;
|
||||
|
||||
@Deprecated
|
||||
public PlayerProfile(mcMMO pluginRef, String playerName) {
|
||||
this(pluginRef, playerName, null);
|
||||
}
|
||||
|
||||
public PlayerProfile(mcMMO pluginRef, String playerName, UUID uuid) {
|
||||
this.pluginRef = pluginRef;
|
||||
this.uuid = uuid;
|
||||
@ -60,12 +55,6 @@ public class PlayerProfile {
|
||||
uniquePlayerData.put(UniqueDataType.CHIMAERA_WING_DATS, 0); //Chimaera wing
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public PlayerProfile(mcMMO pluginRef, String playerName, boolean isLoaded) {
|
||||
this(pluginRef, playerName);
|
||||
this.loaded = isLoaded;
|
||||
}
|
||||
|
||||
public PlayerProfile(mcMMO pluginRef, String playerName, UUID uuid, boolean isLoaded) {
|
||||
this(pluginRef, playerName, uuid);
|
||||
this.loaded = isLoaded;
|
||||
|
@ -4,6 +4,8 @@ import com.gmail.nossr50.config.HOCONUtil;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.util.StringUtils;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public enum SubSkillType {
|
||||
/* !! Warning -- Do not let subskills share a name with any existing PrimarySkillType as it will clash with the static import !! */
|
||||
|
||||
@ -142,7 +144,7 @@ public enum SubSkillType {
|
||||
*/
|
||||
public String getPermissionNodeAddress(mcMMO pluginRef) {
|
||||
//TODO: This could be optimized
|
||||
return "mcmmo.ability." + getParentSkill(pluginRef).toString().toLowerCase() + "." + getConfigName(toString()).toLowerCase();
|
||||
return "mcmmo.ability." + getParentSkill(pluginRef).toString().toLowerCase(Locale.ENGLISH) + "." + getConfigName(toString()).toLowerCase(Locale.ENGLISH);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -48,11 +48,11 @@ public class ArcheryBehaviour {
|
||||
public double getSkillShotBonusDamage(Player player, double oldDamage) {
|
||||
double damageBonusPercent = getSkillShotDamageBonusPercent(player);
|
||||
double newDamage = oldDamage + (oldDamage * damageBonusPercent);
|
||||
return Math.min(newDamage, getSkillShotDamageCap());
|
||||
return Math.min(newDamage, (oldDamage + getSkillShotDamageCap()));
|
||||
}
|
||||
|
||||
public double getSkillShotDamageBonusPercent(Player player) {
|
||||
return ((pluginRef.getRankTools().getRank(player, SubSkillType.ARCHERY_SKILL_SHOT)) * pluginRef.getConfigManager().getConfigArchery().getSkillShotDamageMultiplier()) / 100.0D;
|
||||
return ((pluginRef.getRankTools().getRank(player, SubSkillType.ARCHERY_SKILL_SHOT)) * (pluginRef.getConfigManager().getConfigArchery().getSkillShotDamageMultiplier()) / 100.0D);
|
||||
}
|
||||
|
||||
public double getSkillShotDamageCap() {
|
||||
|
@ -1,35 +0,0 @@
|
||||
package com.gmail.nossr50.datatypes.skills.properties;
|
||||
|
||||
public class AbstractMaxBonusLevel implements MaxBonusLevel {
|
||||
|
||||
private int retro;
|
||||
private int standard;
|
||||
|
||||
public AbstractMaxBonusLevel(int standard, int retro) {
|
||||
this.standard = standard;
|
||||
this.retro = retro;
|
||||
}
|
||||
|
||||
public AbstractMaxBonusLevel(int standard) {
|
||||
this.standard = standard;
|
||||
this.retro = standard * 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRetroScaleValue() {
|
||||
return retro;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStandardScaleValue() {
|
||||
return standard;
|
||||
}
|
||||
|
||||
public void setRetro(int retro) {
|
||||
this.retro = retro;
|
||||
}
|
||||
|
||||
public void setStandard(int standard) {
|
||||
this.standard = standard;
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
package com.gmail.nossr50.datatypes.skills.properties;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
|
||||
public abstract class AbstractScalingProperty implements ScalingProperty {
|
||||
public SubSkillType subSkillType;
|
||||
|
||||
public AbstractScalingProperty(SubSkillType subSkillType) {
|
||||
super();
|
||||
this.subSkillType = subSkillType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "AbstractScalingProperty{" +
|
||||
"subSkillType=" + subSkillType +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
package com.gmail.nossr50.datatypes.skills.properties;
|
||||
|
||||
public interface MaxBonusLevel {
|
||||
|
||||
/**
|
||||
* Get the max level for this skill for Retro scaling
|
||||
* @return Retro Mode max bonus level
|
||||
*/
|
||||
int getRetroScaleValue();
|
||||
|
||||
/**
|
||||
* Get the max level for this skill for Standard scaling
|
||||
* @return Standard Mode max bonus level
|
||||
*/
|
||||
int getStandardScaleValue();
|
||||
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
package com.gmail.nossr50.datatypes.skills.properties;
|
||||
|
||||
public interface ScalingProperty extends SkillProperty {
|
||||
/**
|
||||
* Returns the appropriate value for this scaling property whether it is Standard or Retro
|
||||
*
|
||||
* @return the value used in scaling calculations for this ScalingProperty
|
||||
*/
|
||||
double getValue();
|
||||
}
|
@ -20,6 +20,8 @@ import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public class Roll extends AcrobaticsSubSkill {
|
||||
|
||||
private final mcMMO pluginRef;
|
||||
@ -95,7 +97,7 @@ public class Roll extends AcrobaticsSubSkill {
|
||||
*/
|
||||
@Override
|
||||
public String getPermissionNode() {
|
||||
return ("mcmmo.ability." + getPrimaryKeyName() + "." + getConfigKeyName()).toLowerCase();
|
||||
return ("mcmmo.ability." + getPrimaryKeyName() + "." + getConfigKeyName()).toLowerCase(Locale.ENGLISH);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -370,7 +372,7 @@ public class Roll extends AcrobaticsSubSkill {
|
||||
|
||||
//Chance to roll at half max skill
|
||||
RandomChanceSkill rollHalfMaxSkill = new RandomChanceSkill(pluginRef, null, subSkillType);
|
||||
int halfMaxSkillValue = pluginRef.isRetroModeEnabled() ? 500 : 50;
|
||||
int halfMaxSkillValue = (int) pluginRef.getDynamicSettingsManager().getSkillMaxBonusLevel(subSkillType) / 2;
|
||||
rollHalfMaxSkill.setSkillLevel(halfMaxSkillValue);
|
||||
|
||||
//Chance to graceful roll at full skill
|
||||
|
@ -253,7 +253,7 @@
|
||||
// if (target.equals("II")) { // hacks
|
||||
// return target;
|
||||
// }
|
||||
// return target.substring(0, 1).toUpperCase() + target.substring(1).toLowerCase();
|
||||
// return target.substring(0, 1).toUpperCase() + target.substring(1).toLowerCase(Locale.ENGLISH);
|
||||
// }
|
||||
//
|
||||
// private static String getName(PotionEffectType type) {
|
||||
|
@ -31,6 +31,7 @@ import org.bukkit.event.block.*;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.metadata.MetadataValue;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
public class BlockListener implements Listener {
|
||||
@ -42,6 +43,28 @@ public class BlockListener implements Listener {
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
public void onBlockDropItemEvent(BlockDropItemEvent event) {
|
||||
//Track how many "things" are being dropped
|
||||
HashSet<Material> uniqueMaterials = new HashSet<>();
|
||||
boolean dontRewardTE = false; //If we suspect TEs are mixed in with other things don't reward bonus drops for anything that isn't a block
|
||||
int blockCount = 0;
|
||||
|
||||
for(Item item : event.getItems()) {
|
||||
//Track unique materials
|
||||
uniqueMaterials.add(item.getItemStack().getType());
|
||||
|
||||
//Count blocks as a second failsafe
|
||||
if(item.getItemStack().getType().isBlock())
|
||||
blockCount++;
|
||||
}
|
||||
|
||||
if(uniqueMaterials.size() > 1) {
|
||||
//Too many things are dropping, assume tile entities might be duped
|
||||
//Technically this would also prevent something like coal from being bonus dropped if you placed a TE above a coal ore when mining it but that's pretty edge case and this is a good solution for now
|
||||
dontRewardTE = true;
|
||||
}
|
||||
|
||||
//If there are more than one block in the item list we can't really trust it and will back out of rewarding bonus drops
|
||||
if (blockCount <= 1){
|
||||
for (Item item : event.getItems()) {
|
||||
ItemStack is = new ItemStack(item.getItemStack());
|
||||
|
||||
@ -51,6 +74,13 @@ public class BlockListener implements Listener {
|
||||
if (!pluginRef.getDynamicSettingsManager().getBonusDropManager().isBonusDropWhitelisted(is.getType()))
|
||||
continue;
|
||||
|
||||
//If we suspect TEs might be duped only reward block
|
||||
if (dontRewardTE) {
|
||||
if (!is.getType().isBlock()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (event.getBlock().getMetadata(MetadataConstants.BONUS_DROPS_METAKEY).size() > 0) {
|
||||
BonusDropMeta bonusDropMeta = (BonusDropMeta) event.getBlock().getMetadata(MetadataConstants.BONUS_DROPS_METAKEY).get(0);
|
||||
int bonusCount = bonusDropMeta.asInt();
|
||||
@ -60,6 +90,7 @@ public class BlockListener implements Listener {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(event.getBlock().hasMetadata(MetadataConstants.BONUS_DROPS_METAKEY))
|
||||
event.getBlock().removeMetadata(MetadataConstants.BONUS_DROPS_METAKEY, pluginRef);
|
||||
@ -129,7 +160,7 @@ public class BlockListener implements Listener {
|
||||
if (pluginRef.getDynamicSettingsManager().isWorldBlacklisted(event.getBlock().getWorld().getName()))
|
||||
return;
|
||||
|
||||
if (pluginRef.getBlockTools().shouldBeWatched(event.getNewState())) {
|
||||
if (pluginRef.getConfigManager().getConfigExploitPrevention().isSnowGolemExploitPrevented() && pluginRef.getBlockTools().shouldBeWatched(event.getNewState())) {
|
||||
pluginRef.getPlaceStore().setTrue(event.getNewState().getBlock());
|
||||
}
|
||||
}
|
||||
@ -450,8 +481,27 @@ public class BlockListener implements Listener {
|
||||
mcMMOPlayer.checkAbilityActivation(PrimarySkillType.MINING);
|
||||
} else if (mcMMOPlayer.getToolPreparationMode(ToolType.SHOVEL) && pluginRef.getItemTools().isShovel(heldItem) && pluginRef.getBlockTools().affectedByGigaDrillBreaker(blockState) && pluginRef.getPermissionTools().gigaDrillBreaker(player)) {
|
||||
mcMMOPlayer.checkAbilityActivation(PrimarySkillType.EXCAVATION);
|
||||
} else if (mcMMOPlayer.getToolPreparationMode(ToolType.FISTS) && heldItem.getType() == Material.AIR && (pluginRef.getBlockTools().affectedByGigaDrillBreaker(blockState) || blockState.getType() == Material.SNOW || pluginRef.getBlockTools().affectedByBlockCracker(blockState) && pluginRef.getPermissionTools().berserk(player))) {
|
||||
} else if (mcMMOPlayer.getToolPreparationMode(ToolType.FISTS)
|
||||
&& heldItem.getType() == Material.AIR
|
||||
&& ((pluginRef.getBlockTools().affectedByGigaDrillBreaker(blockState)
|
||||
|| blockState.getType() == Material.SNOW
|
||||
|| pluginRef.getBlockTools().affectedByBlockCracker(blockState)
|
||||
|| pluginRef.getMaterialMapStore().isGlass(blockState.getType()))
|
||||
&& pluginRef.getPermissionTools().berserk(player))) {
|
||||
mcMMOPlayer.checkAbilityActivation(PrimarySkillType.UNARMED);
|
||||
|
||||
if(mcMMOPlayer.getSuperAbilityMode(SuperAbilityType.BERSERK)) {
|
||||
if (pluginRef.getSkillTools().superAbilityBlockCheck(SuperAbilityType.BERSERK, blockState)
|
||||
&& pluginRef.getEventManager().simulateBlockBreak(blockState.getBlock(), player, true)) {
|
||||
event.setInstaBreak(true);
|
||||
|
||||
if(blockState.getType().getKey().getKey().contains("glass")) {
|
||||
pluginRef.getSoundManager().worldSendSound(player.getWorld(), blockState.getLocation(), SoundType.GLASS);
|
||||
} else {
|
||||
pluginRef.getSoundManager().sendSound(player, blockState.getLocation(), SoundType.POP);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -520,17 +570,35 @@ public class BlockListener implements Listener {
|
||||
if (mcMMOPlayer.getHerbalismManager().processGreenTerraBlockConversion(blockState)) {
|
||||
blockState.update(true);
|
||||
}
|
||||
} else if (mcMMOPlayer.getSuperAbilityMode(SuperAbilityType.BERSERK) && heldItem.getType() == Material.AIR) {
|
||||
} else if (mcMMOPlayer.getSuperAbilityMode(SuperAbilityType.BERSERK) && (heldItem.getType() == Material.AIR || pluginRef.getConfigManager().getConfigUnarmed().doItemsCountAsUnarmed())) {
|
||||
if (pluginRef.getSkillTools().superAbilityBlockCheck(SuperAbilityType.BERSERK, block.getState())
|
||||
&& pluginRef.getEventManager().simulateBlockBreak(block, player, true)) {
|
||||
event.setInstaBreak(true);
|
||||
pluginRef.getSoundManager().sendSound(player, block.getLocation(), SoundType.POP);
|
||||
} else if (mcMMOPlayer.getUnarmedManager().canUseBlockCracker() && pluginRef.getBlockTools().affectedByBlockCracker(blockState) && pluginRef.getEventManager().simulateBlockBreak(block, player, true)) {
|
||||
} else if (mcMMOPlayer.getUnarmedManager().canUseBlockCracker()
|
||||
&& pluginRef.getBlockTools().affectedByBlockCracker(blockState)
|
||||
&& pluginRef.getEventManager().simulateBlockBreak(block, player, true)) {
|
||||
if (mcMMOPlayer.getUnarmedManager().blockCrackerCheck(blockState)) {
|
||||
blockState.update();
|
||||
}
|
||||
}
|
||||
} else if (mcMMOPlayer.getWoodcuttingManager().canUseLeafBlower(heldItem) && pluginRef.getBlockTools().isLeaves(blockState) && pluginRef.getEventManager().simulateBlockBreak(block, player, true)) {
|
||||
//Only run if insta-break isn't on, this is because we turn it on in another event of this same type but different priority under certain conditions
|
||||
else if (!event.getInstaBreak()
|
||||
&& pluginRef.getBlockTools().canActivateAbilities(blockState)
|
||||
&& pluginRef.getEventManager().simulateBlockBreak(block, player, true)) {
|
||||
event.setInstaBreak(true);
|
||||
|
||||
//Break Glass
|
||||
if(blockState.getType().getKey().getKey().contains("glass")) {
|
||||
pluginRef.getSoundManager().worldSendSound(player.getWorld(), block.getLocation(), SoundType.GLASS);
|
||||
} else {
|
||||
pluginRef.getSoundManager().sendSound(player, block.getLocation(), SoundType.POP);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (mcMMOPlayer.getWoodcuttingManager().canUseLeafBlower(heldItem)
|
||||
&& pluginRef.getBlockTools().isLeaves(blockState)
|
||||
&& pluginRef.getEventManager().simulateBlockBreak(block, player, true)) {
|
||||
event.setInstaBreak(true);
|
||||
pluginRef.getSoundManager().sendSound(player, block.getLocation(), SoundType.POP);
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ public class EntityListener implements Listener {
|
||||
|
||||
//Prevent entities from giving XP if they target endermite
|
||||
if (event.getTarget() instanceof Endermite) {
|
||||
if (event.getEntity().hasMetadata(MetadataConstants.UNNATURAL_MOB_METAKEY))
|
||||
if (!event.getEntity().hasMetadata(MetadataConstants.UNNATURAL_MOB_METAKEY))
|
||||
event.getEntity().setMetadata(MetadataConstants.UNNATURAL_MOB_METAKEY, MetadataConstants.metadataValue);
|
||||
}
|
||||
}
|
||||
@ -291,6 +291,10 @@ public class EntityListener implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
if (pluginRef.getCombatTools().isProcessingNoInvulnDamage()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.getEntity() instanceof ArmorStand) {
|
||||
return;
|
||||
}
|
||||
@ -789,26 +793,6 @@ public class EntityListener implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle EntityExplode events that involve modifying the event.
|
||||
*
|
||||
* @param event The event to modify
|
||||
*/
|
||||
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
|
||||
public void onEntityExplodeMonitor(EntityExplodeEvent event) {
|
||||
/* WORLD BLACKLIST CHECK */
|
||||
if (pluginRef.getDynamicSettingsManager().isWorldBlacklisted(event.getEntity().getWorld().getName()))
|
||||
return;
|
||||
|
||||
Entity entity = event.getEntity();
|
||||
|
||||
if (!(entity instanceof TNTPrimed) || !entity.hasMetadata(MetadataConstants.SAFE_TNT_METAKEY)) {
|
||||
return;
|
||||
}
|
||||
|
||||
event.blockList().clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle FoodLevelChange events that involve modifying the event.
|
||||
*
|
||||
|
@ -9,6 +9,7 @@ import org.bukkit.event.Event;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
|
||||
public class InteractionManager {
|
||||
private static HashMap<InteractType, ArrayList<Interaction>> interactRegister;
|
||||
@ -46,7 +47,7 @@ public class InteractionManager {
|
||||
//Register skill
|
||||
arrayRef.add(abstractSubSkill);
|
||||
|
||||
String lowerCaseName = abstractSubSkill.getConfigKeyName().toLowerCase();
|
||||
String lowerCaseName = abstractSubSkill.getConfigKeyName().toLowerCase(Locale.ENGLISH);
|
||||
|
||||
//Register in name map
|
||||
subSkillNameMap.putIfAbsent(lowerCaseName, abstractSubSkill);
|
||||
@ -62,7 +63,7 @@ public class InteractionManager {
|
||||
* @return null if the subskill is not registered
|
||||
*/
|
||||
public static AbstractSubSkill getAbstractByName(String name) {
|
||||
return subSkillNameMap.get(name.toLowerCase());
|
||||
return subSkillNameMap.get(name.toLowerCase(Locale.ENGLISH));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -34,6 +34,8 @@ import org.bukkit.event.player.*;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public class PlayerListener implements Listener {
|
||||
private final mcMMO pluginRef;
|
||||
|
||||
@ -880,12 +882,12 @@ public class PlayerListener implements Listener {
|
||||
if (!pluginRef.getConfigManager().getConfigLanguage().getTargetLanguage().equalsIgnoreCase("en_US")) {
|
||||
String message = event.getMessage();
|
||||
String command = message.substring(1).split(" ")[0];
|
||||
String lowerCaseCommand = command.toLowerCase();
|
||||
String lowerCaseCommand = command.toLowerCase(Locale.ENGLISH);
|
||||
|
||||
// Do these ACTUALLY have to be lower case to work properly?
|
||||
for (PrimarySkillType primarySkillType : PrimarySkillType.values()) {
|
||||
String skillName = primarySkillType.toString().toLowerCase();
|
||||
String localizedName = pluginRef.getSkillTools().getLocalizedSkillName(primarySkillType).toLowerCase();
|
||||
String skillName = primarySkillType.toString().toLowerCase(Locale.ENGLISH);
|
||||
String localizedName = pluginRef.getSkillTools().getLocalizedSkillName(primarySkillType).toLowerCase(Locale.ENGLISH);
|
||||
|
||||
if (command.equalsIgnoreCase(localizedName)) {
|
||||
event.setMessage(message.replace(command, skillName));
|
||||
|
@ -67,6 +67,7 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public class mcMMO extends JavaPlugin {
|
||||
/* Managers */
|
||||
@ -88,6 +89,7 @@ public class mcMMO extends JavaPlugin {
|
||||
private SoundManager soundManager;
|
||||
private HardcoreManager hardcoreManager;
|
||||
private PlatformManager platformManager;
|
||||
private WorldGuardManager worldGuardManager;
|
||||
|
||||
/* Not-Managers but my naming scheme sucks */
|
||||
private DatabaseManagerFactory databaseManagerFactory;
|
||||
@ -241,10 +243,14 @@ public class mcMMO extends JavaPlugin {
|
||||
metrics = new Metrics(this);
|
||||
metrics.addCustomChart(new Metrics.SimplePie("version", () -> getDescription().getVersion()));
|
||||
|
||||
if (!configManager.getConfigLeveling().getConfigSectionLevelingGeneral().getConfigSectionLevelScaling().isRetroModeEnabled())
|
||||
int levelScaleModifier = configManager.getConfigLeveling().getConfigSectionLevelingGeneral().getConfigSectionLevelScaling().getCosmeticLevelScaleModifier();
|
||||
|
||||
if (levelScaleModifier == 10)
|
||||
metrics.addCustomChart(new Metrics.SimplePie("scaling", () -> "Standard"));
|
||||
else
|
||||
else if (levelScaleModifier == 1)
|
||||
metrics.addCustomChart(new Metrics.SimplePie("scaling", () -> "Retro"));
|
||||
else
|
||||
metrics.addCustomChart(new Metrics.SimplePie("scaling", () -> "Custom"));
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
getLogger().severe("There was an error while enabling mcMMO!");
|
||||
@ -308,13 +314,15 @@ public class mcMMO extends JavaPlugin {
|
||||
@Override
|
||||
public void onLoad()
|
||||
{
|
||||
worldGuardUtils = new WorldGuardUtils(this); //Init WGU
|
||||
|
||||
if(getServer().getPluginManager().getPlugin("WorldGuard") != null) {
|
||||
worldGuardUtils = new WorldGuardUtils(); //Init WGU
|
||||
|
||||
if(worldGuardUtils.isWorldGuardLoaded()) {
|
||||
//Register flags
|
||||
System.out.println("[mcMMO - Registering World Guard Flags...]");
|
||||
worldGuardUtils.getWorldGuardManager().registerFlags();
|
||||
worldGuardManager = new WorldGuardManager();
|
||||
worldGuardManager.registerFlags();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -384,9 +392,9 @@ public class mcMMO extends JavaPlugin {
|
||||
* @return the ServerSoftwareType which likely matches the server
|
||||
*/
|
||||
private ServerSoftwareType getServerSoftware() {
|
||||
if (Bukkit.getVersion().toLowerCase().contains("paper"))
|
||||
if (Bukkit.getVersion().toLowerCase(Locale.ENGLISH).contains("paper"))
|
||||
return ServerSoftwareType.PAPER;
|
||||
else if (Bukkit.getVersion().toLowerCase().contains("spigot"))
|
||||
else if (Bukkit.getVersion().toLowerCase(Locale.ENGLISH).contains("spigot"))
|
||||
return ServerSoftwareType.SPIGOT;
|
||||
else
|
||||
return ServerSoftwareType.CRAFTBUKKIT;
|
||||
@ -515,17 +523,6 @@ public class mcMMO extends JavaPlugin {
|
||||
return healthBarPluginEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if this plugin is using retro mode
|
||||
* Retro mode is a 0-1000 skill system
|
||||
* Standard mode is scaled for 1-100
|
||||
*
|
||||
* @return true if retro mode is enabled
|
||||
*/
|
||||
public boolean isRetroModeEnabled() {
|
||||
return configManager.isRetroMode();
|
||||
}
|
||||
|
||||
public ConfigManager getConfigManager() {
|
||||
return configManager;
|
||||
}
|
||||
@ -761,7 +758,7 @@ public class mcMMO extends JavaPlugin {
|
||||
}
|
||||
|
||||
public WorldGuardManager getWorldGuardManager() {
|
||||
return worldGuardUtils.getWorldGuardManager();
|
||||
return worldGuardManager;
|
||||
}
|
||||
|
||||
public PartyManager getPartyManager() {
|
||||
|
@ -8,25 +8,21 @@ import org.bukkit.scheduler.BukkitRunnable;
|
||||
public class MobHealthDisplayUpdaterTask extends BukkitRunnable {
|
||||
private final mcMMO pluginRef;
|
||||
private LivingEntity target;
|
||||
private String oldName;
|
||||
private boolean oldNameVisible;
|
||||
|
||||
public MobHealthDisplayUpdaterTask(mcMMO pluginRef, LivingEntity target) {
|
||||
this.pluginRef = pluginRef;
|
||||
|
||||
if (target.isValid()) {
|
||||
this.target = target;
|
||||
this.oldName = target.getMetadata(MetadataConstants.CUSTOM_NAME_METAKEY).get(0).asString();
|
||||
this.oldNameVisible = target.getMetadata(MetadataConstants.NAME_VISIBILITY_METAKEY).get(0).asBoolean();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (target != null && target.isValid()) {
|
||||
target.setCustomNameVisible(oldNameVisible);
|
||||
target.setCustomName(oldName);
|
||||
if (target.hasMetadata(MetadataConstants.CUSTOM_NAME_METAKEY)) {
|
||||
target.setCustomName(target.getMetadata(MetadataConstants.CUSTOM_NAME_METAKEY).get(0).asString());
|
||||
target.removeMetadata(MetadataConstants.CUSTOM_NAME_METAKEY, pluginRef);
|
||||
}
|
||||
|
||||
if (target.hasMetadata(MetadataConstants.NAME_VISIBILITY_METAKEY)) {
|
||||
target.setCustomNameVisible(target.getMetadata(MetadataConstants.NAME_VISIBILITY_METAKEY).get(0).asBoolean());
|
||||
target.removeMetadata(MetadataConstants.NAME_VISIBILITY_METAKEY, pluginRef);
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package com.gmail.nossr50.runnables.items;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
@ -48,6 +49,23 @@ public class TeleportationWarmup extends BukkitRunnable {
|
||||
}
|
||||
}
|
||||
|
||||
if (pluginRef.getConfigManager().getConfigParty().getPTP().isPtpWorldBasedPermissions()) {
|
||||
World targetWorld = targetPlayer.getWorld();
|
||||
World playerWorld = teleportingPlayer.getWorld();
|
||||
|
||||
if (!pluginRef.getPermissionTools().partyTeleportAllWorlds(teleportingPlayer)) {
|
||||
if (!pluginRef.getPermissionTools().partyTeleportWorld(targetPlayer, targetWorld)) {
|
||||
teleportingPlayer.sendMessage(pluginRef.getLocaleManager().formatString("Commands.ptp.NoWorldPermissions", targetWorld.getName()));
|
||||
return;
|
||||
}
|
||||
else if (targetWorld != playerWorld && !pluginRef.getPermissionTools().partyTeleportWorld(teleportingPlayer, targetWorld)) {
|
||||
teleportingPlayer.sendMessage(pluginRef.getLocaleManager().formatString("Commands.ptp.NoWorldPermissions", targetWorld.getName()));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
pluginRef.getEventManager().handlePartyTeleportEvent(teleportingPlayer, targetPlayer);
|
||||
}
|
||||
}
|
||||
|
@ -155,7 +155,8 @@ public class MiningManager extends SkillManager {
|
||||
|
||||
if (pluginRef.getBlockTools().isOre(blockState)) {
|
||||
ores.add(blockState);
|
||||
} else {
|
||||
//A bug where beacons can drop when yield is set to 0 on explosion events is prevented here
|
||||
} else if(blockState.getType() != Material.BEACON) {
|
||||
debris.add(blockState);
|
||||
}
|
||||
}
|
||||
|
@ -80,6 +80,7 @@ public class UnarmedManager extends SkillManager {
|
||||
|
||||
switch (blockState.getType()) {
|
||||
case STONE_BRICKS:
|
||||
// TODO: REREF? https://github.com/mcMMO-Dev/mcMMO/blame/421a394f68fc714899f167dc3faf53114b8469ce/src/main/java/com/gmail/nossr50/skills/unarmed/UnarmedManager.java#L95
|
||||
/*if (!Unarmed.blockCrackerSmoothBrick) {
|
||||
return false;
|
||||
}*/
|
||||
|
@ -12,6 +12,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Locale;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
|
||||
@ -208,7 +209,7 @@ public final class MiscTools {
|
||||
String[] materialSplit = materialName.split("_");
|
||||
|
||||
if (materialSplit.length > 1) {
|
||||
return materialSplit[0].toLowerCase();
|
||||
return materialSplit[0].toLowerCase(Locale.ENGLISH);
|
||||
}
|
||||
|
||||
return "UnknownMods";
|
||||
|
@ -48,6 +48,11 @@ public final class MobHealthBarManager {
|
||||
return;
|
||||
}
|
||||
|
||||
// Don't mangle invalid entities, they're not going to be rendered anyways
|
||||
if (!target.isValid()) {
|
||||
return;
|
||||
}
|
||||
|
||||
String originalName = target.getName();
|
||||
String oldName = target.getCustomName();
|
||||
|
||||
@ -61,6 +66,7 @@ public final class MobHealthBarManager {
|
||||
oldName = "";
|
||||
}
|
||||
|
||||
|
||||
boolean oldNameVisible = target.isCustomNameVisible();
|
||||
String newName = createHealthDisplay(pluginRef.getConfigManager().getConfigMobs().getCombat().getHealthBars().getDisplayBarType(), target, damage);
|
||||
|
||||
|
@ -18,6 +18,8 @@ import org.bukkit.permissions.PermissionDefault;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
import org.bukkit.plugin.SimplePluginManager;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public final class PermissionTools {
|
||||
private final mcMMO pluginRef;
|
||||
|
||||
@ -175,7 +177,7 @@ public final class PermissionTools {
|
||||
}
|
||||
|
||||
public boolean mctop(Permissible permissible, PrimarySkillType skill) {
|
||||
return permissible.hasPermission("mcmmo.commands.mctop." + skill.toString().toLowerCase());
|
||||
return permissible.hasPermission("mcmmo.commands.mctop." + skill.toString().toLowerCase(Locale.ENGLISH));
|
||||
}
|
||||
|
||||
public boolean mmoedit(Permissible permissible) {
|
||||
@ -195,7 +197,7 @@ public final class PermissionTools {
|
||||
}
|
||||
|
||||
public boolean skillreset(Permissible permissible, PrimarySkillType skill) {
|
||||
return permissible.hasPermission("mcmmo.commands.skillreset." + skill.toString().toLowerCase());
|
||||
return permissible.hasPermission("mcmmo.commands.skillreset." + skill.toString().toLowerCase(Locale.ENGLISH));
|
||||
}
|
||||
|
||||
public boolean skillresetOthers(Permissible permissible) {
|
||||
@ -203,11 +205,11 @@ public final class PermissionTools {
|
||||
}
|
||||
|
||||
public boolean skillresetOthers(Permissible permissible, PrimarySkillType skill) {
|
||||
return permissible.hasPermission("mcmmo.commands.skillreset.others." + skill.toString().toLowerCase());
|
||||
return permissible.hasPermission("mcmmo.commands.skillreset.others." + skill.toString().toLowerCase(Locale.ENGLISH));
|
||||
}
|
||||
|
||||
public boolean xplock(Permissible permissible, PrimarySkillType skill) {
|
||||
return permissible.hasPermission("mcmmo.commands.xplock." + skill.toString().toLowerCase());
|
||||
return permissible.hasPermission("mcmmo.commands.xplock." + skill.toString().toLowerCase(Locale.ENGLISH));
|
||||
}
|
||||
|
||||
public boolean xprateSet(Permissible permissible) {
|
||||
@ -257,32 +259,32 @@ public final class PermissionTools {
|
||||
}
|
||||
|
||||
public boolean lucky(Permissible permissible, PrimarySkillType skill) {
|
||||
return permissible.hasPermission("mcmmo.perks.lucky." + skill.toString().toLowerCase());
|
||||
return permissible.hasPermission("mcmmo.perks.lucky." + skill.toString().toLowerCase(Locale.ENGLISH));
|
||||
}
|
||||
|
||||
/* XP PERKS */
|
||||
public boolean quadrupleXp(Permissible permissible, PrimarySkillType skill) {
|
||||
return permissible.hasPermission("mcmmo.perks.xp.quadruple." + skill.toString().toLowerCase());
|
||||
return permissible.hasPermission("mcmmo.perks.xp.quadruple." + skill.toString().toLowerCase(Locale.ENGLISH));
|
||||
}
|
||||
|
||||
public boolean tripleXp(Permissible permissible, PrimarySkillType skill) {
|
||||
return permissible.hasPermission("mcmmo.perks.xp.triple." + skill.toString().toLowerCase());
|
||||
return permissible.hasPermission("mcmmo.perks.xp.triple." + skill.toString().toLowerCase(Locale.ENGLISH));
|
||||
}
|
||||
|
||||
public boolean doubleAndOneHalfXp(Permissible permissible, PrimarySkillType skill) {
|
||||
return permissible.hasPermission("mcmmo.perks.xp.150percentboost." + skill.toString().toLowerCase());
|
||||
return permissible.hasPermission("mcmmo.perks.xp.150percentboost." + skill.toString().toLowerCase(Locale.ENGLISH));
|
||||
}
|
||||
|
||||
public boolean doubleXp(Permissible permissible, PrimarySkillType skill) {
|
||||
return permissible.hasPermission("mcmmo.perks.xp.double." + skill.toString().toLowerCase());
|
||||
return permissible.hasPermission("mcmmo.perks.xp.double." + skill.toString().toLowerCase(Locale.ENGLISH));
|
||||
}
|
||||
|
||||
public boolean oneAndOneHalfXp(Permissible permissible, PrimarySkillType skill) {
|
||||
return permissible.hasPermission("mcmmo.perks.xp.50percentboost." + skill.toString().toLowerCase());
|
||||
return permissible.hasPermission("mcmmo.perks.xp.50percentboost." + skill.toString().toLowerCase(Locale.ENGLISH));
|
||||
}
|
||||
|
||||
public boolean oneAndOneTenthXp(Permissible permissible, PrimarySkillType skill) {
|
||||
return permissible.hasPermission("mcmmo.perks.xp.10percentboost." + skill.toString().toLowerCase());
|
||||
return permissible.hasPermission("mcmmo.perks.xp.10percentboost." + skill.toString().toLowerCase(Locale.ENGLISH));
|
||||
}
|
||||
|
||||
public boolean hasCustomXPPerk(Permissible permissible, CustomXPPerk customXPPerk) {
|
||||
@ -320,11 +322,11 @@ public final class PermissionTools {
|
||||
*/
|
||||
|
||||
public boolean skillEnabled(Permissible permissible, PrimarySkillType skill) {
|
||||
return permissible.hasPermission("mcmmo.skills." + skill.toString().toLowerCase());
|
||||
return permissible.hasPermission("mcmmo.skills." + skill.toString().toLowerCase(Locale.ENGLISH));
|
||||
}
|
||||
|
||||
public boolean vanillaXpBoost(Permissible permissible, PrimarySkillType skill) {
|
||||
return permissible.hasPermission("mcmmo.ability." + skill.toString().toLowerCase() + ".vanillaxpboost");
|
||||
return permissible.hasPermission("mcmmo.ability." + skill.toString().toLowerCase(Locale.ENGLISH) + ".vanillaxpboost");
|
||||
}
|
||||
|
||||
public boolean isSubSkillEnabled(Permissible permissible, SubSkillType subSkillType) {
|
||||
@ -336,7 +338,7 @@ public final class PermissionTools {
|
||||
}
|
||||
|
||||
public boolean bonusDamage(Permissible permissible, PrimarySkillType skill) {
|
||||
return permissible.hasPermission("mcmmo.ability." + skill.toString().toLowerCase() + ".bonusdamage");
|
||||
return permissible.hasPermission("mcmmo.ability." + skill.toString().toLowerCase(Locale.ENGLISH) + ".bonusdamage");
|
||||
}
|
||||
|
||||
/* ACROBATICS */
|
||||
@ -386,11 +388,11 @@ public final class PermissionTools {
|
||||
}
|
||||
|
||||
public boolean greenThumbBlock(Permissible permissible, Material material) {
|
||||
return permissible.hasPermission("mcmmo.ability.herbalism.greenthumb.blocks." + material.toString().replace("_", "").toLowerCase());
|
||||
return permissible.hasPermission("mcmmo.ability.herbalism.greenthumb.blocks." + material.toString().replace("_", "").toLowerCase(Locale.ENGLISH));
|
||||
}
|
||||
|
||||
public boolean greenThumbPlant(Permissible permissible, Material material) {
|
||||
return permissible.hasPermission("mcmmo.ability.herbalism.greenthumb.plants." + material.toString().replace("_", "").toLowerCase());
|
||||
return permissible.hasPermission("mcmmo.ability.herbalism.greenthumb.plants." + material.toString().replace("_", "").toLowerCase(Locale.ENGLISH));
|
||||
}
|
||||
|
||||
/* MINING */
|
||||
@ -412,11 +414,11 @@ public final class PermissionTools {
|
||||
|
||||
/* REPAIR */
|
||||
public boolean repairItemType(Permissible permissible, ItemType repairItemType) {
|
||||
return permissible.hasPermission("mcmmo.ability.repair." + repairItemType.toString().toLowerCase() + "repair");
|
||||
return permissible.hasPermission("mcmmo.ability.repair." + repairItemType.toString().toLowerCase(Locale.ENGLISH) + "repair");
|
||||
}
|
||||
|
||||
public boolean repairMaterialType(Permissible permissible, ItemMaterialCategory repairItemMaterialCategory) {
|
||||
return permissible.hasPermission("mcmmo.ability.repair." + repairItemMaterialCategory.toString().toLowerCase() + "repair");
|
||||
return permissible.hasPermission("mcmmo.ability.repair." + repairItemMaterialCategory.toString().toLowerCase(Locale.ENGLISH) + "repair");
|
||||
}
|
||||
|
||||
/* SALVAGE */
|
||||
@ -429,11 +431,11 @@ public final class PermissionTools {
|
||||
}
|
||||
|
||||
public boolean salvageItemType(Permissible permissible, ItemType salvageItemType) {
|
||||
return permissible.hasPermission("mcmmo.ability.salvage." + salvageItemType.toString().toLowerCase() + "salvage");
|
||||
return permissible.hasPermission("mcmmo.ability.salvage." + salvageItemType.toString().toLowerCase(Locale.ENGLISH) + "salvage");
|
||||
}
|
||||
|
||||
public boolean salvageMaterialType(Permissible permissible, ItemMaterialCategory salvageItemMaterialCategory) {
|
||||
return permissible.hasPermission("mcmmo.ability.salvage." + salvageItemMaterialCategory.toString().toLowerCase() + "salvage");
|
||||
return permissible.hasPermission("mcmmo.ability.salvage." + salvageItemMaterialCategory.toString().toLowerCase(Locale.ENGLISH) + "salvage");
|
||||
}
|
||||
|
||||
/* SMELTING */
|
||||
@ -452,7 +454,7 @@ public final class PermissionTools {
|
||||
|
||||
/* TAMING */
|
||||
public boolean callOfTheWild(Permissible permissible, EntityType type) {
|
||||
return permissible.hasPermission("mcmmo.ability.taming.callofthewild." + type.toString().toLowerCase());
|
||||
return permissible.hasPermission("mcmmo.ability.taming.callofthewild." + type.toString().toLowerCase(Locale.ENGLISH));
|
||||
}
|
||||
|
||||
/* UNARMED */
|
||||
@ -477,7 +479,7 @@ public final class PermissionTools {
|
||||
}
|
||||
|
||||
public boolean partySubcommand(Permissible permissible, PartySubcommandType subcommand) {
|
||||
return permissible.hasPermission("mcmmo.commands.party." + subcommand.toString().toLowerCase());
|
||||
return permissible.hasPermission("mcmmo.commands.party." + subcommand.toString().toLowerCase(Locale.ENGLISH));
|
||||
}
|
||||
|
||||
public boolean friendlyFire(Permissible permissible) {
|
||||
|
@ -7,6 +7,8 @@ import org.bukkit.block.data.Ageable;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public class StringUtils {
|
||||
|
||||
/**
|
||||
@ -16,7 +18,7 @@ public class StringUtils {
|
||||
* @return the capitalized string
|
||||
*/
|
||||
public static String getCapitalized(String target) {
|
||||
return target.substring(0, 1).toUpperCase() + target.substring(1).toLowerCase();
|
||||
return target.substring(0, 1).toUpperCase() + target.substring(1).toLowerCase(Locale.ENGLISH);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -14,6 +14,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* This class handles many of the JSON components that mcMMO makes and uses
|
||||
@ -537,7 +538,7 @@ public class TextComponentFactory {
|
||||
TextComponent unlockMessage = new TextComponent("");
|
||||
unlockMessage.setText(pluginRef.getLocaleManager().getString("JSON.SkillUnlockMessage", subSkillType.getLocaleName(pluginRef), pluginRef.getRankTools().getRank(player, subSkillType)));
|
||||
unlockMessage.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, getSubSkillHoverComponent(player, subSkillType)));
|
||||
unlockMessage.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/" + pluginRef.getSkillTools().getPrimarySkillBySubSkill(subSkillType).toString().toLowerCase()));
|
||||
unlockMessage.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/" + pluginRef.getSkillTools().getPrimarySkillBySubSkill(subSkillType).toString().toLowerCase(Locale.ENGLISH)));
|
||||
return unlockMessage;
|
||||
}
|
||||
}
|
@ -25,6 +25,7 @@ import org.bukkit.command.PluginCommand;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public final class CommandRegistrationManager {
|
||||
private final mcMMO pluginRef;
|
||||
@ -37,8 +38,8 @@ public final class CommandRegistrationManager {
|
||||
|
||||
private void registerSkillCommands() {
|
||||
for (PrimarySkillType primarySkillType : PrimarySkillType.values()) {
|
||||
String commandName = primarySkillType.toString().toLowerCase();
|
||||
String localizedName = pluginRef.getSkillTools().getLocalizedSkillName(primarySkillType).toLowerCase();
|
||||
String commandName = primarySkillType.toString().toLowerCase(Locale.ENGLISH);
|
||||
String localizedName = pluginRef.getSkillTools().getLocalizedSkillName(primarySkillType).toLowerCase(Locale.ENGLISH);
|
||||
|
||||
PluginCommand command;
|
||||
|
||||
|
@ -12,6 +12,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public final class CommandTools {
|
||||
private final mcMMO pluginRef;
|
||||
@ -75,7 +76,7 @@ public final class CommandTools {
|
||||
return true;
|
||||
}
|
||||
|
||||
PlayerProfile profile = new PlayerProfile(pluginRef, playerName, false);
|
||||
PlayerProfile profile = new PlayerProfile(pluginRef, playerName, null, false);
|
||||
|
||||
if (unloadedProfile(sender, profile)) {
|
||||
return false;
|
||||
@ -288,7 +289,7 @@ public final class CommandTools {
|
||||
break;
|
||||
}
|
||||
|
||||
if (playerName.toLowerCase().contains(partialName.toLowerCase())) {
|
||||
if (playerName.toLowerCase(Locale.ENGLISH).contains(partialName.toLowerCase(Locale.ENGLISH))) {
|
||||
// Partial match
|
||||
matchedPlayers.add(playerName);
|
||||
}
|
||||
|
@ -9,10 +9,10 @@ import java.util.Map;
|
||||
|
||||
public class FormulaManager {
|
||||
// Experience needed to reach a level, cached values for speed
|
||||
private Map<Integer, Integer> experienceNeededRetroLinear;
|
||||
private Map<Integer, Integer> experienceNeededStandardLinear;
|
||||
private Map<Integer, Integer> experienceNeededRetroExponential;
|
||||
private Map<Integer, Integer> experienceNeededStandardExponential;
|
||||
private Map<Integer, Integer> experienceNeededCosmeticLinear;
|
||||
private Map<Integer, Integer> experienceNeededLinear;
|
||||
private Map<Integer, Integer> experienceNeededCosmeticExponential;
|
||||
private Map<Integer, Integer> experienceNeededExponential;
|
||||
|
||||
private FormulaType currentFormula;
|
||||
private final mcMMO pluginRef;
|
||||
@ -27,10 +27,10 @@ public class FormulaManager {
|
||||
* Initialize maps used for XP to next level
|
||||
*/
|
||||
private void initExperienceNeededMaps() {
|
||||
experienceNeededRetroLinear = new HashMap<>();
|
||||
experienceNeededRetroExponential = new HashMap<>();
|
||||
experienceNeededStandardLinear = new HashMap<>();
|
||||
experienceNeededStandardExponential = new HashMap<>();
|
||||
experienceNeededCosmeticLinear = new HashMap<>();
|
||||
experienceNeededCosmeticExponential = new HashMap<>();
|
||||
experienceNeededLinear = new HashMap<>();
|
||||
experienceNeededExponential = new HashMap<>();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -120,34 +120,21 @@ public class FormulaManager {
|
||||
return processXPToNextLevel(level, currentFormula);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of XP needed for the next level based on the level Scaling, the level, and the formula type
|
||||
* @param level target level
|
||||
* @param formulaType target formulaType
|
||||
*/
|
||||
private int processXPToNextLevel(int level, FormulaType formulaType) {
|
||||
if(pluginRef.isRetroModeEnabled())
|
||||
{
|
||||
return processXPRetroToNextLevel(level, formulaType);
|
||||
} else {
|
||||
return processStandardXPToNextLevel(level, formulaType);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate the XP needed for the next level for the linear formula for Standard scaling (1-100)
|
||||
* @param level target level
|
||||
* @return raw xp needed to reach the next level
|
||||
*/
|
||||
private int processStandardXPToNextLevel(int level, FormulaType formulaType) {
|
||||
Map<Integer, Integer> experienceMapRef = formulaType == FormulaType.LINEAR ? experienceNeededStandardLinear : experienceNeededStandardExponential;
|
||||
private int processXPToNextLevel(int level, FormulaType formulaType) {
|
||||
Map<Integer, Integer> experienceMapRef = formulaType == FormulaType.LINEAR ? experienceNeededLinear : experienceNeededExponential;
|
||||
|
||||
if(!experienceMapRef.containsKey(level)) {
|
||||
int cosmeticScaleMod = pluginRef.getPlayerLevelingSettings().getCosmeticLevelScaleModifier();
|
||||
int experienceSum = 0;
|
||||
int retroIndex = (level * 10) + 1;
|
||||
int cosmeticIndex = (level * cosmeticScaleMod) + 1;
|
||||
|
||||
//Sum the range of levels in Retro that this Standard level would represent
|
||||
for(int x = retroIndex; x < (retroIndex + 10); x++) {
|
||||
for(int x = cosmeticIndex; x < (cosmeticIndex + cosmeticScaleMod); x++) {
|
||||
//calculateXPNeeded doesn't cache results so we use that instead of invoking the Retro XP methods to avoid memory bloat
|
||||
experienceSum += calculateXPNeeded(x, formulaType);
|
||||
}
|
||||
@ -166,7 +153,7 @@ public class FormulaManager {
|
||||
* @return raw xp needed to reach the next level based on formula type
|
||||
*/
|
||||
private int processXPRetroToNextLevel(int level, FormulaType formulaType) {
|
||||
Map<Integer, Integer> experienceMapRef = formulaType == FormulaType.LINEAR ? experienceNeededRetroLinear : experienceNeededRetroExponential;
|
||||
Map<Integer, Integer> experienceMapRef = formulaType == FormulaType.LINEAR ? experienceNeededCosmeticLinear : experienceNeededCosmeticExponential;
|
||||
|
||||
if (!experienceMapRef.containsKey(level)) {
|
||||
int experience = calculateXPNeeded(level, formulaType);
|
||||
|
@ -214,12 +214,12 @@ public class NotificationManager {
|
||||
//Send the notification
|
||||
switch (sensitiveCommandType) {
|
||||
case XPRATE_MODIFY:
|
||||
sendAdminNotification(pluginRef.getLocaleManager().getString("Notifications.Admin.XPRate.Start.Others", addItemToFirstPositionOfArray(senderName, args)));
|
||||
sendAdminCommandConfirmation(commandSender, pluginRef.getLocaleManager().getString("Notifications.Admin.XPRate.Start.Self", args));
|
||||
sendAdminNotification(pluginRef.getLocaleManager().getString("Notifications.Admin.XPRate.Start.Others", (Object[]) addItemToFirstPositionOfArray(senderName, args)));
|
||||
sendAdminCommandConfirmation(commandSender, pluginRef.getLocaleManager().getString("Notifications.Admin.XPRate.Start.Self", (Object[]) args));
|
||||
break;
|
||||
case XPRATE_END:
|
||||
sendAdminNotification(pluginRef.getLocaleManager().getString("Notifications.Admin.XPRate.End.Others", addItemToFirstPositionOfArray(senderName, args)));
|
||||
sendAdminCommandConfirmation(commandSender, pluginRef.getLocaleManager().getString("Notifications.Admin.XPRate.End.Self", args));
|
||||
sendAdminNotification(pluginRef.getLocaleManager().getString("Notifications.Admin.XPRate.End.Others", (Object[]) addItemToFirstPositionOfArray(senderName, args)));
|
||||
sendAdminCommandConfirmation(commandSender, pluginRef.getLocaleManager().getString("Notifications.Admin.XPRate.End.Self", (Object[]) args));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ import com.gmail.nossr50.util.skills.SkillActivationType;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
public class RandomChanceTools {
|
||||
|
||||
@ -79,10 +79,8 @@ public class RandomChanceTools {
|
||||
return rollDice(chance, 10000);
|
||||
}
|
||||
|
||||
public boolean rollDice(double chanceOfSuccess, int bound) {
|
||||
Random random = new Random();
|
||||
|
||||
return chanceOfSuccess > random.nextInt(bound);
|
||||
public static boolean rollDice(double chanceOfSuccess, int bound) {
|
||||
return chanceOfSuccess > ThreadLocalRandom.current().nextInt(bound);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -163,7 +163,7 @@ public class ScoreboardWrapper {
|
||||
revertTask = new ScoreboardChangeTask().runTaskLater(pluginRef, ticks);
|
||||
|
||||
// TODO is there any way to do the time that looks acceptable?
|
||||
// player.sendMessage(pluginRef.getLocaleManager().getString("Commands.ConfigScoreboard.Timer", StringUtils.capitalize(sidebarType.toString().toLowerCase()), ticks / 20F));
|
||||
// player.sendMessage(LocaleLoader.getString("Commands.Scoreboard.Timer", StringUtils.capitalize(sidebarType.toString().toLowerCase(Locale.ENGLISH)), ticks / 20F));
|
||||
|
||||
if (pluginRef.getUserManager().getPlayer(playerName) == null)
|
||||
return;
|
||||
|
@ -48,6 +48,12 @@ public final class CombatTools {
|
||||
}
|
||||
|
||||
McMMOPlayer mcMMOPlayer = pluginRef.getUserManager().getPlayer(player);
|
||||
|
||||
//Make sure the profiles been loaded
|
||||
if(mcMMOPlayer == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
SwordsManager swordsManager = mcMMOPlayer.getSwordsManager();
|
||||
double initialDamage = event.getDamage();
|
||||
double finalDamage = initialDamage;
|
||||
@ -92,6 +98,12 @@ public final class CombatTools {
|
||||
Map<DamageModifier, Double> modifiers = getModifiers(event);
|
||||
|
||||
McMMOPlayer mcMMOPlayer = pluginRef.getUserManager().getPlayer(player);
|
||||
|
||||
//Make sure the profiles been loaded
|
||||
if(mcMMOPlayer == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
AxesManager axesManager = mcMMOPlayer.getAxesManager();
|
||||
|
||||
if (axesManager.canActivateAbility()) {
|
||||
@ -134,6 +146,12 @@ public final class CombatTools {
|
||||
double finalDamage = initialDamage;
|
||||
|
||||
McMMOPlayer mcMMOPlayer = pluginRef.getUserManager().getPlayer(player);
|
||||
|
||||
//Make sure the profiles been loaded
|
||||
if(mcMMOPlayer == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
UnarmedManager unarmedManager = mcMMOPlayer.getUnarmedManager();
|
||||
|
||||
if (unarmedManager.canActivateAbility()) {
|
||||
@ -208,6 +226,12 @@ public final class CombatTools {
|
||||
double initialDamage = event.getDamage();
|
||||
|
||||
McMMOPlayer mcMMOPlayer = pluginRef.getUserManager().getPlayer(player);
|
||||
|
||||
//Make sure the profiles been loaded
|
||||
if(mcMMOPlayer == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
ArcheryManager archeryManager = mcMMOPlayer.getArcheryManager();
|
||||
|
||||
double finalDamage = event.getDamage();
|
||||
@ -226,7 +250,8 @@ public final class CombatTools {
|
||||
}
|
||||
|
||||
if (archeryManager.canSkillShot()) {
|
||||
finalDamage += archeryManager.skillShot(initialDamage);
|
||||
//Not Additive
|
||||
finalDamage = archeryManager.skillShot(initialDamage);
|
||||
}
|
||||
|
||||
if (archeryManager.canDaze(target)) {
|
||||
@ -578,6 +603,12 @@ public final class CombatTools {
|
||||
target.damage(damage);
|
||||
}
|
||||
|
||||
|
||||
private boolean processingNoInvulnDamage;
|
||||
public boolean isProcessingNoInvulnDamage() {
|
||||
return processingNoInvulnDamage;
|
||||
}
|
||||
|
||||
public void dealNoInvulnerabilityTickDamage(LivingEntity target, double damage, Entity attacker) {
|
||||
if (target.isDead()) {
|
||||
return;
|
||||
@ -588,14 +619,21 @@ public final class CombatTools {
|
||||
// potentially mis-attributing the death cause; calling a fake event would partially fix this, but this and setting the last damage
|
||||
// cause do have issues around plugin observability. This is not a perfect solution, but it appears to be the best one here
|
||||
// We also set no damage ticks to 0, to ensure that damage is applied for this case, and reset it back to the original value
|
||||
// Snapshot current state so we can pop up properly
|
||||
boolean wasMetaSet = target.getMetadata(MetadataConstants.CUSTOM_DAMAGE_METAKEY).size() != 0;
|
||||
target.setMetadata(MetadataConstants.CUSTOM_DAMAGE_METAKEY, MetadataConstants.metadataValue);
|
||||
boolean wasProcessing = processingNoInvulnDamage;
|
||||
// set markers
|
||||
processingNoInvulnDamage = true;
|
||||
target.setMetadata(MetadataConstants.CUSTOM_DAMAGE_METAKEY, MetadataConstants.metadataValue);
|
||||
int noDamageTicks = target.getNoDamageTicks();
|
||||
target.setNoDamageTicks(0);
|
||||
target.damage(damage, attacker);
|
||||
target.setNoDamageTicks(noDamageTicks);
|
||||
if (!wasMetaSet)
|
||||
target.removeMetadata(MetadataConstants.CUSTOM_DAMAGE_METAKEY, pluginRef);
|
||||
if (!wasProcessing)
|
||||
processingNoInvulnDamage = false;
|
||||
}
|
||||
|
||||
public void dealNoInvulnerabilityTickDamageRupture(LivingEntity target, double damage, Entity attacker, int toolTier) {
|
||||
|
@ -392,7 +392,7 @@ public class RankTools {
|
||||
.getNode(subSkillType.getHoconFriendlyConfigName())
|
||||
.getValue(TypeToken.of(SkillRankProperty.class));
|
||||
|
||||
int unlockLevel = skillRankProperty.getUnlockLevel(pluginRef.isRetroModeEnabled(), rank);
|
||||
int unlockLevel = skillRankProperty.getUnlockLevel(pluginRef, rank);
|
||||
return unlockLevel;
|
||||
|
||||
} catch (ObjectMappingException | MissingSkillPropertyDefinition | NullPointerException e) {
|
||||
|
@ -93,6 +93,8 @@ public class SoundManager {
|
||||
case DEFLECT_ARROWS:
|
||||
case BLEED:
|
||||
return Sound.ENTITY_ENDER_EYE_DEATH;
|
||||
case GLASS:
|
||||
return Sound.BLOCK_GLASS_BREAK;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ public enum SoundType {
|
||||
ABILITY_ACTIVATED_GENERIC,
|
||||
ABILITY_ACTIVATED_BERSERK,
|
||||
BLEED,
|
||||
GLASS,
|
||||
TIRED;
|
||||
|
||||
public boolean usesCustomPitch() {
|
||||
|
@ -1,6 +1,9 @@
|
||||
package com.gmail.nossr50.worldguard;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.sk89q.worldguard.WorldGuard;
|
||||
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
|
||||
import com.sk89q.worldguard.protection.flags.registry.SimpleFlagRegistry;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -12,10 +15,7 @@ public class WorldGuardUtils {
|
||||
private boolean isLoaded = false;
|
||||
private boolean detectedIncompatibleWG = false;
|
||||
private static final ArrayList<String> WGClassList;
|
||||
private WorldGuardManager worldGuardManager;
|
||||
|
||||
public WorldGuardUtils() {
|
||||
}
|
||||
protected final mcMMO pluginRef;
|
||||
|
||||
static {
|
||||
/*
|
||||
@ -41,6 +41,10 @@ public class WorldGuardUtils {
|
||||
WGClassList.add("com.sk89q.worldguard.protection.regions.RegionQuery");
|
||||
}
|
||||
|
||||
public WorldGuardUtils(mcMMO pluginRef) {
|
||||
this.pluginRef = pluginRef;
|
||||
}
|
||||
|
||||
public boolean isWorldGuardLoaded()
|
||||
{
|
||||
if(detectedIncompatibleWG)
|
||||
@ -68,7 +72,7 @@ public class WorldGuardUtils {
|
||||
if(plugin == null) {
|
||||
//WG is not present
|
||||
detectedIncompatibleWG = true;
|
||||
System.out.println("[mcMMO WorldGuardUtils Debug] WorldGuard was not detected.");
|
||||
pluginRef.getLogger().info("WorldGuard was not detected.");
|
||||
} else {
|
||||
//Check that its actually of class WorldGuardPlugin
|
||||
if(plugin instanceof WorldGuardPlugin)
|
||||
@ -77,9 +81,6 @@ public class WorldGuardUtils {
|
||||
{
|
||||
worldGuardPluginRef = (WorldGuardPlugin) plugin;
|
||||
isLoaded = true;
|
||||
|
||||
//Init WG Manager
|
||||
worldGuardManager = new WorldGuardManager();
|
||||
}
|
||||
} else {
|
||||
//Plugin is not of the expected type
|
||||
@ -87,6 +88,7 @@ public class WorldGuardUtils {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return worldGuardPluginRef;
|
||||
}
|
||||
|
||||
@ -98,7 +100,10 @@ public class WorldGuardUtils {
|
||||
*/
|
||||
private boolean isCompatibleVersion(Plugin plugin) {
|
||||
//Check that the version of WG is at least version 7.xx
|
||||
// boolean allClassesFound = true;
|
||||
boolean allClassesFound = true;
|
||||
if (detectedIncompatibleWG) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!plugin.getDescription().getVersion().startsWith("7")) {
|
||||
markWGIncompatible();
|
||||
@ -107,10 +112,9 @@ public class WorldGuardUtils {
|
||||
for(String classString : WGClassList) {
|
||||
try {
|
||||
Class<?> checkForClass = Class.forName(classString);
|
||||
detectedIncompatibleWG = false; //In case this was set to true previously
|
||||
} catch (ClassNotFoundException | NoClassDefFoundError e) {
|
||||
// allClassesFound = false;
|
||||
System.out.println("[mcMMO WorldGuardUtils Debug] Missing WorldGuard class - "+classString);
|
||||
allClassesFound = false;
|
||||
pluginRef.getLogger().severe("Missing WorldGuard class - "+classString);
|
||||
markWGIncompatible();
|
||||
}
|
||||
}
|
||||
@ -118,17 +122,17 @@ public class WorldGuardUtils {
|
||||
/*
|
||||
* If WG appears to have all of its classes we can then check to see if its been initialized properly
|
||||
*/
|
||||
// try {
|
||||
// if(allClassesFound) {
|
||||
// if(!((SimpleFlagRegistry) WorldGuard.getInstance().getFlagRegistry()).isInitialized()) {
|
||||
// markWGIncompatible();
|
||||
// System.out.println("[mcMMO WorldGuardUtils Debug] WG did not initialize properly, this can cause errors with mcMMO so mcMMO is disabling certain features.");
|
||||
// }
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// markWGIncompatible();
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
try {
|
||||
if(allClassesFound) {
|
||||
if(!((SimpleFlagRegistry) WorldGuard.getInstance().getFlagRegistry()).isInitialized()) {
|
||||
markWGIncompatible();
|
||||
pluginRef.getLogger().severe("WG did not initialize properly, this can cause errors with mcMMO so mcMMO is disabling certain features.");
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
markWGIncompatible();
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
return !detectedIncompatibleWG;
|
||||
@ -138,14 +142,10 @@ public class WorldGuardUtils {
|
||||
* Mark WG as being incompatible to avoid unnecessary operations
|
||||
*/
|
||||
private void markWGIncompatible() {
|
||||
System.out.println("[mcMMO WorldGuardUtils Debug] You are using a version of WG that is not compatible with mcMMO, " +
|
||||
pluginRef.getLogger().severe("You are using a version of WG that is not compatible with mcMMO, " +
|
||||
"WG features for mcMMO will be disabled. mcMMO requires you to be using a new version of WG7 " +
|
||||
"in order for it to use WG features. Not all versions of WG7 are compatible.");
|
||||
System.out.println("[mcMMO WorldGuardUtils Debug] mcMMO will continue to function normally, but if you wish to use WG support you must use a compatible version.");
|
||||
pluginRef.getLogger().severe("mcMMO will continue to function normally, but if you wish to use WG support you must use a compatible version.");
|
||||
detectedIncompatibleWG = true;
|
||||
}
|
||||
|
||||
public WorldGuardManager getWorldGuardManager() {
|
||||
return worldGuardManager;
|
||||
}
|
||||
}
|
||||
|
9
mcmmo-core/src/main/resources/com/gmail/nossr50/locale/doTranslation.sh
Executable file
9
mcmmo-core/src/main/resources/com/gmail/nossr50/locale/doTranslation.sh
Executable file
@ -0,0 +1,9 @@
|
||||
|
||||
sed -i s/Axes.Skills.SS/SuperAbility.SkullSplitter/g *.properties
|
||||
sed -i s/Excavation.Skills.GigaDrillBreaker/SuperAbility.GigaDrillBreaker/g *.properties
|
||||
sed -i s/Herbalism.Skills.GTe/SuperAbility.GreenTerra/g *.properties
|
||||
sed -i s/Mining.Skills.SuperBreaker/SuperAbility.SuperBreaker/g *.properties
|
||||
sed -i s/Mining.Blast/SuperAbility.BlastMining/g *.properties
|
||||
sed -i s/Swords.Skills.SS/SuperAbility.SerratedStrikes/g *.properties
|
||||
sed -i s/Unarmed.Skills.Berserk/SuperAbility.Berserk/g *.properties
|
||||
sed -i s/Woodcutting.Skills.TreeFeller/SuperAbility.TreeFeller/g *.properties
|
File diff suppressed because it is too large
Load Diff
@ -118,14 +118,14 @@ XPBar.Complex.Template={0} [[DARK_AQUA]] {4}[[WHITE]]% [[DARK_AQUA]]([[WHITE]]{1
|
||||
# ACROBATICS
|
||||
Acrobatics.Ability.Proc=[[GREEN]]**\u512a\u96c5\u306b\u7740\u5730\u3057\u305f**
|
||||
Acrobatics.Combat.Proc=[[GREEN]]**\u8eb1\u3057\u305f**
|
||||
Acrobatics.SubSkill.Roll.Stats=[[GOLD]]\u53d7\u3051\u8eab \u78ba\u7387 [[YELLOW]]{0}%[[GOLD]] \u4e0a\u4f4d\u53d7\u3051\u8eab \u78ba\u7387[[YELLOW]] {1}%
|
||||
Acrobatics.SubSkill.Roll.Stats=[[GOLD]]\u53d7\u3051\u8eab \u78ba\u7387 [[YELLOW]]{0}%[[GOLD]] \u512a\u96c5\u306a\u53d7\u3051\u8eab \u78ba\u7387[[YELLOW]] {1}%
|
||||
Acrobatics.SubSkill.Roll.Stat=\u53d7\u3051\u8eab \u78ba\u7387
|
||||
Acrobatics.SubSkill.Roll.Stat.Extra=\u4e0a\u4f4d\u53d7\u3051\u8eab \u78ba\u7387
|
||||
Acrobatics.SubSkill.Roll.Stat.Extra=\u512a\u96c5\u306a\u53d7\u3051\u8eab \u78ba\u7387
|
||||
Acrobatics.SubSkill.Roll.Name=\u53d7\u3051\u8eab
|
||||
Acrobatics.SubSkill.Roll.Description=\u30c0\u30e1\u30fc\u30b8\u3092\u907f\u3051\u308b\u70ba\u306b\u843d\u4e0b\u6642\u306b\u53d7\u3051\u8eab\u3059\u308b\u3002
|
||||
Acrobatics.SubSkill.Roll.Chance=\u53d7\u3051\u8eab \u78ba\u7387: [[YELLOW]]{0}
|
||||
Acrobatics.SubSkill.Roll.GraceChance=\u4e0a\u4f4d\u53d7\u3051\u8eab \u78ba\u7387: [[YELLOW]]{0}
|
||||
Acrobatics.SubSkill.GracefulRoll.Name=\u4e0a\u4f4d\u53d7\u3051\u8eab
|
||||
Acrobatics.SubSkill.Roll.GraceChance=\u512a\u96c5\u306a\u53d7\u3051\u8eab \u78ba\u7387: [[YELLOW]]{0}
|
||||
Acrobatics.SubSkill.GracefulRoll.Name=\u512a\u96c5\u306a\u53d7\u3051\u8eab
|
||||
Acrobatics.SubSkill.GracefulRoll.Description=\u53d7\u3051\u8eab\u306e\u4e8c\u500d\u306e\u52b9\u679c\u3092\u767a\u63ee\u3059\u308b\u3002
|
||||
Acrobatics.SubSkill.Dodge.Name=\u8eb1\u3059
|
||||
Acrobatics.SubSkill.Dodge.Description=\u653b\u6483\u3067\u53d7\u3051\u308b\u30c0\u30e1\u30fc\u30b8\u3092\u534a\u6e1b\u3059\u308b\u3002
|
||||
@ -193,10 +193,10 @@ Axes.SubSkill.GreaterImpact.Name=\u30b0\u30ec\u30fc\u30bf\u30fc\u30a4\u30f3\u30d
|
||||
Axes.SubSkill.GreaterImpact.Description=\u9632\u5177\u306e\u306a\u3044\u6575\u306b\u8ffd\u52a0\u30c0\u30e1\u30fc\u30b8\u3092\u4e0e\u3048\u308b\u3002
|
||||
Axes.Listener=\u65a7:
|
||||
Axes.SkillName=\u65a7
|
||||
SuperAbility.SkullSplitter.Off=**\u30b9\u30ab\u30eb\u30b9\u30d7\u30ea\u30c3\u30bf\u30fc \u3092\u6469\u640d\u3057\u305f**
|
||||
SuperAbility.SkullSplitter.Off=**\u30b9\u30ab\u30eb\u30b9\u30d7\u30ea\u30c3\u30bf\u30fc \u3092\u6d88\u8017\u3057\u305f**
|
||||
SuperAbility.SkullSplitter.On=[[GREEN]]**\u30b9\u30ab\u30eb\u30b9\u30d7\u30ea\u30c3\u30bf\u30fc \u30a2\u30af\u30c6\u30a3\u30d9\u30fc\u30c8**
|
||||
SuperAbility.SkullSplitter.Refresh=[[YELLOW]]\u30b9\u30ab\u30eb\u30b9\u30d7\u30ea\u30c3\u30bf\u30fc [[GREEN]]\u30a2\u30d3\u30ea\u30c6\u30a3\u304c\u56de\u5fa9\u3057\u307e\u3057\u305f\uff01
|
||||
SuperAbility.SkullSplitter.Other.Off=[[YELLOW]]{0}\u304c [[WHITE]]\u30b9\u30ab\u30eb\u30b9\u30d7\u30ea\u30c3\u30bf\u30fc [[GREEN]]\u3092\u6469\u640d\u3057\u305f
|
||||
SuperAbility.SkullSplitter.Other.Off=[[YELLOW]]{0}\u304c [[WHITE]]\u30b9\u30ab\u30eb\u30b9\u30d7\u30ea\u30c3\u30bf\u30fc [[GREEN]]\u3092\u6d88\u8017\u3057\u305f
|
||||
SuperAbility.SkullSplitter.Other.On=[[GREEN]]{0}[[DARK_GREEN]]\u304c [[RED]]\u30b9\u30ab\u30eb\u30b9\u30d7\u30ea\u30c3\u30bf\u30fc [[DARK_GREEN]]\u3092\u4f7f\u3063\u305f\uff01
|
||||
|
||||
# EXCAVATION
|
||||
@ -212,10 +212,10 @@ Excavation.SubSkill.Archaeology.Stat.Extra=\u8003\u53e4\u5b66 \u7d4c\u9a13\u5024
|
||||
|
||||
Excavation.Listener=\u6398\u524a:
|
||||
Excavation.SkillName=\u6398\u524a
|
||||
SuperAbility.GigaDrillBreaker.Off=**\u30ae\u30ac\u30c9\u30ea\u30eb\u30d6\u30ec\u30fc\u30ab\u30fc \u3092\u6469\u640d\u3057\u305f**
|
||||
SuperAbility.GigaDrillBreaker.Off=**\u30ae\u30ac\u30c9\u30ea\u30eb\u30d6\u30ec\u30fc\u30ab\u30fc \u3092\u6d88\u8017\u3057\u305f**
|
||||
SuperAbility.GigaDrillBreaker.On=[[GREEN]]**\u30ae\u30ac\u30c9\u30ea\u30eb\u30d6\u30ec\u30fc\u30ab\u30fc \u30a2\u30af\u30c6\u30a3\u30d9\u30fc\u30c8**
|
||||
SuperAbility.GigaDrillBreaker.Refresh=[[YELLOW]]\u30ae\u30ac\u30c9\u30ea\u30eb\u30d6\u30ec\u30fc\u30ab\u30fc [[GREEN]]\u30a2\u30d3\u30ea\u30c6\u30a3\u304c\u56de\u5fa9\u3057\u307e\u3057\u305f\uff01
|
||||
SuperAbility.GigaDrillBreaker.Other.Off=[[YELLOW]]{0}\u304c [[WHITE]]\u30ae\u30ac\u30c9\u30ea\u30eb\u30d6\u30ec\u30fc\u30ab\u30fc [[GREEN]]\u3092\u6469\u640d\u3057\u305f
|
||||
SuperAbility.GigaDrillBreaker.Other.Off=[[YELLOW]]{0}\u304c [[WHITE]]\u30ae\u30ac\u30c9\u30ea\u30eb\u30d6\u30ec\u30fc\u30ab\u30fc [[GREEN]]\u3092\u6d88\u8017\u3057\u305f
|
||||
SuperAbility.GigaDrillBreaker.Other.On=[[GREEN]]{0}[[DARK_GREEN]]\u304c [[RED]]\u30ae\u30ac\u30c9\u30ea\u30eb\u30d6\u30ec\u30fc\u30ab\u30fc [[DARK_GREEN]]\u3092\u4f7f\u3063\u305f\uff01
|
||||
|
||||
# FISHING
|
||||
@ -284,10 +284,10 @@ Herbalism.SubSkill.ShroomThumb.Stat=\u30ad\u30ce\u30b3\u306e\u89aa\u6307 \u78ba\
|
||||
Herbalism.HylianLuck=[[GREEN]]\u30cf\u30a4\u30e9\u30eb\u306e\u904b\u306f\u4eca\u65e5\u306e\u3042\u306a\u305f\u306b\u3064\u3044\u3066\u3044\u307e\u3059\uff01
|
||||
Herbalism.Listener=\u8fb2\u696d:
|
||||
Herbalism.SkillName=\u8fb2\u696d
|
||||
SuperAbility.GreenTerra.Off=**\u304c\u3059\u308a\u6e1b\u3063\u305f \u3092\u6469\u640d\u3057\u305f**
|
||||
SuperAbility.GreenTerra.On=[[GREEN]]**\u304c\u3059\u308a\u6e1b\u3063\u305f \u30a2\u30af\u30c6\u30a3\u30d9\u30fc\u30c8**
|
||||
SuperAbility.GreenTerra.Refresh=[[YELLOW]]\u304c\u3059\u308a\u6e1b\u3063\u305f [[GREEN]]\u30a2\u30d3\u30ea\u30c6\u30a3\u304c\u56de\u5fa9\u3057\u307e\u3057\u305f\uff01
|
||||
SuperAbility.GreenTerra.Other.Off=[[YELLOW]]{0}\u304c [[WHITE]]\u304c\u3059\u308a\u6e1b\u3063\u305f [[GREEN]]\u3092\u6469\u640d\u3057\u305f
|
||||
SuperAbility.GreenTerra.Off=**\u30b0\u30ea\u30fc\u30f3\u30c6\u30e9 \u3092\u6d88\u8017\u3057\u305f**
|
||||
SuperAbility.GreenTerra.On=[[GREEN]]**\u30b0\u30ea\u30fc\u30f3\u30c6\u30e9 \u30a2\u30af\u30c6\u30a3\u30d9\u30fc\u30c8**
|
||||
SuperAbility.GreenTerra.Refresh=[[YELLOW]]\u30b0\u30ea\u30fc\u30f3\u30c6\u30e9 [[GREEN]]\u30a2\u30d3\u30ea\u30c6\u30a3\u304c\u56de\u5fa9\u3057\u307e\u3057\u305f\uff01
|
||||
SuperAbility.GreenTerra.Other.Off=[[YELLOW]]{0}\u304c [[WHITE]]\u30b0\u30ea\u30fc\u30f3\u30c6\u30e9 [[GREEN]]\u3092\u6d88\u8017\u3057\u305f
|
||||
SuperAbility.GreenTerra.Other.On=[[GREEN]]{0}[[DARK_GREEN]]\u304c [[RED]]\u30b0\u30ea\u30fc\u30f3\u30c6\u30e9 [[DARK_GREEN]]\u3092\u4f7f\u3063\u305f\uff01
|
||||
|
||||
# MINING
|
||||
@ -313,10 +313,10 @@ Mining.SubSkill.DemolitionsExpertise.Description=TNT\u306b\u3088\u308b\u30c0\u30
|
||||
Mining.SubSkill.DemolitionsExpertise.Stat=\u89e3\u4f53\u30a8\u30ad\u30b9\u30d1\u30fc\u30c8\u306e\u30c0\u30e1\u30fc\u30b8\u8efd\u6e1b
|
||||
Mining.Listener=\u63a1\u6398:
|
||||
Mining.SkillName=\u63a1\u6398
|
||||
SuperAbility.SuperBreaker.Off=**\u30b9\u30fc\u30d1\u30fc\u30d6\u30ec\u30fc\u30ab\u30fc \u3092\u6469\u640d\u3057\u305f**
|
||||
SuperAbility.SuperBreaker.Off=**\u30b9\u30fc\u30d1\u30fc\u30d6\u30ec\u30fc\u30ab\u30fc \u3092\u6d88\u8017\u3057\u305f**
|
||||
SuperAbility.SuperBreaker.On=[[GREEN]]**\u30b9\u30fc\u30d1\u30fc\u30d6\u30ec\u30fc\u30ab\u30fc \u30a2\u30af\u30c6\u30a3\u30d9\u30fc\u30c8**
|
||||
SuperAbility.SuperBreaker.Refresh=[[YELLOW]]\u30b9\u30fc\u30d1\u30fc\u30d6\u30ec\u30fc\u30ab\u30fc [[GREEN]]\u30a2\u30d3\u30ea\u30c6\u30a3\u304c\u56de\u5fa9\u3057\u307e\u3057\u305f\uff01
|
||||
SuperAbility.SuperBreaker.Other.Off=[[YELLOW]]{0}\u304c [[WHITE]]\u30b9\u30fc\u30d1\u30fc\u30d6\u30ec\u30fc\u30ab\u30fc [[GREEN]]\u3092\u6469\u640d\u3057\u305f
|
||||
SuperAbility.SuperBreaker.Other.Off=[[YELLOW]]{0}\u304c [[WHITE]]\u30b9\u30fc\u30d1\u30fc\u30d6\u30ec\u30fc\u30ab\u30fc [[GREEN]]\u3092\u6d88\u8017\u3057\u305f
|
||||
SuperAbility.SuperBreaker.Other.On=[[GREEN]]{0}[[DARK_GREEN]]\u304c [[RED]]\u30b9\u30fc\u30d1\u30fc\u30d6\u30ec\u30fc\u30ab\u30fc [[DARK_GREEN]]\u3092\u4f7f\u3063\u305f\uff01
|
||||
|
||||
# Blast Mining
|
||||
@ -428,10 +428,10 @@ Swords.Effect.4=\u92f8\u6b6f\u72b6\u306e\u653b\u6483\u306e\u7834\u88c2+
|
||||
Swords.Effect.5={0} Tick \u7834\u88c2
|
||||
Swords.Listener=\u5263:
|
||||
Swords.SkillName=\u5263
|
||||
SuperAbility.SerratedStrikes.Off=**\u92f8\u6b6f\u72b6\u306e\u653b\u6483 \u3092\u6469\u640d\u3057\u305f**
|
||||
SuperAbility.SerratedStrikes.Off=**\u92f8\u6b6f\u72b6\u306e\u653b\u6483 \u3092\u6d88\u8017\u3057\u305f**
|
||||
SuperAbility.SerratedStrikes.On=[[GREEN]]**\u92f8\u6b6f\u72b6\u306e\u653b\u6483 \u30a2\u30af\u30c6\u30a3\u30d9\u30fc\u30c8**
|
||||
SuperAbility.SerratedStrikes.Refresh=[[YELLOW]]\u92f8\u6b6f\u72b6\u306e\u653b\u6483 [[GREEN]]\u30a2\u30d3\u30ea\u30c6\u30a3\u304c\u56de\u5fa9\u3057\u307e\u3057\u305f\uff01
|
||||
SuperAbility.SerratedStrikes.Other.Off=[[YELLOW]]{0}\u304c [[WHITE]]\u92f8\u6b6f\u72b6\u306e\u653b\u6483 [[GREEN]]\u3092\u6469\u640d\u3057\u305f
|
||||
SuperAbility.SerratedStrikes.Other.Off=[[YELLOW]]{0}\u304c [[WHITE]]\u92f8\u6b6f\u72b6\u306e\u653b\u6483 [[GREEN]]\u3092\u6d88\u8017\u3057\u305f
|
||||
SuperAbility.SerratedStrikes.Other.On=[[GREEN]]{0}[[DARK_GREEN]] \u304c [[RED]]\u92f8\u6b6f\u72b6\u306e\u653b\u6483 [[DARK_GREEN]]\u3092\u4f7f\u3063\u305f\uff01
|
||||
|
||||
# TAMING
|
||||
@ -515,10 +515,10 @@ Unarmed.SubSkill.BlockCracker.Name=\u30d6\u30ed\u30c3\u30af\u30af\u30e9\u30c3\u3
|
||||
Unarmed.SubSkill.BlockCracker.Description=\u62f3\u3067\u5ca9\u3092\u7834\u58ca\u3059\u308b\u3002
|
||||
Unarmed.Listener=\u7d20\u624b:
|
||||
Unarmed.SkillName=\u7d20\u624b
|
||||
SuperAbility.Berserk.Off=**\u30d0\u30fc\u30b5\u30fc\u30ab\u30fc \u3092\u6469\u640d\u3057\u305f**
|
||||
SuperAbility.Berserk.Off=**\u30d0\u30fc\u30b5\u30fc\u30ab\u30fc \u3092\u6d88\u8017\u3057\u305f**
|
||||
SuperAbility.Berserk.On=[[GREEN]]**\u30d0\u30fc\u30b5\u30fc\u30ab\u30fc \u30a2\u30af\u30c6\u30a3\u30d9\u30fc\u30c8**
|
||||
SuperAbility.Berserk.Refresh=[[YELLOW]]\u30d0\u30fc\u30b5\u30fc\u30ab\u30fc [[GREEN]]\u30a2\u30d3\u30ea\u30c6\u30a3\u304c\u56de\u5fa9\u3057\u307e\u3057\u305f\uff01
|
||||
SuperAbility.Berserk.Other.Off=[[YELLOW]]{0}\u304c [[WHITE]]\u30d0\u30fc\u30b5\u30fc\u30ab\u30fc [[GREEN]]\u3092\u6469\u640d\u3057\u305f
|
||||
SuperAbility.Berserk.Other.Off=[[YELLOW]]{0}\u304c [[WHITE]]\u30d0\u30fc\u30b5\u30fc\u30ab\u30fc [[GREEN]]\u3092\u6d88\u8017\u3057\u305f
|
||||
SuperAbility.Berserk.Other.On=[[GREEN]]{0}[[DARK_GREEN]]\u304c [[RED]]\u30d0\u30fc\u30b5\u30fc\u30ab\u30fc [[DARK_GREEN]]\u3092\u4f7f\u3063\u305f\uff01
|
||||
|
||||
# WOODCUTTING
|
||||
@ -541,10 +541,10 @@ Woodcutting.SubSkill.NaturesBounty.Name=\u81ea\u7136\u306e\u6075\u307f
|
||||
Woodcutting.SubSkill.NaturesBounty.Description=\u81ea\u7136\u304b\u3089\u7d4c\u9a13\u5024\u3092\u96c6\u3081\u308b\u3002
|
||||
Woodcutting.Listener=\u6728\u3053\u308a:
|
||||
Woodcutting.SkillName=\u6728\u3053\u308a
|
||||
SuperAbility.TreeFeller.Off=**\u30c4\u30ea\u30fc\u30d5\u30a7\u30e9\u30fc \u3092\u6469\u640d\u3057\u305f**
|
||||
SuperAbility.TreeFeller.Off=**\u30c4\u30ea\u30fc\u30d5\u30a7\u30e9\u30fc \u3092\u6d88\u8017\u3057\u305f**
|
||||
SuperAbility.TreeFeller.On=[[GREEN]]**\u30c4\u30ea\u30fc\u30d5\u30a7\u30e9\u30fc \u30a2\u30af\u30c6\u30a3\u30d9\u30fc\u30c8**
|
||||
SuperAbility.TreeFeller.Refresh=[[YELLOW]]\u30c4\u30ea\u30fc\u30d5\u30a7\u30e9\u30fc [[GREEN]]\u30a2\u30d3\u30ea\u30c6\u30a3\u304c\u56de\u5fa9\u3057\u307e\u3057\u305f\uff01
|
||||
SuperAbility.TreeFeller.Other.Off=[[YELLOW]]{0}\u304c [[WHITE]]\u30c4\u30ea\u30fc\u30d5\u30a7\u30e9\u30fc [[GREEN]]\u3092\u6469\u640d\u3057\u305f
|
||||
SuperAbility.TreeFeller.Other.Off=[[YELLOW]]{0}\u304c [[WHITE]]\u30c4\u30ea\u30fc\u30d5\u30a7\u30e9\u30fc [[GREEN]]\u3092\u6d88\u8017\u3057\u305f
|
||||
SuperAbility.TreeFeller.Other.On=[[GREEN]]{0}[[DARK_GREEN]]\u304c [[RED]]\u30c4\u30ea\u30fc\u30d5\u30a7\u30e9\u30fc [[DARK_GREEN]]\u3092\u4f7f\u3063\u305f\uff01
|
||||
SuperAbility.TreeFeller.Splinter=\u65a7\u306f\u4f55\u5341\u3082\u306e\u7834\u7247\u306b\u7815\u3051\u305f\uff01
|
||||
SuperAbility.TreeFeller.Threshold=\u6728\u304c\u5927\u304d\u3059\u304e\u308b\uff01
|
||||
@ -988,19 +988,19 @@ Skills.Parents= PARENTS
|
||||
Skills.Stats={0}[[GREEN]]{1}[[DARK_AQUA]] XP([[GRAY]]{2}[[DARK_AQUA]]/[[GRAY]]{3}[[DARK_AQUA]])
|
||||
Skills.ChildStats={0}[[GREEN]]{1}
|
||||
Skills.MaxXP=\u6700\u5927
|
||||
Skills.TooTired=\u305d\u306e\u30a2\u30d3\u30ea\u30c6\u30a3\u3092\u518d\u3073\u4f7f\u3046\u306e\u306b\u306f\u98fd\u304d\u904e\u304e\u3066\u3044\u307e\u3059\u3002 [[YELLOW]]({0}\u79d2)
|
||||
Skills.TooTired=\u305d\u306e\u30a2\u30d3\u30ea\u30c6\u30a3\u3092\u518d\u3073\u4f7f\u3046\u306e\u306b\u306f\u75b2\u308c\u904e\u304e\u3066\u3044\u307e\u3059\u3002 [[YELLOW]]({0}\u79d2)
|
||||
Skills.Cancelled=[[GOLD]]{0} [[RED]]\u30ad\u30e3\u30f3\u30bb\u30eb\uff01
|
||||
Skills.ConfirmOrCancel=[[GREEN]]\u3082\u3046\u4e00\u5ea6\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3066[[GOLD]]{0}[[GREEN]]\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u30ad\u30e3\u30f3\u30bb\u30eb\u3059\u308b\u306b\u306f\u5de6\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002
|
||||
Skills.AbilityGateRequirementFail=[[GRAY]]\u3053\u306e\u30a2\u30d3\u30ea\u30c6\u30a3\u3092\u4f7f\u3046\u305f\u3081\u306b\u306f[[YELLOW]]{0}[[GRAY]]\u30ec\u30d9\u30eb\u306e[[DARK_AQUA]]{1}[[GRAY]]\u304c\u5fc5\u8981\u3067\u3059\u3002
|
||||
|
||||
# STATISTICS
|
||||
Stats.Header.Combat=[[GOLD]]-=\u30b3\u30f3\u30d0\u30c3\u30c8\u30b9\u30ad\u30eb=-
|
||||
Stats.Header.Combat=[[GOLD]]-=\u6226\u95d8\u30b9\u30ad\u30eb=-
|
||||
Stats.Header.Gathering=[[GOLD]]-=\u53ce\u96c6\u30b9\u30ad\u30eb=-
|
||||
Stats.Header.Misc=[[GOLD]]-=\u305d\u306e\u4ed6\u306e\u30b9\u30ad\u30eb=-
|
||||
Stats.Own.Stats=[[GREEN]][mcMMO] \u7d71\u8a08
|
||||
|
||||
# PERKS
|
||||
Perks.XP.Name=\u7d4c\u9a13
|
||||
Perks.XP.Name=\u7d4c\u9a13\u5024
|
||||
Perks.XP.Desc=\u7279\u5b9a\u306e\u30b9\u30ad\u30eb\u306e\u30d6\u30fc\u30b9\u30c8XP\u3092\u53d7\u3051\u53d6\u308b\u3002
|
||||
Perks.Lucky.Name=\u30e9\u30c3\u30ad\u30fc
|
||||
Perks.Lucky.Desc={0}\u306e\u30b9\u30ad\u30eb\u3068\u80fd\u529b\u306b\u300133.3\uff05\u306e\u30a2\u30af\u30c6\u30a3\u30d9\u30fc\u30c8\u306e\u78ba\u7387\u3092\u4e0e\u3048\u307e\u3059\u3002
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -436,7 +436,7 @@ Bonus_Drops:
|
||||
Melon_Slice: true
|
||||
Nether_Wart: true
|
||||
Potatoes: true
|
||||
Potatoe: true
|
||||
Potato: true
|
||||
Pumpkin: true
|
||||
Red_Mushroom: true
|
||||
Sugar_Cane: true
|
||||
@ -456,6 +456,7 @@ Bonus_Drops:
|
||||
Lilac: true
|
||||
Rose_Bush: true
|
||||
Peony: true
|
||||
Lily_Of_The_Valley: true
|
||||
Mining:
|
||||
Andesite: true
|
||||
Diorite: true
|
||||
|
@ -33,6 +33,7 @@ ExploitFix:
|
||||
LavaStoneAndCobbleFarming: true
|
||||
TreeFellerReducedXP: true
|
||||
PistonCheating: true
|
||||
SnowGolemExcavation: true
|
||||
Experience_Bars:
|
||||
# Turn this to false if you wanna disable XP bars
|
||||
Enable: true
|
||||
@ -274,7 +275,8 @@ Experience_Values:
|
||||
Brown_Mushroom_Block: 70
|
||||
Mushroom_Stem: 80
|
||||
Herbalism:
|
||||
Sweet_Berry_Bush: 300
|
||||
Bee_Nest: 200
|
||||
Sweet_Berry_Bush: 50
|
||||
Seagrass: 10
|
||||
Tall_Seagrass: 10
|
||||
Kelp: 3
|
||||
@ -440,6 +442,7 @@ Experience_Values:
|
||||
Cat: 500
|
||||
Fox: 1000
|
||||
Panda: 1000
|
||||
Bee: 100
|
||||
Combat:
|
||||
Multiplier:
|
||||
Animals: 1.0
|
||||
@ -501,4 +504,5 @@ Experience_Values:
|
||||
Ravager: 4.0
|
||||
Trader_Llama: 1.0
|
||||
Wandering_trader: 1.0
|
||||
Bee: 1.5
|
||||
|
||||
|
@ -561,6 +561,7 @@ Enchantment_Drop_Rates:
|
||||
LEGENDARY: 0.75
|
||||
#
|
||||
# Settings for Excavation's Archaeology
|
||||
# If you are in retro mode, Drop_Level is multiplied by 10.
|
||||
###
|
||||
Excavation:
|
||||
CAKE:
|
||||
@ -691,6 +692,7 @@ Excavation:
|
||||
Drops_From: [Dirt, Coarse_Dirt, Podzol, Grass_Block, Sand, Red_Sand, Gravel, Clay, Mycelium, Soul_Sand]
|
||||
#
|
||||
# Settings for Hylian Luck
|
||||
# If you are in retro mode, Drop_Level is multiplied by 10.
|
||||
###
|
||||
Hylian_Luck:
|
||||
MELON_SEEDS:
|
||||
@ -749,6 +751,7 @@ Hylian_Luck:
|
||||
Drops_From: [Pots]
|
||||
#
|
||||
# Settings for Shake
|
||||
# If you are in retro mode, Drop_Level is multiplied by 10.
|
||||
###
|
||||
Shake:
|
||||
BLAZE:
|
||||
|
@ -4,6 +4,10 @@ Sounds:
|
||||
# 1.0 = Max volume
|
||||
# 0.0 = No Volume
|
||||
MasterVolume: 1.0
|
||||
GLASS:
|
||||
Enable: true
|
||||
Volume: 1.0
|
||||
Pitch: 1.0
|
||||
ANVIL:
|
||||
Enable: true
|
||||
Volume: 1.0
|
||||
|
Loading…
Reference in New Issue
Block a user