Error in My plugin/server

Discussion in 'Plugin Development' started by Savagegamez227, Dec 30, 2021.

  1. Offline

    Savagegamez227

    So I had an error when making a plugin and I am still learning java fully so idk whats up if u need my code tell me. This is my console error with the server:

    [22:36:47] [Server thread/ERROR]: Could not load 'plugins\FlightManagement.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: No public constructor
    at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:81) ~[spigot-api-1.18-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:145) ~[spigot-api-1.18-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:394) ~[spigot-api-1.18-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:301) ~[spigot-api-1.18-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.craftbukkit.v1_18_R1.CraftServer.loadPlugins(CraftServer.java:414) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3359-Spigot-dbf4938-4f5d59a]
    at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:231) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3359-Spigot-dbf4938-4f5d59a]
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:994) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3359-Spigot-dbf4938-4f5d59a]
    at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:304) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3359-Spigot-dbf4938-4f5d59a]
    at java.lang.Thread.run(Thread.java:833) [?:?]
    Caused by: java.lang.IllegalAccessException: class org.bukkit.plugin.java.PluginClassLoader cannot access a member of class com.savage.flightmanagement.FlightManagement with modifiers ""
    at jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:392) ~[?:?]
    at java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:674) ~[?:?]
    at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:489) ~[?:?]
    at java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128) ~[?:?]
    at jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:347) ~[?:?]
    at java.lang.Class.newInstance(Class.java:645) ~[?:?]
    at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:79) ~[spigot-api-1.18-R0.1-SNAPSHOT.jar:?]
    ... 8 more
     
    Last edited by a moderator: Dec 31, 2021
  2. Offline

    timtower Administrator Administrator Moderator

Share This Page