[UNSOLVED]Please help me with the flying bug that my friend made ​​me!

Discussion in 'Plugin Development' started by Huntiz, Jul 29, 2013.

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

    Huntiz

    Hey, people. Is anyone willing to help me? My handsome friend orikenig gave me this code:

    Code:java
    1. @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
    2. public void MoveEvent(PlayerMoveEvent event) {
    3. Player player = event.getPlayer();
    4. Block b = player.getLocation().getBlock();
    5. if (player.getInventory().getHelmet() != null) {
    6. if (player.getInventory().getHelmet().getType() == Material.DIAMOND_HELMET && player.getGameMode() != GameMode.CREATIVE) {
    7. if ((player.getLocation().subtract(0, 2, 0).getBlock().getType() == Material.AIR || player.getLocation().subtract(0, 1, 0).getBlock().getType() == Material.AIR) && b.getTypeId() == 0 && b.getRelative(BlockFace.NORTH).getTypeId() == 0 && b.getRelative(BlockFace.EAST).getTypeId() == 0 && b.getRelative(BlockFace.SOUTH).getTypeId() == 0 && b.getRelative(BlockFace.WEST).getTypeId() == 0) {
    8. player.sendBlockChange(b.geLocation(), Material.VINE, (byte) 0);
    9. Block b2 = b.getRelative(BlockFace.DOWN);
    10. if ((player.getLocation().subtract(0, 2, 0).getBlock().getType() == Material.AIR || player.getLocation().subtract(0, 1, 0).getBlock().getType() == Material.AIR) && b2.getTypeId() == 0 && b2.getRelative(BlockFace.NORTH).getTypeId() == 0 && b2.getRelative(BlockFace.EAST).getTypeId() == 0 && b2.getRelative(BlockFace.SOUTH).getTypeId() == 0 && b2.getRelative(BlockFace.WEST).getTypeId() == 0) {
    11. player.sendBlockChange(b2.getLocation(), Material.VINE, (byte) 0);
    12. }
    13. }
    14. }
    15. }
    16. }


    There's a bug in the code. Sometimes the VINES stay and you do not see them, and also If you delete the plug-in, you still stuck in the air like in some places. Thanks to those who help.

    I've been discouraged, no one was able to help me.
    And everyone told me to contact the forum - from mIRC, #bukkitdev.
    Thanks for those who could help.

    And to save questions - many asked me the same questions:
    - What's that supposed to do? Flying with body, my friend tried to do the same to me like Superman flying.

    bump.

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

    Samthelord1

    What are you trying to do??
     
  3. Offline

    Huntiz

    I think if you were reading, you would understand.

    Listen, I have no point in discussing with you, I simply need help! I try to do as Superman flying.

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

    Pawnguy7

    Huntiz to be honest, I have reread it three times now, and I still don't know. Be nice.
     
    Samthelord1 likes this.
  5. Offline

    Huntiz

    Why do not you try to put it on your server and see?
     
  6. Offline

    Samthelord1

    Huntiz people don't have the time, this is clearly a lag error, you could add delays in see if it works
     
  7. Offline

    Pawnguy7

    Huntiz You assume I have a server.

    Anyway, why don't you actually state exactly what it is meant to do, and what isn't working. You came here for help. People help of their own free will. I don't want to help disrespectful people.
     
  8. Offline

    Huntiz

    Samthelord1 A person does not just come and help, man will come and help when he has time. I do not tell people to come and help, and leave your time. Overall I ask for help, who has time to help, he help.

    Pawnguy7 If you do not want to help, do not help. You do not owe me anything.

    Samthelord1 How you're ready to set I pretty much like Hitler? Are not you ashamed? I am an Israeli!

    Samthelord1 You got that wrong, you said to me my logic is worse than Hitler, and it is not pretty you're telling me that.
    You can said someone else, but why Hitler?

    And how all of this related topic? And my English is bad, I am an Israeli.

    Yes, of course, lol!

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

    Pawnguy7





    Evidently you expect people to just magically fix it. I don't know what it is meant to do ,and thus cannot fix it.
     
  10. Offline

    xTrollxDudex

    We come here to help people with disregard to what their behavior is, if you don't want to help go on another thread. Should they continue to be disrespectful there is always a report button. The administrators/moderators will handle it.
    You are not straying away from the topic...
    Some people do not have english as a first language, respect that.
    Many prefer to not share their race, given that there is a no racism permitted rule. You can prevent this by keeping it to yourself.

    Now, let's get back on topic shall we?
    Huntiz
    So, you are stuck in "some places"? Elaborate please
     
  11. Offline

    Pawnguy7


    True. I just find it frustrating when I try to help, and they don't tell me what anything is. It is like making a plugin for somebody, asking how some thing should be, having them never answer, then later ask why you didn't finish it.
     
    xTrollxDudex likes this.
  12. I actually was reading through this code, I've read it around 10 times by now and I still don't understand it. It's really confusing, I'm sorry but a lot of people who have read this want to help but just can't understand it.
     
  13. Offline

    RROD

    Samthelord1 When someone comes to the forums asking a genuine question, it deserves a genuine answer. If you're only going to throw your opinion across and not be helpful, why post?

    Moving on-topic...
    It'd be useful to know what exactly this piece of code is supposed to do.
    As far as I can see, if someone is wearing a certain armour combination, there are vines placed on the client in order to move them?
     
  14. Offline

    Jade

    Stop derailing this thread. Also, don't be rude or insulting to another member, especially remarks that could potentially offend someone.
    Cleaned up the thread.
     
    xTrollxDudex likes this.
  15. Offline

    Huntiz

    xTrollxDudex When the player is wearing Diamond Helmet is getting fly with vines.
    Sometimes he gets stuck in the air or against the wall with vine. And even if you delete the plug-in, it will remain stuck.

    It is important to say that the vines barely see them, as it is updated every few seconds - that's right, it's not a bug.

    And thanks for that you supported me :).

    RROD When the player is wearing Diamond Helmet is getting fly with vines.
    Sometimes he gets stuck in the air or against the wall with vine. And even if you delete the plug-in, it will remain stuck.

    It is important to say that the vines barely see them, as it is updated every few seconds - that's right, it's not a bug.

    And thanks for that you supported me.
     
  16. Offline

    xTrollxDudex

    Learn more bukkit before helping?
    Huntiz
    No problem, I once got in trouble with TnT for not controlling my behavior.
    Anyway, "stuck"? How about breaking the vine?

    Try clearing all the blocks/send block changes for air
     
  17. Offline

    Samthelord1

    Jade all posts deleted, I apologise if I offended you Huntiz
     
  18. Offline

    JPG2000

    Huntiz And I dont know why you checked for helmet as null, then for type, I dont think that does anything.
     
  19. Offline

    Huntiz

    xTrollxDudex To tell you the truth, I have not had a plugins with cleaning, I'd be happy if you help me.

    Samthelord1 I forgive, despite with Hitler insulted me.

    JPG2000 I see you have already plugins, but the section is not offensive, before you read Bukkit? Or the code properly?
     
  20. Offline

    JPG2000

    Huntiz What? That makes no sense what you just wrote. All I saiid is why are you checking for null then the helmet type.
     
  21. Offline

    Huntiz

    JPG2000 Have you read the thread? I said my friend gave me this code, so I'm sure he knows why he's there.
     
  22. Offline

    JPG2000

    Huntiz Ok at this point your just rude. Goodbye.
     
    graphiic1 likes this.
  23. Offline

    Huntiz

    JPG2000 Sorry it sounds rude, but all I wrote, in the thread.
    Sorry if this sounds rude or hurt you.
     
  24. "Learn more Bukkit".
    Bro, learn English properly.

    Also, I do try my best to help others, but if I see messy code I just can't help. It's not to do with me not knowing, it's to do with his messy code and I hate messy code.
     
  25. lol.
     
    KingFaris11 likes this.
  26. There's nothing wrong with what I said, is there?
    "It's not to do with me knowing".
    I, of course meant that "It's not to do with me not knowing" but even what I said makes sense.
     
  27. Offline

    Pawnguy7

    I am still confused exactly what is happening here, but is allowing normal flight not an option?
     
  28. Offline

    Samthelord1

    Not to be harsh, but I think that the OP didn't explain in enough detail, but from what I've read, he's trying to make a 'superman flying style' personally I don't know what that is. But I understand his concept of vines appearing and disappearing and as I said, he should add delays in, aswell as telling his friend to use some //'s to make life easier for everyone.
     
  29. Offline

    xTrollxDudex

    So why are you here?
    To check if the helmet isn't there. Same as checking that the helmet slot is not air.
    At this point I don't think you need vines. Remove lines 7-13 and replace with
    PHP:
    player.setFlying(true); 
    if you just want them to fly.
     
  30. Offline

    Samthelord1

    I think he wants some different style of flying
     
Thread Status:
Not open for further replies.

Share This Page