[Help]im trying to make a plugin from scratch and need some help

Discussion in 'Plugin Development' started by kman2010, May 15, 2011.

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

    kman2010

    https://github.com/kman2010/GoldEnchant
    the problem im having is how do you make it so you need to right click a diamond block to activate the power?
    also i have an irc we can talk on if you feal better talking like that.
    irc.esper.net #kmanschat
     
  2. Offline

    Plague

    Don't start it from scratch, get a working simple plugin and use that as a starting point.
     
  3. Offline

    kman2010

    ok then how do i go about that?

    only reason i ask is because im afraid of plagerizm

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 16, 2016
  4. Offline

    Plague

    If you just use the code as inspiration and then you rewrite it yourself, that's not plagiarism.
     
  5. Offline

    kman2010

    ok im looking at some code now but cant make heads or tails of it

    here is the error in console.
    http://pastebin.com/JfSVaFE1

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

    kman2010

    that is how i started mine but idk how to continue
     
  7. Look at my zombies source, or at other more simple plugins source code.
     
  8. Offline

    kman2010

    if you actaly looked at my source there is only 1 other plugin like it and i cant figure out what is going on it that plugin
     
  9. I think for that you need to multiply the players velocity.
     
  10. Offline

    kman2010

    and how do i go about doing that?
     
  11. Take a look at bukkits java docs, i think it's something like
    PHP:
    Player player event.getPlayer();
    player.setVelocity(player.getVelocity()).multiply(x);//Where x is an integer.
     
  12. Offline

    desmin88

    Only issue is every time they just tap the walk key, there speed will get exponentially faster and faster until the server crashes.
     
  13. Offline

    nisovin

    You need to do this:

    Code:
    PluginManager pm = this.getServer().getPluginManager();
    In your onEnable() method, not statically.
     
  14. Offline

    kman2010

    ok thnx i got it all good i will reupload the code
     
  15. That's why you have to set a cap/limit
     
  16. Offline

    kman2010

  17. Offline

    kman2010

    i got the limit now i need some more help making the enchanting part
     
  18. I'f your struggling I'd opt for making a more basic plugin first.
     
  19. Offline

    kman2010

    i did i just need some code to learn from
     
Thread Status:
Not open for further replies.

Share This Page