mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Correcting a bug with the new Enderman Endermite farm exploit fix and making it toggleable for servers that wish to allow it!
This commit is contained in:
parent
4c63eee6d5
commit
d609b45e68
@ -8,13 +8,14 @@ Key:
|
|||||||
- Removal
|
- Removal
|
||||||
|
|
||||||
Version 2.1.4
|
Version 2.1.4
|
||||||
Removed XP from entities that target endermite to prevent easy exploitation (Credits to BentoBox for the tip!)
|
Removed XP from entities that target endermite to prevent easy exploitation (Credits to TheBentoBox for the tip!) [Can be turned off in experience.yml]
|
||||||
Fixed a bug where static chance skills like Arcane Salvage were using incorrect calculations for success
|
Fixed a bug where static chance skills like Arcane Salvage were using incorrect calculations for success
|
||||||
Advanced Salvage now uses a rank system
|
Advanced Salvage now uses a rank system
|
||||||
Arcane Salvage now goes by your rank to determine the maximum amount of materials salvaged and is no longer percentage based
|
Arcane Salvage now goes by your rank to determine the maximum amount of materials salvaged and is no longer percentage based
|
||||||
Fixed a bug where Iron Arm was checking for Iron Grip to be unlocked instead of itself
|
Fixed a bug where Iron Arm was checking for Iron Grip to be unlocked instead of itself
|
||||||
(Plugin Compatibility) mcMMO now ignores cancelled events relating to the player left or right clicking
|
(Plugin Compatibility) mcMMO now ignores cancelled events relating to the player left or right clicking
|
||||||
(Locale) Changed the string for "Salvage.Ability.Bonus.1" to fit the new material recovery mechanics of Salvage
|
(Locale) Changed the string for "Salvage.Ability.Bonus.1" to fit the new material recovery mechanics of Salvage
|
||||||
|
(Config) Added a toggle for the new endermite enderman xp farm fix in experience.yml "ExploitFix.EndermanEndermiteFarms"
|
||||||
(Config) Cleaned up some leftover 'unlocklevel' settings, this stuff is now handled in skillranks.yml
|
(Config) Cleaned up some leftover 'unlocklevel' settings, this stuff is now handled in skillranks.yml
|
||||||
(Config) Removed Salvage.MaxPercentage
|
(Config) Removed Salvage.MaxPercentage
|
||||||
(Config) Removed Salvage.MaxPercentageChance
|
(Config) Removed Salvage.MaxPercentageChance
|
||||||
|
@ -141,6 +141,9 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
|||||||
* FORMULA SETTINGS
|
* FORMULA SETTINGS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* EXPLOIT TOGGLES */
|
||||||
|
public boolean isEndermanEndermiteFarmingPrevented() { return config.getBoolean("ExploitFix.EndermanEndermiteFarms", true); }
|
||||||
|
|
||||||
/* Curve settings */
|
/* Curve settings */
|
||||||
public FormulaType getFormulaType() { return FormulaType.getFormulaType(config.getString("Experience_Formula.Curve")); }
|
public FormulaType getFormulaType() { return FormulaType.getFormulaType(config.getString("Experience_Formula.Curve")); }
|
||||||
public boolean getCumulativeCurveEnabled() { return config.getBoolean("Experience_Formula.Cumulative_Curve", false); }
|
public boolean getCumulativeCurveEnabled() { return config.getBoolean("Experience_Formula.Cumulative_Curve", false); }
|
||||||
|
@ -3,6 +3,7 @@ package com.gmail.nossr50.listeners;
|
|||||||
import com.gmail.nossr50.config.AdvancedConfig;
|
import com.gmail.nossr50.config.AdvancedConfig;
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.config.WorldBlacklist;
|
import com.gmail.nossr50.config.WorldBlacklist;
|
||||||
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
import com.gmail.nossr50.datatypes.meta.OldName;
|
import com.gmail.nossr50.datatypes.meta.OldName;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
@ -56,11 +57,14 @@ public class EntityListener implements Listener {
|
|||||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
public void onEntityTargetEntity(EntityTargetLivingEntityEvent event)
|
public void onEntityTargetEntity(EntityTargetLivingEntityEvent event)
|
||||||
{
|
{
|
||||||
|
if(!ExperienceConfig.getInstance().isEndermanEndermiteFarmingPrevented())
|
||||||
|
return;
|
||||||
|
|
||||||
//Prevent entities from giving XP if they target endermite
|
//Prevent entities from giving XP if they target endermite
|
||||||
if(event.getTarget() instanceof Endermite)
|
if(event.getTarget() instanceof Endermite)
|
||||||
{
|
{
|
||||||
if(event.getTarget().getMetadata(mcMMO.entityMetadataKey) == null || event.getTarget().getMetadata(mcMMO.entityMetadataKey).size() <= 0)
|
if(event.getEntity().getMetadata(mcMMO.entityMetadataKey) == null || event.getEntity().getMetadata(mcMMO.entityMetadataKey).size() <= 0)
|
||||||
event.getTarget().setMetadata(mcMMO.entityMetadataKey, mcMMO.metadataValue);
|
event.getEntity().setMetadata(mcMMO.entityMetadataKey, mcMMO.metadataValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,6 +22,8 @@
|
|||||||
# Splits the boss bar into 6 segments
|
# Splits the boss bar into 6 segments
|
||||||
#SOLID
|
#SOLID
|
||||||
# The bar is one solid piece
|
# The bar is one solid piece
|
||||||
|
ExploitFix:
|
||||||
|
EndermanEndermiteFarms: true
|
||||||
Experience_Bars:
|
Experience_Bars:
|
||||||
# Turn this to false if you wanna disable XP bars
|
# Turn this to false if you wanna disable XP bars
|
||||||
Enable: true
|
Enable: true
|
||||||
|
Loading…
Reference in New Issue
Block a user