Solved Why wont my plugin work?

Discussion in 'Plugin Development' started by DiamondSworder, Dec 26, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    DiamondSworder

  2. Offline

    Zombie_Striker

    @DiamondSworder
    Did you debug? That would tell you why it doesn't work.
     
  3. Offline

    DiamondSworder

  4. Offline

    Zombie_Striker

    @DiamondSworder
    That's not debugging. Go through your code, add (System.out)-s at random spots, and see if they get triggered. If not, find out why they are not being triggered and move to the next spot.
     
  5. Offline

    Xerox262

    Nothing? Not even the getLogger().info("has been enabled successfully");
     
  6. Offline

    DiamondSworder

    @Zombie_Striker its telling me
    [00:00:08 ERROR]: Could not load 'plugins\KitPvP.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
     
  7. Offline

    Xerox262

    Post your plugin.yml then
     
  8. Offline

    DiamondSworder

    @Xerox262
    Code:
    name: KitPvP
    main: me.kitpvp.main.Main
    version: 1.0
    commands:
         PvP:
         description: default pvp kit
         usage: PvP
      archer:
        description: default archer kit
        usage: archer
     
  9. Offline

    Xerox262

    Don't you think that Pvp command has too many spaces? When creating your plugin.yml it's much easier to just use single spaces. Like so.
    Code:
    name: KitPvP
    main: me.kitpvp.main.Main
    version: 1.0
    commands:
    PvP:
      description: default pvp kit
      usage: PvP
    archer:
      description: default archer kit
      usage: archer
    Easy to distinguish what is a child of what and hard to make a mistake when doing.
     
  10. Offline

    DiamondSworder

    im extremely high lol sorry man @Xerox262
     
  11. Offline

    Xerox262

    Set the thread to solved xD
     
  12. Offline

    DiamondSworder

    @Xerox262
    Code:
    Desktop\Server>java -Xmx1024M -jar craftbukkit.jar -o true
    Loading libraries, please wait...
    [00:08:40 INFO]: Starting minecraft server version 1.7.10
    [00:08:40 INFO]: Loading properties
    [00:08:40 INFO]: Default game type: SURVIVAL
    [00:08:40 INFO]: Generating keypair
    [00:08:40 INFO]: Starting Minecraft server on *:25565
    [00:08:41 INFO]: This server is running CraftBukkit version git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks (MC: 1.7.10) (Implementing API version 1.7.10-R0.1-SNAPSHOT)
    [00:08:41 ERROR]: Could not load 'plugins\KitPvP.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
            at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:160) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:133) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugins(CraftServer.java:364) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.bukkit.craftbukkit.v1_7_R4.CraftServer.<init>(CraftServer.java:326) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.PlayerList.<init>(PlayerList.java:68) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.DedicatedPlayerList.<init>(SourceFile:14) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.DedicatedServer.init(DedicatedServer.java:133) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:436) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
    Caused by: org.yaml.snakeyaml.scanner.ScannerException: null; mapping values are not allowed here
            at org.yaml.snakeyaml.scanner.ScannerImpl.fetchValue(ScannerImpl.java:733) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:305) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:179) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:563) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:161) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:146) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:230) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:237) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:237) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:123) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:106) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:121) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:480) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.Yaml.load(Yaml.java:411) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.bukkit.plugin.PluginDescriptionFile.<init>(PluginDescriptionFile.java:232) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:155) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            ... 8 more
    [00:08:41 INFO]: Preparing level "world"
    [00:08:41 INFO]: Preparing start region for level 0 (Seed: 6598980718454033156)
    [00:08:41 WARN]: Exception in thread "Thread-7"
    [00:08:41 WARN]: org.bukkit.craftbukkit.libs.com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 7
    [00:08:41 WARN]:        at org.bukkit.craftbukkit.libs.com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:180)
    [00:08:41 WARN]:        at org.bukkit.craftbukkit.libs.com.google.gson.Gson.fromJson(Gson.java:755)
    [00:08:41 WARN]:        at org.bukkit.craftbukkit.libs.com.google.gson.Gson.fromJson(Gson.java:694)
    [00:08:41 WARN]:        at org.bukkit.craftbukkit.v1_7_R4.updater.BukkitDLUpdaterService.fetchArtifact(BukkitDLUpdaterService.java:53)
    [00:08:41 WARN]:        at org.bukkit.craftbukkit.v1_7_R4.updater.BukkitDLUpdaterService.getArtifact(BukkitDLUpdaterService.java:30)
    [00:08:41 WARN]:        at org.bukkit.craftbukkit.v1_7_R4.updater.AutoUpdater$1.run(AutoUpdater.java:77)
    [00:08:41 WARN]: Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 7
    [00:08:41 WARN]:        at org.bukkit.craftbukkit.libs.com.google.gson.stream.JsonReader.expect(JsonReader.java:339)
    [00:08:41 WARN]:        at org.bukkit.craftbukkit.libs.com.google.gson.stream.JsonReader.beginObject(JsonReader.java:322)
    [00:08:41 WARN]:        at org.bukkit.craftbukkit.libs.com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:168)
    [00:08:41 WARN]:        ... 5 more
    [00:08:42 INFO]: Preparing spawn area: 91%
    [00:08:42 INFO]: Preparing start region for level 1 (Seed: 6598980718454033156)
    [00:08:43 INFO]: Preparing start region for level 2 (Seed: 6598980718454033156)
    [00:08:43 INFO]: Server permissions file permissions.yml is empty, ignoring it
    [00:08:43 INFO]: Done (2.230s)! For help, type "help" or "?"
    >reload
    [00:08:59 ERROR]: Could not load 'plugins\KitPvP.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
            at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:160) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:133) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugins(CraftServer.java:364) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.bukkit.craftbukkit.v1_7_R4.CraftServer.reload(CraftServer.java:837) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.bukkit.Bukkit.reload(Bukkit.java:303) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:23) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:180) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchCommand(CraftServer.java:740) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchServerCommand(CraftServer.java:726) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.DedicatedServer.aB(DedicatedServer.java:294) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:259) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:558) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:469) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
    Caused by: org.yaml.snakeyaml.scanner.ScannerException: null; mapping values are not allowed here
            at org.yaml.snakeyaml.scanner.ScannerImpl.fetchValue(ScannerImpl.java:733) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:305) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:179) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:563) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:161) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:146) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:230) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:237) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:237) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:123) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:106) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:121) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:480) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.yaml.snakeyaml.Yaml.load(Yaml.java:411) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.bukkit.plugin.PluginDescriptionFile.<init>(PluginDescriptionFile.java:232) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:155) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            ... 13 more
    [00:08:59 INFO]: Server permissions file permissions.yml is empty, ignoring it
    [00:08:59 INFO]: CONSOLE: Reload complete.
    >
     
  13. Offline

    Xerox262

    Check your spacing again, There may or may not be an extra space before the PvP command's usage. Or post your new plugin.yml
     
  14. Offline

    MooshViolet

    You need to post your plugin.yml again. It says you still have an error.
     
  15. Offline

    DiamondSworder

    @MooshViolet
    Code:
    name: KitPvP
    main: me.kitpvp.main.Main
    version: 1.0
    commands:
    PvP:
      description: default pvp kit
       usage: PvP
    archer:
      description: default archer kit
      usage: archer
     
  16. Offline

    Xerox262

    Yea, 3 spaces before PvP's usage.

    P.S. Should be 2.
     
  17. Offline

    MooshViolet

    On line #7, it has one too many space.
    Spacing is crucial in plugin.yml files.
     
  18. Offline

    DiamondSworder

    @MooshViolet
    [00:16:14 ERROR]: Could not load 'plugins\KitPvP.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: Cannot find main class `me.kitpvp.main'
    Now its saying that but i have it linked up in the plugin.yml config...?

    Its working now, got to figure why my kits wont load.. @MooshViolet

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
  19. Offline

    MooshViolet

    Mark as solved please
     
Thread Status:
Not open for further replies.

Share This Page