ScriptCraft

ScriptCraft

14.6k Downloads

events.tabComplete returns ClassNotFoundException

leumasme opened this issue ยท 2 comments

commented

Im trying to register an event handler for events.tabComplete, but when i try to run
/js events.tabComplete(function(e){echo("fired!")})
it returns a "java.lang.RuntimeException: java.lang.ClassNotFoundException: org.bukkit.event.server.TabCompleteEvent.class.getMethod"
Im on Spigot 1.8.8. Am i doing something wrong?
// Note: The same error also occours when using events.on() as
/js events.on(org.bukkit.event.server.TabCompleteEvent, function(e,c){console.log("Fired!")})

commented

It looks like TabCompleteEvent does not exists for spigot 1.8.8 ; I couldn't find the online javadoc for spigot 1.8.8, but looking at this link and then in the appropriate .jar file tells me it doesn't exists.

The solution I see :

  • Maybe events.playerChatTabComplete can work for you (dunno, never used any of these)
  • Update spigot until you find a spigot version with TabCompleteEvent
  • Find the specific(s) spigot's patch(s) in this version and backport them to 1.8.8 so you can use TabCompleteEvent (obviously don't do this as it's not even sure it will work, can break many things and will take you a lot of time)
commented

playerChatTabComplete is only Player Messages, no commands from what i have tested.
guess i will just have to live without it... :/