mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-04 11:03:43 +01:00 
			
		
		
		
	Why did I use contains() :thonk:
This commit is contained in:
		@@ -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()) + ".";
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user