ScriptCraft

ScriptCraft

14.6k Downloads

events.kick is not a function

leumasme opened this issue ยท 3 comments

commented

[From the Docs:]
events.kick()
Parameters:
callback - A function which is called whenever the player.KickHook event is fired
priority - optional - see events.on() for more information.

But whenever i try to use events.kick, its not defined. all other events work fine.
1.8.8 Spigot

commented

The events modules supports both CanaryMod and Spigot. The documentation for Spigot's events is here...

https://github.com/walterhiggins/ScriptCraft/blob/development/docs/API-Reference.md#events-helper-module-spigotmc-version

And the event you should use is playerKick()
https://github.com/walterhiggins/ScriptCraft/blob/development/docs/API-Reference.md#eventsplayerkick

commented

@walterhiggins playerKick does not seem to include info about the player/commandblock/console that issued the kick

commented

True. I would suggest raising this with the SpigotMC/CraftBukkit team
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerKickEvent.html