What does it mean when your plugin is out of date?

Discussion in 'Plugin Development' started by wizard7611, Dec 7, 2013.

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

    wizard7611

    title says it
     
  2. Offline

    Wolfey

    ...Pretty self explanatory, it means your plugin is out-dated (Old version and probably doesn't work with the current craftbukkit version) and needs to be updated.
     
  3. Offline

    Gater12

    wizard7611 Your plugin may be using methods that were in an older build and no longer is in the new build, or simply something has gone wrong in the Matrix.
     
  4. Offline

    wizard7611

    so what should I do?

    Yes I have a lot to still code but try to find my errors
    code:
    Code:
    package me.wizard7611.TeamBattle;
     
    import java.util.logging.Logger;
    import org.bukkit.ChatColor;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.event.Listener;
    import org.bukkit.plugin.java.JavaPlugin;
     
    public class TeamBattle extends JavaPlugin implements Listener{
    public final Logger logger = Logger .getLogger("Minecraft");
    public static TeamBattle plugin;
     
    @Override
    public void onDisable(){
        this.logger.info("[TeamBattle] Plugin Disabled!");
        this.logger.severe("[TeamBattle] SEVERE! TeamBattle didn't start up correctly!");
        this.logger.warning("[TeamBattle] Attempting to start TeamBattle!");
        }
     
    @Override
    public void onEnable(){
        getCommand("weapons").setExecutor(this);
        getCommand("leave").setExecutor(this);
        getCommand("join").setExecutor(this);
        getCommand("class").setExecutor(this);
        getCommand("tb").setExecutor(this);
        this.logger.info("[TeamBattle] Plugin Enabled!");
        this.logger.warning("[TeamBattle] Attempting to start TeamBattle!");
       
    }
     
    public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args)
    {
        if(cmd.getName().equalsIgnoreCase("tb")) {
          if (args.length == 0) {
            if(sender.hasPermission("tb")){
                sender.sendMessage(ChatColor.GOLD+ "Commands:");
                sender.sendMessage(ChatColor.GOLD+ " Class"+ ChatColor.DARK_RED+ " -"+ ChatColor.AQUA+ " Displays Classes");
                sender.sendMessage(ChatColor.GOLD+ " Join"+ ChatColor.DARK_RED+ " -"+ ChatColor.AQUA+ " Can join an arena");
                sender.sendMessage(ChatColor.GOLD+ " Leave"+ ChatColor.DARK_RED+ " -"+ ChatColor.AQUA+ "Can leave current arena");
                sender.sendMessage(ChatColor.GOLD+ " Weapons"+ ChatColor.DARK_RED+ " -"+ ChatColor.AQUA+ " Displays weapons");
            if (args.length == 1){
                sender.sendMessage(ChatColor.GOLD+ " Setzombiespawn (Arena name)"+ ChatColor.DARK_RED+ " -"+ ChatColor.AQUA+ " Creates a zombie spawn");
                //CODING HERE
                sender.sendMessage(ChatColor.GOLD+ " Deletezombiespawn (Arena name)"+ ChatColor.DARK_RED+ " -"+ ChatColor.AQUA+ " Deletes a zombie spawn");
                //CODING HERE
                sender.sendMessage(ChatColor.GOLD+ " Setarenalobby (Lobby name)"+ ChatColor.DARK_RED+ " -"+ ChatColor.AQUA+ " Sets the lobby for all arenas");
                //CODING HERE
                sender.sendMessage(ChatColor.GOLD+ " Deletearenalobby (Lobby name)"+ ChatColor.DARK_RED+ " -"+ ChatColor.AQUA+ " Deletes the lobby for all arenas");
                //CODING HERE
               
               
            }
            } else {
                sender.sendMessage(ChatColor.RED + "You do not have permission for this plugin!");
              }
            } else if (args.length == 1)
            {
                if(args[1].equalsIgnoreCase("class")) {
                    if(sender.hasPermission("tb.class")) {
                        //CODING HERE
                    } else {
                        sender.sendMessage(ChatColor.RED+ "You do not have permission for this command!");
                    }
                }
                else if(args[1].equalsIgnoreCase("join")) {
                    if(sender.hasPermission("tb.join")) {
                        //CODING HERE
                    } else {
                        sender.sendMessage(ChatColor.RED+ "You do not have permission for this command!");
                    }
                }
                else if(args[1].equalsIgnoreCase("leave")) {
                    if(sender.hasPermission("tb.leave")) {
                        //CODING HERE
                    } else {
                        sender.sendMessage(ChatColor.RED+ "You do not have permission for this command!");
                    }
                }
                else if(args[1].equalsIgnoreCase("weapons")) {
                    if(sender.hasPermission("tb.weapons")) {
                        //CODING HERE
                    } else {
                        sender.sendMessage(ChatColor.RED+ "You do not have permission for this command!");
                    }
                } else if (args.length >= 2) {
                  sender.sendMessage("TOO MANY ARGUMENTS.");
                    }
               
                }
            }
        return false;
    }
    }
     
  5. Offline

    Gater12

    wizard7611 Post a stack trace. It'll help a lot.
     
  6. Offline

    wizard7611

    stack trace?
     
  7. Offline

    Gater12

  8. Offline

    wizard7611

    hold on

    EDIT:

    Code:java
    1. C:\Users\Owner\Desktop\minecraft local server>java -Xmx1024M -jar craftbukkit.ja
    2. r -o true
    3. 22:25:47 [INFO] Starting minecraft server version 1.6.4
    4. 22:25:47 [INFO] Loading properties
    5. 22:25:47 [INFO] Default game type: CREATIVE
    6. 22:25:47 [INFO] Generating keypair
    7. 22:25:47 [INFO] Starting Minecraft server on *:25565
    8. 22:25:47 [INFO] This server is running CraftBukkit version git-Bukkit-1.6.4-R2.0
    9. -b2918jnks (MC: 1.6.4) (Implementing API version 1.6.4-R2.0)
    10. 22:25:47 [INFO] [TeamBattle] Loading TeamBattle v1.0
    11. 22:25:47 [INFO] Preparing level "world"
    12. 22:25:48 [INFO] Preparing start region for level 0 (Seed: 5209987597340593455)
    13. 22:25:49 [INFO] Preparing spawn area: 9%
    14. 22:25:50 [INFO] Preparing spawn area: 21%
    15. 22:25:51 [INFO] Preparing spawn area: 49%
    16. 22:25:52 [INFO] Preparing spawn area: 60%
    17. 22:25:53 [INFO] Preparing spawn area: 74%
    18. 22:25:54 [INFO] Preparing spawn area: 87%
    19. 22:25:55 [INFO] Preparing start region for level 1 (Seed: 5209987597340593455)
    20. 22:25:56 [INFO] Preparing spawn area: 74%
    21. 22:25:56 [INFO] Preparing start region for level 2 (Seed: 5209987597340593455)
    22. 22:25:57 [INFO] Preparing spawn area: 96%
    23. 22:25:57 [INFO] [TeamBattle] Enabling TeamBattle v1.0
    24. 22:25:57 [SEVERE] Error occurred while enabling TeamBattle v1.0 (Is it up to dat
    25. e?)
    26. at me.wizard7611.TeamBattle.TeamBattle.onEnable(TeamBattle.java:23)
    27. at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217)
    28. at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
    29. .java:457)
    30. at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    31. r.java:381)
    32. at org.bukkit.craftbukkit.v1_6_R3.CraftServer.loadPlugin(CraftServer.jav
    33. a:284)
    34. at org.bukkit.craftbukkit.v1_6_R3.CraftServer.enablePlugins(CraftServer.
    35. java:266)
    36. at net.minecraft.server.v1_6_R3.MinecraftServer.l(MinecraftServer.java:3
    37. 15)
    38. at net.minecraft.server.v1_6_R3.MinecraftServer.f(MinecraftServer.java:2
    39. 92)
    40. at net.minecraft.server.v1_6_R3.MinecraftServer.a(MinecraftServer.java:2
    41. 52)
    42. at net.minecraft.server.v1_6_R3.DedicatedServer.init(DedicatedServer.jav
    43. a:152)
    44. at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java
    45. :393)
    46. at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:5
    47. 83)
    48. 22:25:57 [INFO] Server permissions file permissions.yml is empty, ignoring it
    49. 22:25:57 [INFO] Done (9.903s)! For help, type "help" or "?"


    Gater12 hello?

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

    Developing

    wizard7611 Something is wrong in your plugin.yml in your onEnable. Just cant figure out why.
     
  10. Offline

    Wolfey

    Whats on line 23 in your onEnable() ?
     
  11. Offline

    ZeusAllMighty11

    Your loggers are out of date and your 'plugin' variable is never used nor initialized (and then, not nullified).
     
  12. Offline

    RawCode

    its static error message for any plugin that fail to load...
     
  13. Offline

    The_Doctor_123

    Looks like you never declared the command "weapons" in your plugin.yml.
     
  14. Offline

    wizard7611

    The_Doctor_123 yes I have

    so any fix?

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

    The_Doctor_123

    wizard7611
    This is line 23:
    Code:java
    1. getCommand("weapons").setExecutor(this);

    There's no explanation other than you never declared the command. Show us your plugin.yml.
     
  16. Offline

    wizard7611

    Code:java
    1. name: TeamBattle
    2. main: me.wizard7611.TeamBattle.TeamBattle
    3. version: 1.0
    4. description: Fight teams and capture flags with TeamBattle!
    5. commands:
    6. tb:
    7. description: Lists all TeamBattle commands!
    8. tb join:
    9. description: Joins an arena!
    10. tb leave:
    11. description: Leaves an arena!
    12. tb class:
    13. description: Tells you what your current class is!
    14. tb weapons:
    15. description: Lists your current weapons unlocked in your class!
    16. tb perks:
    17. description: Lists the current perks you have!
    18. tb Setzombiespawn (Arena name):
    19. description: Creates a zombie spawn!
    20. tb Deletezombiespawn (Arena name):
    21. description: Deletes a zombie spawn!
    22. tb Setarenalobby (Lobby name):
    23. description: Sets the lobby for all arenas!
    24. tb Deletearenalobby (Lobby name):
    25. description: Deletes the lobby for all arenas!

    the weapons part is right
     
  17. Offline

    The_Doctor_123

    wizard7611
    Far from right..

    You only need to register one command because there's only one command, which is "tb". Arguments to the command are dealt with inside the onCommand() method.
     
  18. Offline

    wizard7611

    The_Doctor_123 so that's it? XD I remember when you posted something on planetminecraft wondering how to learn Java for plugins
     
  19. Offline

    The_Doctor_123

    wizard7611
    Uhum.. I don't even have a Planet Minecraft account.
     
  20. Offline

    wizard7611

    The_Doctor_123 You sure? Because about a day ago I saw the exact same account wanting to know how to learn Java for plugins
     
  21. Offline

    The_Doctor_123

  22. Offline

    wizard7611

    Hmm, I forgot what I searched, but back to my plugin. So I deleted all the commands and stuff inside the plugins.yml but the tb command and the main things you always need. I'm still getting the error. Still no fix. x.X
     
  23. Offline

    XD 3VIL M0NKEY

    The_Doctor_123
    /me thinks there might be another Doctor...
    HOW COULD THIS HAPPEN!
    [​IMG]
     
  24. Offline

    wizard7611

    heh tf2
     
  25. Offline

    The_Doctor_123

    wizard7611
    Remove all these lines..
    Code:java
    1. getCommand("weapons").setExecutor(this);
    2. getCommand("leave").setExecutor(this);
    3. getCommand("join").setExecutor(this);
    4. getCommand("class").setExecutor(this);
    5. getCommand("tb").setExecutor(this);

    XD 3VIL M0NKEY
    Certainly wouldn't be happy if someone stole my epic name. J:
     
    XD 3VIL M0NKEY likes this.
  26. Offline

    wizard7611

    wait why?
     
  27. Offline

    The_Doctor_123

    wizard7611
    1. The first 4 lines would throw NullPointerExceptions. They are non-existing commands.
    2. Commands are executed in the main class by default.
     
  28. Offline

    wizard7611

  29. Offline

    PolarCraft

    :confused: Still using my code I did -_-.
    And as The_Doctor_123 said those commands are non existent. Since your commands are in the same class there is no need to import them. If you were going to import the command their would need to be a Main.class. And the commands would be separate.
     
  30. Offline

    wizard7611

    wait, the commands like setzombiespawn aren't on the commands list
    I KNOW NVM
     
Thread Status:
Not open for further replies.

Share This Page