mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-25 02:04:44 +02:00
2.1.61 - Some fixes + Exploit prevention
This commit is contained in:
@ -332,4 +332,6 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
{
|
||||
return config.getInt("Experience_Values.Taming.Animal_Taming." + StringUtils.getPrettyEntityTypeString(type));
|
||||
}
|
||||
|
||||
public boolean preventStoneLavaFarming() { return config.getBoolean("ExploitFix.LavaStoneAndCobbleFarming", true);}
|
||||
}
|
||||
|
@ -180,6 +180,22 @@ public class BlockListener implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void onBlockFormEvent(BlockFormEvent event)
|
||||
{
|
||||
/* WORLD BLACKLIST CHECK */
|
||||
if(WorldBlacklist.isWorldBlacklisted(event.getBlock().getWorld()))
|
||||
return;
|
||||
|
||||
if(ExperienceConfig.getInstance().preventStoneLavaFarming())
|
||||
{
|
||||
if(event.getNewState().getType() != Material.OBSIDIAN && BlockUtils.shouldBeWatched(event.getNewState()))
|
||||
{
|
||||
mcMMO.getPlaceStore().setTrue(event.getNewState());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Monitor BlockPlace events.
|
||||
*
|
||||
|
@ -31,6 +31,7 @@ ExploitFix:
|
||||
Fishing: true
|
||||
EndermanEndermiteFarms: true
|
||||
Acrobatics: true
|
||||
LavaStoneAndCobbleFarming: true
|
||||
Experience_Bars:
|
||||
# Turn this to false if you wanna disable XP bars
|
||||
Enable: true
|
||||
|
Reference in New Issue
Block a user