Something's Gone Horribly Wrong! D:

Discussion in 'Plugin Development' started by FlareLine, Nov 25, 2011.

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

    FlareLine

    >.< BWAHAHAHAHA! ONE SINGLE CHECK BOX!
    Thanks soo much all of you!
    I'll make sure it exports with .classpath and I'll upload the first version here.
    It only contains one command so far. :p

    Thanks! FlareLine! <3

    EDIT: Lolwut GuntherDW?? :mad:

    Okay... I have updated my server software to #150... Whatever it is and the Bukkit JAR for importing to externally...
    I also included .classpath into the exported JAR file.
    I now have a diffferent error:
    LOL WTF?!

    FlareLine.

    :(

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 21, 2016
  2. Offline

    bleachisback

    It's apparently complaining about the lack of the onEnable() method, but you have it in your earlier screenshot =S
     
  3. Offline

    Jogy34

    I think that there may be something wrong with your config. Try getting rid of it (comment it) to see if that's the problem.
    Never mind about that put '@Override' above your onEnable/onDisable methods.
     
  4. Offline

    GuntherDW

    It's complaining about not finding a constructor, funnily enough that shouldn't be happening.
    Try another bukkit version and try to make sure that you are linking to the same bukkit version you are testing it on.

    @Jogy34 not to be disrespectful but @Override doesn't have anything to do with this :p.

    @FlareLine could you just post the "jar" so we can take a better look at what's going on?
     
  5. Offline

    FlareLine

    Deleting the config methods do not work. :O

    I have the latest bukkit version, and tried it on both 1.8.1 craftbukkit and 1.0 craftbukkit. Still no fix. :O

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 21, 2016
  6. Offline

    Jogy34

    did you put the '@Override' above the onEnable/onDisable methods?
     
  7. Offline

    GuntherDW

  8. Offline

    FlareLine

    Bwahaha That'd be smart.

    Version can be found here.

    And no, No @Override method. D:
     
  9. Offline

    GuntherDW

    The fact is that we have to randomly take wild guesses to why it wants a constructor. If i have to go by the code from the screenshots i can see some very weird usage, but nothing to make Bukkit go look for a constructor.

    Tip: onCommand() goes in the main class, or you'll have to specify your playerlistener as a handler for that command, which you didn't.

    IMO i'd suggest you start from square one in the "how to make a plugin" tutorial.
     
  10. Offline

    bleachisback

    I found your problem. Your header needs to be "public class AdvanZimboe extends JavaPlugin" or else bukkit can't access it
     
  11. Offline

    FlareLine

    I Have, But It Doesn't Show You How To Make A Plugin That Just Disables And Enables. :'(
     
  12. Offline

    Jogy34

    Just as an FYI in the plugin.yml the version is the version of your plugin not the version of bukkit.

    Also here's a video that shows you how to make an extremely simple plugin:
    http://www.youtube.com/watch?v=Rkyd45L4eAY
     
  13. Offline

    FlareLine

    ZOMFG GOT IT TO WORK! ALL ALONG I NEEDED:
    >.< Thanks Alot For The Help Guys.
    Special Thanks To beachisblack. <3 ;)

    FlareLine

    How do I make the plugin say something to the command executer? and how do i put colors into it?

    FlareLine.

    EDIT: Nvm I'll look on another thread.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 21, 2016
  14. Offline

    bleachisback

    sender.sendMessage(ChatColor.COLOR+"Text that is that color"+ChatColor.ANOTHERCOLOR+"The text that is another color");
     
  15. Offline

    FlareLine

    Oh Thanks. And How To Put New Lines?

    EDIT: It Says It's An Unreachable Code When I Put It After 'return true;' and before 'return false;'
    Is there anything else i need to add?
     
  16. Offline

    shadrxninga

    Use the newline character "/n".
     
  17. Offline

    FlareLine

    Nvm I fixed the error.
    FlareLine

    When I Put the command send thingo into the main class, it says class not found, and when i put it into the listener class, it says class not found... Got any ideas? :confused:
    FlareLine

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 21, 2016
  18. Offline

    Jogy34

    That's a common mistake. It's actually "\n".

    @FlareLine post your main class in a code box
    EDIT:
    You might just be putting it in the wrong place or typing it wrong.
     
  19. Offline

    FlareLine

    I Thought It Was \n
    :) I'll See if it works and post the first release on the plugin page here.
     
  20. Offline

    bleachisback

    well you have to make sure your variable "sender" is an instance of CommandSender
     
  21. Offline

    FlareLine

    BLER! Errors Everywhere! ClassNotFound Again. D:
    Here Do I Need some sort of exception handler or something???

    FlareLine. :(

    BTW: @Jogy34 I'll add you to the list of people who have really helped.. :)

    And How Do I Do This?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 21, 2016
  22. Offline

    Jogy34

    this will make it easier for the people who want to help you.

    post your code in one of these [ CODE ] ***Code goes here*** [ /CODE ](without the spaces between the []'s and CODE

    EDIT:
    Also when I de-complied the latest .jar I couldn't get the classes
     
  23. Offline

    FlareLine

    Nvm I Fixed It... I Think I'm Getting Better :D
    FlareLine

    Anyway, The Listener Class:
    Code:
    package me.FlareLine.AdvanZimboe;
    
    import org.bukkit.event.player.PlayerListener;
    
    public class AdvanZimboePlayerListener extends PlayerListener{
    
        public AdvanZimboe plugin;
    
        public AdvanZimboePlayerListener(AdvanZimboe instance){
            plugin = instance;
        }
    
    }
    And main class:
    Code:
    package me.FlareLine.AdvanZimboe;
    
    import java.util.logging.Logger;
    
    import org.bukkit.ChatColor;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.event.Event;
    import org.bukkit.plugin.PluginManager;
    import org.bukkit.plugin.java.JavaPlugin;
     
    public class AdvanZimboe extends JavaPlugin{
    
        private final AdvanZimboePlayerListener playerListener = new AdvanZimboePlayerListener(this);
    
        Logger log = Logger.getLogger("Minecraft");
    
        public void onEnable(){
    
            log.info("AdvanZimboe [FlareLine and Shirou7000]");
            log.info("Enabled Sucessfully!");
    
            PluginManager pm = this.getServer().getPluginManager();
            pm.registerEvent(Event.Type.PLAYER_MOVE, playerListener, Event.Priority.Normal, this);
    
        }
    
        public void onDisable(){
    
            log.info("AdvanZimboe [FlareLine and Shirou7000]");
            log.info("Disabled Sucessfully!");
    
        }
    public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args){
        if(cmd.getName().equalsIgnoreCase("advanzimboe")){
            sender.sendMessage(ChatColor.YELLOW+"\n==="+ChatColor.GREEN+"AdvanZimboe"+ChatColor.YELLOW+"===");
            sender.sendMessage(ChatColor.AQUA+"\nBy FlareLine and Shirou7000");
            sender.sendMessage(ChatColor.RED+"\n==Help==");
            sender.sendMessage(ChatColor.GOLD+"\n/AdvanZimboe"+ChatColor.LIGHT_PURPLE+" - Show This Message.");
    
            return true;
     
        }
        else{
        return false;
        }
        }
    }
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 21, 2016
  24. Offline

    Jogy34

    just out of curiosity what is this plugin going to do?
     
  25. Offline

    shadrxninga

    I'm sure I put a \ not / there... :p

    Sorry about that.
     
  26. Offline

    FlareLine

    Guys for info, read the Bukkit Dev Page, here.
    Send me a PM if you want to help me out!
     
  27. Offline

    Jogy34

    Since this looks as if this is the first plugin that you are making. in my opinion you should start a little smaller than an all out RPG plugin. You should probably start with simple things that you don't release to get the hang of things like an anti-Grief plugin or another simple plugin.
     
  28. Offline

    FlareLine

    Meh, In my opinion it's better to do then learn programming than to learn than do programming.

    Bwahaha, That's confusing. ;)

    But when I try to make a simple plugin, it's hard to describe it enough for it to be approved, and well enough to tell the Mods what it acctually does... :confused:
    Since you have a good understanding of Plugin Dev, Would you please be able to help me with my first plugin? :)

    FlareLine.

    Ps: You have to cause I said please! ;)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 21, 2016
  29. Offline

    Jogy34

    1.If you make a simple plugin to learn concepts then you shouldn't necessarily try to submit it because odds are that there are already a thousand of them.
    2.I can help you out but I would have a few priorities over it. I also won't do the major coding for it because I would want you to learn. So if you need any help with it just tag me.
     
  30. Offline

    bleachisback

    Haha, yeah. My first plugin was one which you could reload and regenerate chunks with, either by doing it in a circular area around you, a selectable area, or just the one you're standing in.

    Then I realised that worldedit had that function already XD
     
Thread Status:
Not open for further replies.

Share This Page