Simple Firework Wand

Discussion in 'Archived: Plugin Requests' started by super292, Oct 22, 2013.

  1. Offline

    super292

    Plugin Category: Fun

    Suggested Name: FireworkWand or Fireworks

    What I want: I recently added a hub to my server and require various things for them to do while in the Hub. One of which is that they have a blaze rod in their inventory and are able to right click in the air or on a block, it spawns 4 or 5 different random fireworks. This would have a cool down of around 30 sec (you can make a config for that if you want). I have some other things that could be implemented, but first I need to see If someone is willing to take this up.

    Commands: None necessary at the moment.

    Permissions: None, as all players are going to have this.

    When I'd like it by: Preferably in a day or two, as this should be rather short code.
     
  2. Offline

    itzrobotix

    You would think. However it wouldn't be hard I think, im new to java but i'll give it a try later anything else, messages etc?
     
  3. Offline

    timtower Administrator Administrator Moderator

    Well, this isn't really that big to code... So 2 days aren't that hard
    And don't look at the time or if somebody says [EASY] Most people that request it don't know any java at all, so they don't know
    EDIT: Poster edited
     
  4. Offline

    itzrobotix

    I edited my post also I know and it makes me giggle when they say I want *Insert minigame here* finished in a day. On a side note why you reply everywhere!? I have posted 2 things and both you have replied too, you should be an admin.
     
    timtower likes this.
  5. Offline

    timtower Administrator Administrator Moderator

    I know what you mean with that ;) See loads of stuff like that.
    And because I can :p And people are already calling me an un-official moderator. But this is getting offtopic, for further conversations: PM me or put something on my profile page
     
  6. Offline

    itzrobotix

    That is all. :p
     
    timtower likes this.
  7. Offline

    super292

    It's OK. I code java as well, I've just had recent trouble with the fireworks spawning during the RIGHT_CLICK_AIR event. I know the size of the code :). So is this one you can take up?
     
  8. Offline

    itzrobotix

    Well i'll have a good crack at it even with the lack of internet xD I will report back when I have it again in a few days maybe in-between to update you, wish me luck.
     
    timtower likes this.
  9. Offline

    timtower Administrator Administrator Moderator

    If you need help you can contact me ( no skype )
     
  10. Offline

    itzrobotix

    I will try to, I'm very limited with no internet(Going out of town) but I have stocked up on methods and code and such so should be fine.
     
    super292 and timtower like this.
  11. Offline

    super292

    Thanks, I will await your reply on the code :)
     
  12. Offline

    itzrobotix

    Ok so after a few hours of coding while I was away I made it with the lack of internet which I am pleased with except a few things like the cool down and multiple fireworks which I worked out earlier. So basically it works! And is pretty cool, now the only thing I haven't added is a check to see wether they already have a blaze rod simply because I can't figure it out, other than that it all works. I had trouble with right click block and air but that seems to have worked its self out, now as you probably won't reply for a while I will add a leave event that will clear blaze rods on quit hopefully and that should fix the problem. Reply as soon as you can as to how you want it. PM, here etc ^_^
    EDIT: Added it is now flawless.
    FEATURES:
    *Player will receive the custom blaze rod on join - You can change name and colours in the code.
    *On leaving the server if the player has the exact item then it will be removed as not to stack up after quitting and joining - P.S. If you change the name or colour of item you must change it in the quit event also or the quit event will not remove the item, they must match.
    *When the blaze rod is right clicked on AIR or BLOCK it will launch 5 different fireworks at the moment from the players location. P.S. The fireworks can be changed and more added but you must follow how I have done it or it will break.
    *After right clicking the blaze rod players are added to an array list and can't preform the action again for 30 seconds/ 600 ticks they are also sent a message. P.S. 20 Ticks is 1 second, the message can be changed or removed in the code.
    THAT IS ALL.
    EXTRA: If you would like to test it first tell me on here or add my Skype: itzrobotix and I will give you the IP to my plugin testing server where you will be able to check it out. WARNING it may be laggy but the plugins still work.

    The plugin is complete with no errors thanks to timtower just tell me how and where you want the code or jar. In the code I annotated it to help you change it if need be.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 5, 2016
  13. Offline

    super292

    Pastebin would be fine. Thank you very much!
     
  14. Offline

    timtower Administrator Administrator Moderator

    You are welcome ;)
    Just post dropbox or mediafire links ;) And github ( if you have that )
     
  15. Offline

    itzrobotix

    There, if you need help just ask, I will keep the project as a reference point as it has helped me develop also incase you need something doing. http://pastebin.com/S1xHxiNT Your welcome ^_^
    EDIT: Don't forget about the plugin.yml xD otherwise it won't work.

    Is it as was expected?? Do you like it/need anything else?

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

    super292

    Perfect, thanks!
     
  17. Offline

    itzrobotix

    Your welcome.

    Sorry but after looking through the code I released I had done the removing event horribly, if the server was restarted the players would not loose their blaze rod and upon joining again would gain a new one then the removing system would break, maybe you picked up on this and changed the code but incase switch to this. http://pastebin.com/hAu9bKFt This will now instead on join check to see if the player has the item already, if so it will return and not give them another if not then it will give them one, it was a simple change but it will be super effective.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 5, 2016

Share This Page