Solved Can't Fix this.

Discussion in 'Plugin Development' started by Aephout14, Nov 8, 2014.

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

    Aephout14

    Alright so i have a bug, My code is posted below, I fixed the error i had earlier but when i type one of the 3 commands that give items, The same kit comes up every time not a specific one.
    And yes, I have the commands in the plugin.yml.

    Comamnds.java:http://pastebin.com/AapcztW4

    Main.java:http://pastebin.com/PMmJf7m3
     
  2. Offline

    TheCodingCat

    wny is there a onDisable and onEnable in your commands class The_FrosTy_Clan
    and also the way you have your commands is that no matter what command you type you'll get the kit. Put the parts that give you the kit INSIDE that brackets for each command.
     
  3. Offline

    Aephout14

    TheCodingCat Mind showing me how to fix it?

    Or where to put brackets atleast
     
  4. Offline

    JordyPwner

    Learn Java before using the Bukkit :)
    Your main is not even good you using a getCommand in a onCommand :confused: Never seen somebody doing that

    EDIT: This is how your main should look like:

    Show Spoiler

    Code:java
    1.  
    2. import org.bukkit.Material;
    3. import org.bukkit.command.Command;
    4. import org.bukkit.command.CommandSender;
    5. import org.bukkit.enchantments.Enchantment;
    6. import org.bukkit.entity.Player;
    7. import org.bukkit.inventory.ItemStack;
    8. import org.bukkit.inventory.meta.ItemMeta;
    9. import org.bukkit.plugin.java.JavaPlugin;
    10.  
    11. public class Main extends JavaPlugin {
    12.  
    13. public void onEnable(){
    14.  
    15. getCommand("Jouster").setExecutor(new Commands());
    16. getCommand("Tank").setExecutor(new Commands());
    17. getCommand("Swifter").setExecutor(new Commands());
    18.  
    19. }
    20.  
    21. public void onDisable(){
    22.  
    23.  
    24. }
    25.  
    26. }
     
  5. The_FrosTy_Clan That wont work, you need to either learn some more Java or just debug and test like crazy.
     
  6. Offline

    Rocoty

    JordyPwner If you're going to spoonfeed at least do it properly. Or better yet, don't spoonfeed at all, it rarely helps anyone.
     
  7. Offline

    JordyPwner

    What is wrong with my main spoonfeed huh?

    EDIT: NVm i know whats wrong i made this fast didnt looked sorry :p
     
  8. Offline

    Aephout14

    JordyPwner Rocoty bwfcwalshy Guys, Stop being assholes saying LEARN JAVA FIRST, I know java, You little 9 year olds always saying that stupid shit, I know java and I fixed it so you all can just shut up.
     
  9. Offline

    teej107

    A person who knows Java wouldn't ask where to put brackets. If you solved your problem, mark this thread as solved.
     
  10. Offline

    Rocoty

    The_FrosTy_Clan I'm confused. What did I do wrong? Rest assured, with that attitude you won't be receiving my help in the future.
     
    timbragg12, rete25iscool and AdamQpzm like this.

  11. Yeah no one will help someone with that attitude.
     
Thread Status:
Not open for further replies.

Share This Page