2.1.61 - Some fixes + Exploit prevention

This commit is contained in:
nossr50
2019-05-16 13:30:43 -07:00
parent 734dfcdec5
commit 1c130aad42
5 changed files with 22 additions and 1 deletions

View File

@ -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);}
}

View File

@ -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.
*