CTF-Effects

Discussion in 'Archived: Plugin Requests' started by Reptar_, Sep 16, 2012.

  1. Offline

    Reptar_

    Nothing happens at all. This time there are no errors. I even made sure Particles was on.

    It's not generating any files either.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 28, 2016
  2. Offline

    WarmakerT

    No files are supposed to be generated. I'll test it this time.
     
  3. Offline

    Reptar_

  4. Offline

    WarmakerT

    lol, the effect's not what I expected :p
    I'll try to fix it. And yes, it works.
    I'll also stop people from picking them up, and make them de-spawn.
     
  5. Offline

    Reptar_

    Sweet. Thanks! :p
     
  6. Offline

    WarmakerT

    Ok, just re-download. Everything works now. I'll go to sleep, if you need me to add anything else, just say so.
    Also: I don't like rip-off's, and I'm sure most people also don't, so try to add something special to your server, to make it a bit unique.
     
  7. Offline

    Reptar_

    Just did. Nothing still happens. :\
     
  8. Offline

    Woobie

    He probs used BlockBreakEvent, so try to break a wool block and see what happens.
     
  9. Offline

    Reptar_

    Ok

    It's randomly working. . . I placed red wool.

    I found the problem. It's not compatible with Skript. I disabled Skript and it worked. Enabled it and it stopped.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 28, 2016
  10. Offline

    Woobie

    Okay, well the plugin is working atleast.
    Not sure what to do for the Skript problem.
     
  11. Offline

    Reptar_

    I don't see how Skript is interfering.
     
  12. Offline

    Woobie

    Me neither.
    How does the players capture the flag, and what happens then?
     
  13. Offline

    Reptar_

    Players click netherrack/lapis to obtain the flag. (this give them a diamond) and turns the "flag" into a red/brown mushroom block. Skript doesn't handle wool data values well, therefore I used Netherrack and Lapis. May be the reason.
     
  14. Offline

    WarmakerT

    Yeah, it's a Skript problem. My plugin's just a command, lol.
     
  15. Offline

    fredghostkyle1

    um he War plugin will do this.
     
  16. Offline

    Reptar_

    I don't want a big plugin just for one effect.
     
  17. Offline

    _Ass4ssin_

    If it is possible could you make it work for every wool color please? I could use this as well for my server but would like to have more then just the red and blue color. Thanks if you could make it and else still thanks for reading :)
     
  18. Offline

    Woobie

    Well, WarmakerT are you done with this, can i try? :)
     
  19. Offline

    WarmakerT

    I finished it yesterday '-'
     
  20. Offline

    Woobie

    Look at the replies.
    If you could pm me the source code, i wouldnt have to re-code it.
     
  21. Offline

    WarmakerT

    Decompile it :)
     
  22. Offline

    Woobie

    So you give me permission to decompile it, and use the source code?
    SCREENSHOT TAKEN!
     
  23. Offline

    WarmakerT

    Yes I do, I do not give you permission to claim it as your own though :)
     
  24. Offline

    Woobie

    I will give you credits if i get it working.
     
  25. Offline

    fireblast709

    what about making the Item ride the player?
     
  26. Offline

    chasechocolate

    I think he wanted the items to shoot up, but items can ride players?! LOL!
     
  27. Offline

    fireblast709

    Entities can ride Entities. Also would cost you less resources if it works. Though i might be buggy of where the item gets to float, that might be a problem
     
  28. Offline

    fireblast709

    Reptar_
    Code:java
    1. /*
    2. * The ID
    3. **/
    4. private UUID id;
    5.  
    6. /*
    7. * The command
    8. **/
    9. if(label.equals("flag"))
    10. {
    11. if(id == null)
    12. {
    13. Item i = p.getWorld().dropItem(p.getLocation(), new ItemStack(Material.DIAMOND_SWORD, 1));
    14. id = i.getUniqueId();
    15. p.setPassenger(i);
    16. }
    17. else
    18. {
    19. p.getPassenger().remove();
    20. id = null;
    21. }
    22. }
    23.  
    24. /*
    25. * The events
    26. **/
    27.  
    28. @EventHandler
    29. public void onPickup(PlayerPickupItemEvent event)
    30. {
    31. UUID tid = event.getItem().getUniqueId();
    32. if(tid.equals(id))
    33. {
    34. event.setCancelled(true);
    35. }
    36. }
    37.  
    38. @EventHandler
    39. public void onItemDespawn(ItemDespawnEvent event)
    40. {
    41. UUID tid = event.getEntity().getUniqueId();
    42. if(tid.equals(id))
    43. {
    44. event.setCancelled(true);
    45. }
    46. }

    The code. It works perfectly fine :3 (though you might have problems seeing it when you are in a building). The effect:
    Show Spoiler
    flag_hovering.png
     
  29. Offline

    ftbastler

    Jeah, it is cool but the item is a bit too high. Although this is pretty sweet.
     
  30. Offline

    fireblast709

    It is as lightweight as it gets :3
     

Share This Page