Error On Class Import?

Discussion in 'Spigot Plugin Development' started by Aceix8, May 27, 2017.

Thread Status:
Not open for further replies.
  1. So i import one of my classes in my main and i get an error when i load my plugin, and the plugin just doesnt load.....if that makes sense. I found out the error is on an import......

    heres the error if u wana see

    Code (Text):
    27.05 14:58:22 [Server] INFO Aceix8 issued server command: /plugman load FactionAddon
    27.05 14:58:22 [Server] WARN org.bukkit.plugin.InvalidPluginException: java.lang.IllegalArgumentException: Plugin already initialized!
    27.05 14:58:22 [Server] WARN at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133)
    27.05 14:58:22 [Server] WARN at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:336)
    27.05 14:58:22 [Server] WARN at com.rylinaux.plugman.util.PluginUtil.load(PluginUtil.java:356)
    27.05 14:58:22 [Server] WARN at com.rylinaux.plugman.command.LoadCommand.execute(LoadCommand.java:114)
    27.05 14:58:22 [Server] WARN at com.rylinaux.plugman.PlugManCommandHandler.onCommand(PlugManCommandHandler.java:95)
    27.05 14:58:22 [Server] WARN at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
    27.05 14:58:22 [Server] WARN at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:181)
    27.05 14:58:22 [Server] WARN at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchCommand(CraftServer.java:765)
    27.05 14:58:22 [Server] WARN at net.minecraft.server.v1_7_R4.PlayerConnection.handleCommand(PlayerConnection.java:1047)
    27.05 14:58:22 [Server] WARN at net.minecraft.server.v1_7_R4.PlayerConnection.a(PlayerConnection.java:884)
    27.05 14:58:22 [Server] WARN at net.minecraft.server.v1_7_R4.PacketPlayInChat.a(PacketPlayInChat.java:28)
    27.05 14:58:22 [Server] WARN at net.minecraft.server.v1_7_R4.PacketPlayInChat.handle(PacketPlayInChat.java:65)
    27.05 14:58:22 [Server] WARN at net.minecraft.server.v1_7_R4.NetworkManager.a(NetworkManager.java:189)
    27.05 14:58:22 [Server] WARN at net.minecraft.server.v1_7_R4.ServerConnection.c(ServerConnection.java:81)
    27.05 14:58:22 [Server] WARN at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:795)
    27.05 14:58:22 [Server] WARN at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:307)
    27.05 14:58:22 [Server] WARN at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:643)
    27.05 14:58:22 [Server] WARN at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:549)
    27.05 14:58:22 [Server] WARN at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628)
    27.05 14:58:22 [Server] WARN Caused by: java.lang.IllegalArgumentException: Plugin already initialized!
    27.05 14:58:22 [Server] WARN at org.bukkit.plugin.java.PluginClassLoader.initialize(PluginClassLoader.java:122)
    27.05 14:58:22 [Server] WARN at org.bukkit.plugin.java.JavaPlugin.<init>(JavaPlugin.java:66)
    27.05 14:58:22 [Server] WARN at me.aceix8.factionaddon.FactionAddon.<init>(FactionAddon.java:5)
    27.05 14:58:22 [Server] WARN at sun.reflect.GeneratedConstructorAccessor78.newInstance(Unknown Source)
    27.05 14:58:22 [Server] WARN at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    27.05 14:58:22 [Server] WARN at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    27.05 14:58:22 [Server] WARN at java.lang.Class.newInstance(Class.java:442)
    27.05 14:58:22 [Server] WARN at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:76)
    Also it wont work when i load it with plugin and it wont work if i restart the server either

    Ive never had this issue before -_-
     
  2. ScarabCoder

    ScarabCoder Retired Resource Staff
    Retired

    It looks like it's trying to load your plugin twice. Try deleting all the jars in the plugins folder and exporting yours again.
     
  3. you are kidding me
     
  4. not it....... nice try though......
     
  5. Stop your server and remove your plugin make sure there is not your plus and after start the errver and put the plugin OR if you have the same packet path for 2 plugin it wi not works MAKE SURE they are all different
     
  6. Not sure what you mean....... but even if i did have 2 of the same pl... not one of them are on /pl
     
  7. I know... do you developpe your plugins or ???

    Envoyé de mon SM-G530W en utilisant Tapatalk
     
  8. yeah i do, im probably more advanced than u........just theres like NEVER errors on imports......why i came here...
     
  9. No... Its because you put the same name of package path for more than 1 plugin

    Envoyé de mon SM-G530W en utilisant Tapatalk
     
  10. No i dont do that...im not that dumb....i always go me.aceix8.<pluginname>.<package>
     
  11. Ok seriously i dont know...

    Envoyé de mon SM-G530W en utilisant Tapatalk
     
Thread Status:
Not open for further replies.