Rideable Firework

Discussion in 'Plugin Development' started by VictoryShot, Mar 27, 2014.

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

    VictoryShot

    This is just a code request. I want a Event that when I right-click with a firework it will send me up riding it until it exlpodes and I fall.
     
  2. Offline

    MrInspector

    Kind of wrong section, just request a plugin, not request code, no one will really "spoon feed" you. (funniest thing I've ever heard btw, not trying to be mean or anything :p).
     
  3. Offline

    jprules

    VictoryShot well i like the idea and MrInspector where the hell are you taling about he has a cool idea i hope a good developer can make this for you ( : p.s. if one makes it for you can i have it to :p
     
  4. Offline

    MrInspector

    No one is really going to give him all the code, he's better of making a plugin request than a 'code' request. :p
     
  5. Offline

    jprules

  6. Offline

    MrInspector

    Go right ahead. ;)
     
  7. Offline

    TnT

    Moved to a more appropriate forum.

    VictoryShot
    Its best if you try to tackle this yourself, and ask for assistance if you run into problems than ask for code. If you do not know how to code, make a plugin request. :)
     
  8. Offline

    jprules

  9. Offline

    VictoryShot

    Was this so hard to do??

    Code:java
    1. player.getItemInHand().setType(Material.AIR);
    2. final org.bukkit.entity.Firework fw = (org.bukkit.entity.Firework) player.getWorld().spawnEntity(paramBlock.getLocation().add(0.5, 1.2, 0.5), EntityType.FIREWORK);
    3. Builder builder = FireworkEffect.builder();
    4. FireworkMeta m = fw.getFireworkMeta();
    5. builder.trail(r.nextBoolean()).flicker(r.nextBoolean());
    6. builder.withColor(Color.fromRGB(r.nextInt(256), r.nextInt(256), r.nextInt(256)));
    7. builder.with(Type.values()[r.nextInt(Type.values().length)]);
    8. builder.withFade(Color.fromRGB(r.nextInt(256), r.nextInt(256), r.nextInt(256)));
    9. m.addEffect(builder.build());
    10. m.setPower(r.nextInt(3)+1);
    11. fw.setFireworkMeta(m);
    12. fw.setPassenger(player);
    13. new BukkitRunnable() {
    14.  
    15. @Override
    16. public void run() {
    17. if(fw.isDead() || !fw.isValid()) {
    18. Bukkit.getScheduler().cancelTask(getTaskId());
    19. return;
    20. }
    21. fw.setVelocity(player.getLocation().getDirection());
    22. }
    23. }.runTaskTimer(SCB.getInstance(), 20, 1);


    Completely random firework effects, and also controlable direction after one second.
     
  10. Offline

    MrInspector

    Thats not my point, you can't really just make a code request and expect someone to reply back with the code and everything you want, no self respected developer will do this for you, a self respected developer could make a plugin for you if you just posted a plugin request.
     
    ZodiacTheories and AoH_Ruthless like this.
  11. Offline

    AoH_Ruthless

    VictoryShot
    If it wasn't so hard to do why is this thread in existence?
     
    MrInspector likes this.
  12. Offline

    VictoryShot

    Well if I saw someone post something like this I would tell them to do like firework.setPassenger or something with the method and not be a dick saying "I cant be spoon fed"

    Because I figured it out I had to ask some people.

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

    MrInspector

    I'm not being a dick, i'm just not going to tell you everything you want to hear, if this was a plugin request someone could have easily made this for you. I've never heard anything like a code request, you could have at least tried your best even if it was a little embarrassing and we could have worked off there, you're not putting any effort into it and expecting someone to just give it to you, thats not how life works.
     
  14. Offline

    VictoryShot

    Well thats why you have friends. They help you out with stuff. Apparently you couldn't explain 10 seconds of your life saying just to do fw.setPassanger ... Logic
     
  15. Offline

    MrInspector

    You werent asking us for setPassenger.

    You were asking for "I want a Event that when I right-click with a firework it will send me up riding it until it exlpodes and I fall."

    Which is way more different, theres a huge difference, you never even provided us with any code to work off with, you put no effort into it expecting someone to give you everything you want, the only effort you put was typing that.
     
  16. Offline

    Anerdson

    You think that someone who has made over 30 plugins would be able to understand such a simple concept. He was asking for someone to tell him an event or a way to make a player follow a firework. Any self respecting coder will help a newbie get started, not be a dick about it. He wasnt asking to be spoon fed, and if he didnt know the event then he obviously wouldnt have been able to ask for fw.setPassenger.
     
  17. Offline

    AoH_Ruthless

    VictoryShot Anerdson
    Regardless of what the OP meant what he was asking, it came across as asking for just code. He asked for an "event that when I right-click..." which screams to long-time developers as "I want you to give me the code". There was no effort in your request that even showed you tried. Plugin Development is for players who need help with their code, not to request code to be handed out.

    MrInspector is without a doubt in the right, because the OP came across in such a way where he was asking to solicit that response.

    Also, friends don't just hand you the answer. Friends help you by guiding you, to show you how to get the answer yourself so you become a better person and actually learn something.
     
  18. Offline

    MrInspector

    It's not that I don't understand what he's asking, I mean I could've made this for him in 5 seconds, but the fact that he was asking to be spoon fed and put no effort at all is exactly like having 50 million dollars in the bank and trying to get a loan (well something along those lines ;p), he wasn't asking for setPassenger he was asking for the whole code, the event, he didn't know how to make the event so he was requesting a developer to give him the code, he tells me that why was setPassenger so hard yet he never gave us any details, he just said he was looking for the full code for the event. I don't like to help people who are just about the copy & paste instead of the "Hey, I need some help with my plugin, here's my current code
    Code:
    code
    I currently however can not set my self riding on it because I do not know how, I've tried my best and my hardest but can't figure it out, here was my latest (embarrassing) try
    Code:
    fw.<insert embarrassing stuff here>;
    but it did not work! Anyone care to venture any answers with me? Thanks!" (or something along those lines)

    I then (or another developer) could have said "Don't worry about it being embarrassing, it's part of the learning process. :) Back to your question: you need to set the passenger of the fw as the player!" (or just provided you with setPassenger) but the fact that he was requesting the full code for it, I just didn't want to help, and VictoryShot if this is how your friends help you (by just handing over the full code) I can assure you wont learn much.
     
    The__Master_Coder likes this.
  19. Offline

    VictoryShot

    It wasnt "full code" they just explained to me how to do it, and what does it do. Thanks Anderson you understand.
     
Thread Status:
Not open for further replies.

Share This Page