rutgerkok / Pokkit

Nukkit plugin that is able to load Bukkit plugins. Bring your Bukkit plugins to Minecraft PE!
Other
79 stars 27 forks source link

Please jobs #70

Closed ghost closed 7 years ago

ghost commented 7 years ago

please can you @MrPowerGamerBR fix ? .. this plugin is very important for survival servers :)

console: [Pokkit] [Jobs] Enabling Jobs v3.8.2 [ERROR] [Pokkit] Error occurred while enabling Jobs v3.8.2 (Is it up to date?) java.lang.NullPointerException at com.gamingmesh.jobs.Jobs.onDisable(Jobs.java:766) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:273) at com.gamingmesh.jobs.Jobs.onEnable(Jobs.java:683) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:271) at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:337) at nl.rutgerkok.pokkit.plugin.PokkitPluginLoader.enablePlugin(PokkitPluginLoader.java:69) at cn.nukkit.plugin.PluginManager.enablePlugin(PluginManager.java:446) at nl.rutgerkok.pokkit.plugin.PokkitPluginManager.enablePlugin(PokkitPluginManager.java:107) at nl.rutgerkok.pokkit.pluginservice.PluginService.enablePlugins(PluginService.java:22) at nl.rutgerkok.pokkit.pluginservice.PluginService.onEnable(PluginService.java:29) at nl.rutgerkok.pokkit.Pokkit.lambda$onEnable$1(Pokkit.java:113) at java.lang.Iterable.forEach(Unknown Source) at nl.rutgerkok.pokkit.Pokkit.onEnable(Pokkit.java:113) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at nl.rutgerkok.pokkit.startup.NukkitHook.onEnable(NukkitHook.java:26) at cn.nukkit.plugin.PluginBase.setEnabled(PluginBase.java:89) at cn.nukkit.plugin.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:119) at cn.nukkit.plugin.PluginManager.enablePlugin(PluginManager.java:446) at cn.nukkit.Server.enablePlugin(Server.java:626) at cn.nukkit.Server.enablePlugins(Server.java:615) at cn.nukkit.Server.(Server.java:462) at cn.nukkit.Nukkit.main(Nukkit.java:68)

rutgerkok commented 7 years ago

Not our fault. Jobs pokes around internal Minecraft classes. You should report this to @Zrips, the author of Jobs. Maybe he is able to replace the code that depends on Minecraft internals ("NMS") with pure Bukkit code.

For our reference, here is the offending bit of code:

https://github.com/Zrips/Jobs/blob/b98c0b87d615f3900c62658dd88205403880e8dd/com/gamingmesh/jobs/Jobs.java#L683

    try {
        Class<?> nmsClass;
        nmsClass = Class.forName("com.gamingmesh.jobs.nmsUtil." + version);
        if (NMS.class.isAssignableFrom(nmsClass)) {
        setNms((NMS) nmsClass.getConstructor().newInstance());
        } else {
        System.out.println("Something went wrong, please note down version and contact author v:" + version);
        this.setEnabled(false);
        }
    } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException
        | SecurityException e) {
        System.out.println("Your server version is not compatible with this plugins version! Plugin will be disabled: " + version);
        this.setEnabled(false);
        e.printStackTrace();
        return;
    }