mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Temporary Spigot bug fix
This commit is contained in:
parent
2fc1ba44d8
commit
f05c4121d2
@ -1,6 +1,10 @@
|
|||||||
Version 2.1.132
|
Version 2.1.132
|
||||||
|
A fix is in place to prevent an exploit from working that is due to a yet to be patched Spigot server software bug
|
||||||
Fixed a NPE that could happen when players swapped items from their hotbar
|
Fixed a NPE that could happen when players swapped items from their hotbar
|
||||||
|
|
||||||
|
NOTE: The exploit was not described on purpose, please update.
|
||||||
|
I reported the bug to Spigot, so hopefully it will be patched in the near future.
|
||||||
|
|
||||||
Version 2.1.131
|
Version 2.1.131
|
||||||
|
|
||||||
New permission node 'mcmmo.ability.repair.netheriterepair' which is included in the mcmmo.defaults permission package
|
New permission node 'mcmmo.ability.repair.netheriterepair' which is included in the mcmmo.defaults permission package
|
||||||
|
@ -462,7 +462,13 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
/*
|
/*
|
||||||
* SKILL SETTINGS
|
* SKILL SETTINGS
|
||||||
*/
|
*/
|
||||||
public boolean getDoubleDropsEnabled(PrimarySkillType skill, Material material) { return config.getBoolean("Bonus_Drops." + StringUtils.getCapitalized(skill.toString()) + "." + StringUtils.getPrettyItemString(material).replace(" ", "_")); }
|
public boolean getDoubleDropsEnabled(PrimarySkillType skill, Material material) {
|
||||||
|
//TODO: Temporary measure to fix an exploit caused by a yet to be fixed Spigot bug (as of 7/3/2020)
|
||||||
|
if(material.toString().contains("LILY_PAD"))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return config.getBoolean("Bonus_Drops." + StringUtils.getCapitalized(skill.toString()) + "." + StringUtils.getPrettyItemString(material).replace(" ", "_"));
|
||||||
|
}
|
||||||
|
|
||||||
public boolean getDoubleDropsDisabled(PrimarySkillType skill) {
|
public boolean getDoubleDropsDisabled(PrimarySkillType skill) {
|
||||||
String skillName = StringUtils.getCapitalized(skill.toString());
|
String skillName = StringUtils.getCapitalized(skill.toString());
|
||||||
|
@ -206,16 +206,20 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|||||||
public boolean hasCombatXP(EntityType entity) {return config.contains("Experience_Values.Combat.Multiplier." + StringUtils.getPrettyEntityTypeString(entity).replace(" ", "_")); }
|
public boolean hasCombatXP(EntityType entity) {return config.contains("Experience_Values.Combat.Multiplier." + StringUtils.getPrettyEntityTypeString(entity).replace(" ", "_")); }
|
||||||
|
|
||||||
/* Materials */
|
/* Materials */
|
||||||
public int getXp(PrimarySkillType skill, Material data)
|
public int getXp(PrimarySkillType skill, Material material)
|
||||||
{
|
{
|
||||||
|
//TODO: Temporary measure to fix an exploit caused by a yet to be fixed Spigot bug (as of 7/3/2020)
|
||||||
|
if(material.toString().contains("LILY_PAD"))
|
||||||
|
return 0;
|
||||||
|
|
||||||
String baseString = "Experience_Values." + StringUtils.getCapitalized(skill.toString()) + ".";
|
String baseString = "Experience_Values." + StringUtils.getCapitalized(skill.toString()) + ".";
|
||||||
String explicitString = baseString + StringUtils.getExplicitConfigMaterialString(data);
|
String explicitString = baseString + StringUtils.getExplicitConfigMaterialString(material);
|
||||||
if (config.contains(explicitString))
|
if (config.contains(explicitString))
|
||||||
return config.getInt(explicitString);
|
return config.getInt(explicitString);
|
||||||
String friendlyString = baseString + StringUtils.getFriendlyConfigMaterialString(data);
|
String friendlyString = baseString + StringUtils.getFriendlyConfigMaterialString(material);
|
||||||
if (config.contains(friendlyString))
|
if (config.contains(friendlyString))
|
||||||
return config.getInt(friendlyString);
|
return config.getInt(friendlyString);
|
||||||
String wildcardString = baseString + StringUtils.getWildcardConfigMaterialString(data);
|
String wildcardString = baseString + StringUtils.getWildcardConfigMaterialString(material);
|
||||||
if (config.contains(wildcardString))
|
if (config.contains(wildcardString))
|
||||||
return config.getInt(wildcardString);
|
return config.getInt(wildcardString);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user