debugging

This commit is contained in:
jomo
2014-06-10 03:58:40 +02:00
parent 6218891146
commit cdf17c7f7f

View File

@@ -18,6 +18,13 @@ dirmap = {
# FIXME: disallow multiple regions by single person. # FIXME: disallow multiple regions by single person.
# FIXME: could lead to two regions updating each other forever -> server freezes # FIXME: could lead to two regions updating each other forever -> server freezes
@hook.event("block.BlockPlaceEvent", "monitor")
def onBlockPlaceDebug(event):
msg(event.getPlayer(), ("typ: %s" % event.getBlock().getType()))
msg(event.getPlayer(), ("before: %s" % event.getBlockReplacedState()))
msg(event.getPlayer(), ("after: %s" % event.getBlockPlaced().getState()))
msg(event.getPlayer(), ("playerName: %s" % event.getPlayer().getName()))
@hook.event("block.BlockPlaceEvent", "high") @hook.event("block.BlockPlaceEvent", "high")
def onPlaceBlockInRegion(event): def onPlaceBlockInRegion(event):
if not event.isCancelled(): if not event.isCancelled():