Solved Plugin Outdated?

Discussion in 'Plugin Help/Development/Requests' started by FlobGaming, Dec 26, 2014.

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

    FlobGaming

    @teej107 I simply just don't understand what this guide is trying to tell me. It is too "technical" for me. Can someoen just please tell me what I have done wrong and tell me how I can fix it.
     
  2. Offline

    RingOfStorms

    As I said before, no one can tell you what you've done wrong unless you show us your code... We aren't magical mind reading hackers that can see your project.
     
  3. Offline

    teej107

    @FlobGaming You are trying to access an object's contents when it is null! Hence the NullPointerException.
     
  4. Offline

    xTigerRebornx

    @Whoever May Care Problem isn't the most obvious, though could be solved with some basic problem solving and a step or 2 of googling.

    @FlobGaming Read the Javadocs for the getCommand() method, it'll tell you exactly why the error is thrown
     
  5. Offline

    FlobGaming

    @xTigerRebornx can you please send me a link to the Javadocs, and @RingOfStorms I have posted this before but here is my code for the entire Main.java class. Tell me if you need the code from my other classes.

    Code:
    package me.flobgaming.SurvivalTeams;
    
    import org.bukkit.Server;
    import org.bukkit.command.PluginCommand;
    import org.bukkit.plugin.PluginManager;
    import org.bukkit.plugin.java.JavaPlugin;
    
    public class Main extends JavaPlugin
    {
      FileManager fm = FileManager.getInstance();
    
      public void onEnable() {
        this.getCommand("team").setExecutor(new Command(this));
        this.fm.setup(this);
        getServer().getPluginManager().registerEvents(new ChatListener(this), this);
        getServer().getPluginManager().registerEvents(new JoinListener(), this);
        getServer().getPluginManager().registerEvents(new FriendlyFireListener(), this);
      }
    }
     
  6. Offline

    teej107

  7. Offline

    FlobGaming

    @teej107 I have read the Javadoc and managed to fix the "getCommand()" problem by re-editing the plugin.yml command section. Now I get a new error that looks like this when I try to execute the/teams command:

    Code:
    org.bukkit.command.CommandException: Unhandled exception executing command 'team' in plugin SurvivalTeams v1.0.3
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[craftbukkit.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:181) ~[craftbukkit.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchCommand(CraftServer.java:767) ~[craftbukkit.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.PlayerConnection.handleCommand(PlayerConnection.java:1043) [craftbukkit.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.PlayerConnection.a(PlayerConnection.java:880) [craftbukkit.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.PacketPlayInChat.a(PacketPlayInChat.java:28) [craftbukkit.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.PacketPlayInChat.handle(PacketPlayInChat.java:65) [craftbukkit.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.NetworkManager.a(NetworkManager.java:186) [craftbukkit.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.ServerConnection.c(ServerConnection.java:81) [craftbukkit.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:734) [craftbukkit.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:289) [craftbukkit.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:584) [craftbukkit.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:490) [craftbukkit.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [craftbukkit.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    Caused by: java.lang.Error: Unresolved compilation problems:
    Help please?
     
  8. Moved to Bukkit Alternates.
     
  9. Offline

    FlobGaming

  10. Offline

    RingOfStorms

    Woops missed your last post sorry about that. Post your plugin.yml please
     
  11. Offline

    FlobGaming

    Ok @RingOfStorms here it is:

    Code:
    name: SurvivalTeams
    author: FlobGaming
    version: 1.0.3
    description: Private teams plugin.
    main: me.flobgaming.SurvivalTeams.Main
    commands:
      team:
        usage: /team
        description: Basic teams cmd.
    Anyone ?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 10, 2016
  12. Offline

    FlobGaming

    Guys I have decided to recode my entire plugin due to the lack of activity. Thanks for helping while you did! Can an admin please close this thread?
     
Thread Status:
Not open for further replies.

Share This Page