mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
Why did I use contains() :thonk:
This commit is contained in:
parent
f05c4121d2
commit
7267b1501b
@ -464,7 +464,7 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
*/
|
*/
|
||||||
public boolean getDoubleDropsEnabled(PrimarySkillType skill, Material material) {
|
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)
|
//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 false;
|
||||||
|
|
||||||
return config.getBoolean("Bonus_Drops." + StringUtils.getCapitalized(skill.toString()) + "." + StringUtils.getPrettyItemString(material).replace(" ", "_"));
|
return config.getBoolean("Bonus_Drops." + StringUtils.getCapitalized(skill.toString()) + "." + StringUtils.getPrettyItemString(material).replace(" ", "_"));
|
||||||
|
@ -209,7 +209,7 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|||||||
public int getXp(PrimarySkillType skill, Material material)
|
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)
|
//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;
|
return 0;
|
||||||
|
|
||||||
String baseString = "Experience_Values." + StringUtils.getCapitalized(skill.toString()) + ".";
|
String baseString = "Experience_Values." + StringUtils.getCapitalized(skill.toString()) + ".";
|
||||||
|
Loading…
Reference in New Issue
Block a user