Closed pauleveritt closed 9 years ago
This is indeed possible, see below:
from mcapi import *
from net.canarymod.hook.player import PlayerMoveHook
def hookfunc(listener, hook):
yell(str(hook.getPlayer().getName())+" is moving!")
registerhook(PlayerMoveHook, hookfunc)
I see that mcapi.registerhook has the start of what appears to be event handlers. I'd like to try and accomplish what ScriptCraft has in:
https://github.com/walterhiggins/ScriptCraft/blob/master/docs/API-Reference.md#eventsplayermove
...which uses this hook:
https://ci.visualillusionsent.net/job/CanaryLib/javadoc/net/canarymod/hook/player/PlayerMoveHook.html
...but it seems I'm a bit far off.