Mark blocks always in BlockPlaceEvent

This commit is contained in:
nossr50 2020-09-21 21:20:53 -07:00
parent 3badc26806
commit d4ab829812
2 changed files with 13 additions and 10 deletions

View File

@ -1,4 +1,5 @@
Version 2.1.146
A dupe exploit has been patched
Players no longer lose levels below the level threshold in hardcore mode
Hardcore now only applies penalties to levels above threshold

View File

@ -205,16 +205,6 @@ public class BlockListener implements Listener {
*/
@EventHandler(priority = EventPriority.MONITOR)
public void onBlockPlace(BlockPlaceEvent event) {
/* WORLD BLACKLIST CHECK */
if(WorldBlacklist.isWorldBlacklisted(event.getBlock().getWorld()))
return;
Player player = event.getPlayer();
if (!UserManager.hasPlayerDataKey(player)) {
return;
}
BlockState blockState = event.getBlock().getState();
/* Check if the blocks placed should be monitored so they do not give out XP in the future */
@ -224,6 +214,18 @@ public class BlockListener implements Listener {
mcMMO.getPlaceStore().setTrue(blockState);
}
/* WORLD BLACKLIST CHECK */
if(WorldBlacklist.isWorldBlacklisted(event.getBlock().getWorld())) {
return;
}
Player player = event.getPlayer();
if (!UserManager.hasPlayerDataKey(player)) {
return;
}
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
if(mcMMOPlayer == null)