|
@@ -205,9 +205,19 @@ public class BlockListener implements Listener {
|
|
|
*/
|
|
|
@EventHandler(priority = EventPriority.MONITOR)
|
|
|
public void onBlockPlace(BlockPlaceEvent event) {
|
|
|
+ BlockState blockState = event.getBlock().getState();
|
|
|
+
|
|
|
+ /* Check if the blocks placed should be monitored so they do not give out XP in the future */
|
|
|
+ if (BlockUtils.shouldBeWatched(blockState)) {
|
|
|
+ // Don't count de-barking wood
|
|
|
+ if (!Tag.LOGS.isTagged(event.getBlockReplacedState().getType()) || !Tag.LOGS.isTagged(event.getBlockPlaced().getType()))
|
|
|
+ mcMMO.getPlaceStore().setTrue(blockState);
|
|
|
+ }
|
|
|
+
|
|
|
/* WORLD BLACKLIST CHECK */
|
|
|
- if(WorldBlacklist.isWorldBlacklisted(event.getBlock().getWorld()))
|
|
|
+ if(WorldBlacklist.isWorldBlacklisted(event.getBlock().getWorld())) {
|
|
|
return;
|
|
|
+ }
|
|
|
|
|
|
Player player = event.getPlayer();
|
|
|
|
|
@@ -215,14 +225,6 @@ public class BlockListener implements Listener {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- BlockState blockState = event.getBlock().getState();
|
|
|
-
|
|
|
- /* Check if the blocks placed should be monitored so they do not give out XP in the future */
|
|
|
- if (BlockUtils.shouldBeWatched(blockState)) {
|
|
|
- // Don't count de-barking wood
|
|
|
- if (!Tag.LOGS.isTagged(event.getBlockReplacedState().getType()) || !Tag.LOGS.isTagged(event.getBlockPlaced().getType()))
|
|
|
- mcMMO.getPlaceStore().setTrue(blockState);
|
|
|
- }
|
|
|
|
|
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
|
|
|