alecgorge / jsonapi

A JSON API for Minecraft: http://forums.bukkit.org/threads/admn-info-jsonapi-v1-3-1-json-http-and-socket-api-for-controlling-a-server-740.14270/
http://mcjsonapi.com
MIT License
231 stars 88 forks source link

"chat.with_name" not works with offline users #441

Open blackarcanis opened 9 years ago

blackarcanis commented 9 years ago

Hi, first thanks a lot for this tool ! Have the same issue here, this is the error returned :

Array ( [message] => Caught exception: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.alecgorge.minecraft.jsonapi.dynamic.Call.call(Call.java:170) at com.alecgorge.minecraft.jsonapi.dynamic.Caller$1.call(Caller.java:94) at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftFuture.run(CraftFuture.java:89) at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:726) at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:367) at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:657) at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:560) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NoClassDefFoundError: org/bukkit/craftbukkit/v1_8_R1/util/Waitable at com.alecgorge.minecraft.jsonapi.dynamic.APIWrapperMethods.getRealisticChatProvider(APIWrapperMethods.java:469) at com.alecgorge.minecraft.jsonapi.dynamic.APIWrapperMethods.chatWithName(APIWrapperMethods.java:501) ... 13 more Caused by: java.lang.ClassNotFoundException: org.bukkit.craftbukkit.v1_8_R1.util.Waitable at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:91) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:86) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ... 15 more [code] => 5 ) [source] => chat.with_name )

And we use your last version here => https://ci.alecgorge.com/job/JSONAPI/125/

Is it corrected or not sure ? Thanks a lot for your help !

krisdb2009 commented 9 years ago

Every import using org.bukkit.craftbukkit.v1_8_R1 in this build needs to be updated to net.minecraft.server.v1_8_R3. I have compiled a version that applies these fixes. It has compilation errors, but it works non the less on my server. ftp://belowaverage.ga/mcDash/dependencies/JSONAP-KRISBD2009-BLEEDING-mc1.8.6-R1.3.jar or http://belowaverage.ga/FTP/?ftp=/mcDash/dependencies/JSONAP-KRISBD2009-BLEEDING-mc1.8.6-R1.3.jar

orb1tzero commented 9 years ago

could you reupload that for me?