Kit-PvP Plugin Help

Discussion in 'Plugin Development' started by CactusComboPvP, Dec 1, 2013.

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

    CactusComboPvP

    Hello I need help to know how to code a kit-pvp plugin.
    I can already make the kit classes.
    So I have eu.CactusCombo.Main.class as my main class, then I have eu.CactusCombo.Kits.pvp.class etc... I can do the kits and all. But what i need help is with the main class, what do i put in there so all the kits work? And what do i do if my kit has special events like it has fly for 5 seconds or gets a jump boost when right clicking a block, how do i get that all working? If anyone could make a simple kit pvp plugin with 3 kits, like: pvp, archer and a kit which uses an event it will be helpful. I want it in different classes so, pvp.class, archer.class and so on. If you do that, it'd be great help towards my new project. Thanks :)
     
  2. Offline

    Harmings

    CactusComboPvP
    In your onEnable() in your main class you would do this for CommandExecutors:
    Code:java
    1. getCommand("<yourCommand").setExecutor(new <yourClassName>(this));

    for a Listener class you would put this in your onEnable():
    Code:java
    1. PluginManager pm = Bukkit.getServer().getPluginManager();
    2. pm.registerEvents(new <yourClassName>(this), this);

    and make sure to add a constructor in your classes so you can refrence the main class like this:
    Code:java
    1. Main plugin;
    2. public <yourClassName>(Main instance)
    3. {
    4. this.plugin = instance;
    5. }
     
  3. Offline

    Ad237

  4. Offline

    CactusComboPvP

    Thank you very much harmings, appreciated. Ad237, thanks to harmings, I learnt. But thanks to you, I got offended.
     
  5. Offline

    Ad237

    CactusComboPvP You basically proved my point. You are trying to code a full kit plugin but you didn't even know how to

    1. Register a command
    2. Register an event
    3. Pass an instance of a class.

    I would suggest learning atleast the basics of Java and the Bukkit API before doing this.
     
  6. Offline

    PolarCraft

    Ad237 Dude come on. When I started that was not the basics... Please do not offend other members of the bukkit forums.
    Code:
    2. No racism, discrimination, threats or personal attacks of any kind are permitted.
     
    This is a friendly community and as such you are expected to be courteous and follow general posting etiquette. There are times when you may not agree with someone, or you've had a bad day and that's fine, we all have those days. But please, for your own benefit, leave your problems off Bukkit.org. Doing so will ensure that the Bukkit Community is a welcoming, friendly one.
     
    thomasb454 likes this.
  7. Offline

    CactusComboPvP

    I have made the following: /pvp, /archer and a kangaroo! When you right click leather boots, you go a bit up in the air, thanks harmings! :)
     
  8. Offline

    Ad237

    PolarCraft Telling someone to learn Java does not break that rule.

    CactusComboPvP I'm very sorry if I caused offence. I just find it annoying when people try to do something to advanced for them. I have been in your position before and I understand that you want to get into advanced stuff cause it is more fun but just take the time to use commands and it will help a lot.
     
    Garris0n likes this.
  9. Offline

    PolarCraft

    Ad237 Never said it was. Just the way you said it offended the op.
     
  10. Offline

    M0n0clink

  11. Offline

    HyrulesLegend

    CactusComboPvP You honestly got offended from that? He was just telling you that you should learn Java, and which I agree, if you're going to ask us simple questions like how to register a command, event, etc, you obviously lack of simple Java/Bukkit API knowledge.
     
    rbrick likes this.
  12. Offline

    thomasb454

    Let's not cause an argument, let's face it, we've all been there. I bet, he is in the process of learning Java - Aren't we all? "you learn something new everyday"

    + this forum is for support. :)
     
  13. Offline

    WhaleAnarchy

    First of all, this post SHOULD be in plugin requests, NOT in plugin development. Second, Ad237 is right, CactusComboPvP needs to learn the basics of java before he starts this. And PolarCraft, this is basic java, when I started coding this was the first thing that I learned (I might be an exception because I learned java in a week)!
     
  14. Offline

    maxben34

    If you don't know java but wish to make plugins using the Bukkit API, it is important that you learn java. Sure, you can make plugins with knowledge of the bukkit API alone, but to really make in depth and higher quality plugins it is important that you learn java. You clearly want to learn to program cuz it seems like you want to do it yourself, so you should really learn java through YouTube videos like thenewboston or a book like java for dummies. Then you could move into the bukkit API and have a much easier time instead of struggling to create a simple plugin.
     
  15. Offline

    Mathias Eklund

    What are you talking about? This is the correct section for this post, and nothing in bukkit is basic java ... But you should definetly understand java before you get into bukkit.
     
  16. Offline

    thomasb454


    You didn't "learn Java in a week" - I'm guessing you mean you have a good understanding of it. We're all still learning.
     
  17. Offline

    CactusComboPvP

    Omg, just lock the topic. Everyone has different learning speeds.
     
  18. Offline

    Garris0n

    The point is that you should be learning Java before using Bukkit or the forums get filled with "how i code dis" posts.
     
  19. Offline

    thomasb454

    I understand that, BUT we're here to help.
     
  20. Offline

    Garris0n

    Yes, but we're here to help with Bukkit, not Java, and it gets very difficult to help people who don't know Java with Bukkit because they don't understand what you're trying to explain to them. The solution to this is to explain to them that they need to learn Java first before they use the Bukkit API.
     
  21. Offline

    thomasb454


    Valid point.
     
  22. Offline

    naorpeled

    Ccatus, if you want I can teach you, and I already got you u on my skype :p
    CactusComboPvP
     
  23. Offline

    CactusComboPvP

    naorpeled
    I messaged you on skype but you didn't reply :(
     
  24. Offline

    MooshViolet

    CactusComboPvP I am coding a kitpvp plugin right now, if you would like help, private message me here and we can arrange something.
     
  25. Offline

    iiHeroo



    Only person who on Bukkit I've seen recommend TheBCBroz, don't watch them, teach terrible methods ._.
     
    PogoStick29 and Max_The_Link_Fan like this.
  26. Offline

    HyrulesLegend

    CactusComboPvP I assume you don't know the Bukkit API, so I'm gonna suggest you watch PogoStick29 's videos, he has good videos on the Bukkit API. But if you don't know Java at all, start there first.
     
    PogoStick29 likes this.
  27. Offline

    MayoDwarf

    Ikr! It's better to teach yourself! :)
     
    Max_The_Link_Fan likes this.
  28. Offline

    iiHeroo


    Unfortunately, us dogs lack in knowledge, so we'd be better off biting someone to teach us.
     
    MayoDwarf likes this.
Thread Status:
Not open for further replies.

Share This Page