mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 08:36:45 +01:00
Mark blocks always in BlockPlaceEvent
This commit is contained in:
parent
3badc26806
commit
d4ab829812
@ -1,4 +1,5 @@
|
|||||||
Version 2.1.146
|
Version 2.1.146
|
||||||
|
A dupe exploit has been patched
|
||||||
Players no longer lose levels below the level threshold in hardcore mode
|
Players no longer lose levels below the level threshold in hardcore mode
|
||||||
Hardcore now only applies penalties to levels above threshold
|
Hardcore now only applies penalties to levels above threshold
|
||||||
|
|
||||||
|
@ -205,16 +205,6 @@ public class BlockListener implements Listener {
|
|||||||
*/
|
*/
|
||||||
@EventHandler(priority = EventPriority.MONITOR)
|
@EventHandler(priority = EventPriority.MONITOR)
|
||||||
public void onBlockPlace(BlockPlaceEvent event) {
|
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();
|
BlockState blockState = event.getBlock().getState();
|
||||||
|
|
||||||
/* Check if the blocks placed should be monitored so they do not give out XP in the future */
|
/* 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);
|
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);
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||||
|
|
||||||
if(mcMMOPlayer == null)
|
if(mcMMOPlayer == null)
|
||||||
|
Loading…
Reference in New Issue
Block a user