Why did I use contains() :thonk:

This commit is contained in:
nossr50 2020-07-03 13:16:17 -07:00
parent f05c4121d2
commit 7267b1501b
2 changed files with 2 additions and 2 deletions

View File

@ -464,7 +464,7 @@ public class Config extends AutoUpdateConfigLoader {
*/
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"))
if(material.toString().equalsIgnoreCase("LILY_PAD"))
return false;
return config.getBoolean("Bonus_Drops." + StringUtils.getCapitalized(skill.toString()) + "." + StringUtils.getPrettyItemString(material).replace(" ", "_"));

View File

@ -209,7 +209,7 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
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"))
if(material.toString().equalsIgnoreCase("LILY_PAD"))
return 0;
String baseString = "Experience_Values." + StringUtils.getCapitalized(skill.toString()) + ".";