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

@ -3,8 +3,10 @@ Version 2.1.61
Updated the Japanese locale (thanks snake0053)
Added toggle to turn off event message broadcasts (XP rate) to config.yml - 'General.EventBroadcasts'
Added toggle to not inform players of events when they join (XP rate, etc) to config.yml 'General.EventInfoOnPlayerJoin'
Added anti-exploit protection for cobble/stone farms which can be automated, to turn this off you can toggle the new config options 'ExploitFix.LavaStoneAndCobbleFarming' in experience.yml
NOTE: The toggle for event message broadcasts is separate from the titles being shown, that's another config option (titles are the BIG TEXT in the middle of the screen)
NOTE: The new anti-stone/cobble automation will not prevent XP gains from obsidian, since Obsidian requires some effort to farm
Version 2.1.60
Fixed a NPE error if a LivingEntity's target was set to null

View File

@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.gmail.nossr50.mcMMO</groupId>
<artifactId>mcMMO</artifactId>
<version>2.1.60</version>
<version>2.1.61</version>
<name>mcMMO</name>
<url>https://github.com/mcMMO-Dev/mcMMO</url>
<scm>

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

View File

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