Empirewand plugin need help!

Discussion in 'Programming' started by Timislol12, May 24, 2017.

  1. hey,

    im currently creating a plugin for a server, its an empirewand but its not working

    the /ew command does work but i cant right / left click to activate the spell. i hope that someone can help me in discord / Skype, the plugin is almost done but there needs to be 1 error that stops it working

    here is the download link : https://www.sendspace.com/file/0aq4yx

    unrar this in youy plugins folder from eclipse

    thanks! "Ï wanted to do this in github but it did not work"
     
  2. Github -> new repo -> check initialize with readme -> next -> upload files
     
  3. Do you get any errors?
     
  4. no, there is no error in any of them
     
  5. I proposed a file change via github.
     
  6. i accepted it i think
     
  7. Its the big green button.....
     
  8. do i need to copy that one in my eclipse that u updated?
     
  9. i think that it goes wrong in the main from line 68 event handler
     
  10. the plugin gives no errors in the cmd from the mc server
     
  11. Did the fix help tho?
     
  12. i didnt test it yet, im at school :(
     
  13. do i have to update the Main.java only?
     
  14. i can sellect potion wave now!! tnx only it does the potion wave not work xD i get an black with purple block
     
  15. I'm not writing a plugin for you, please just try something, play around and see how far you get
     
    • Like Like x 1
  16. yea i know, tnx so much for fixing the problem im going to fix it after school
     
  17. on what line did u fix the problem? then i can learn something from it :D
     
  18. Long message incomming, gimme a sec
     
  19. Events need to be registerd, this can be done via
    Code (Java):

    getServer().getPluginManager().registerEvents(this, this);
     
    So what does that do?

    Well, it tells the mc server where the event is located so it can call it later.

    The command works as following: getServer().getPluginManager().registerEvents(TARGET, PLUGIN);

    Target = Target is the class where the event is located, since you have it in the main class it can just be 'this'
    Plugin = Plugin is the instance of well... your plugin, and since it is in your main class (that extends javaplugin) you can use 'this' here

    I added it on line 37 https://github.com/TitanHacker/empirewand/blob/master/Main.java#L37
     
    • Informative Informative x 1