Creative Fly without Creative mode?

Discussion in 'Plugin Development' started by MG127, Feb 8, 2012.

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


    the title sais all, i want someone to be able to fly like in creative mode without actualy being in creative mode. i just don't like magiccarpet and velocy-changing fly modes
  2. Offline


    allow ur users to use a fly mod =) U also can say what group can use fly mod´s and who doesnt if u use NoCheat too =D
  3. Offline


  4. Offline


    He is looking for just fly/ He doesn't want the player to get creative mode.
  5. Offline


    Player player = someRandomPlayer;
    That will allow a player to fly without being in creative mode. Good luck :)
  6. Set the players gamemode to creative but block them from placing/breaking/PvPing ? Or get them to install a fly mod.
  7. Offline


  8. Offline


    I believe the easiest way is simply to use
    which will tell the client that they are allowed to use fly mode and once this has been done the client will allow the player to double jump to start flying.
    (I'm not 100% sure on if this does tell the client this, gonna skim the code now, don't quote me on this yet)
  9. Offline


    Essentials is what you are looking for. Use the newest version. Do /fly to enable and disable.
    Hope I helped!
  10. Offline


    Contrary to several people saying it, player.setAllowFlight() only sets it to the players creative allowed flight. I've already tried this :\
  11. Offline


    How about: player.setFlying(true);
    it not the same as setAllowFlight();
  12. Offline


    It appears when I was doing it I did something wrong and gave up too quickly. I just checked essentials github on fly command and they appear to have a working fly command. Ad for setFlight() I don't believe it is valid. The correct method IS IN FACT: player.setAllowFlight(!player.getAllowFlight()) -simplest code.
  13. Offline


    The setAllowFlight(true) method turns on a player's ability to double jump to begin flying. The setFlying(true) method will actually turn on flight for that player. You can't do the second without doing the first before. This feature was only added in 1.2.4 (that's what makes the protocol incompatible with 1.2.3). So,

    Will make a player fly.
  14. Offline


    For toggle flight i'm using:
  15. Offline

    Mr Washington

    fromgate I can not get this to work. It gives me an internal server error and Null Pointers....
  16. Offline


    The only difference between this and what we already suggested is that if flying is set to true it will be set to false when this is called. If this is working for you what we suggested would have too.
Thread Status:
Not open for further replies.

Share This Page