Flying potions

Discussion in 'Archived: Plugin Requests' started by spydercanopus, Jun 5, 2012.

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

    spydercanopus

    I would like to be able to sell "flying potions". You can program them to allow legit flight for 'X' time. Should be easy, right?
     
  2. Offline

    chenr1

    YOu want potions that let you fly? Sure that cant be hard since there is an actual /fly command. I'll work on it. Only prob is you wont be able to actual add a new potion. It would al all have to be command.
     
  3. Offline

    spydercanopus

    Ideally potions would serve the purpose, but it wouldn't have to be a potion per-say. Just very limited ability to fly, which could be plugged into the economy system or given out for certain purposes/rewards/achievements/whatever.
     
  4. Offline

    np98765

    Basically, this is what I'd think a developer would do:

    Once the person drinks this "potion" (read on for why it's in quotes), the plugin would give them temporary permission to fly and give bubbly potion effects, then, once the time is up, revoke that permission.

    I don't know if you want a separate potion for flight, like a new item: Potion of Flight II or something. That would require Spout. If not, then it doesn't require Spout..
     
    spydercanopus likes this.
  5. Offline

    chenr1

    Right that's what I was saying that you would need Spuout to make a new Item.
     
  6. Offline

    spydercanopus

    Precious Stones (@ phaed420 @EvilNilla @trc202) makes blocks do special things. You could make an "edible" block that destroys upon use or maybe recharges over time to allow then disallow flight.
     
  7. Offline

    np98765

    So adding a function to an existing block?
     
  8. Offline

    spydercanopus

    Could work.
     
  9. Offline

    chenr1

    Thats exactly what im doing.

    https://github.com/ryanclancy000/Flight/blob/master/src/me/ryanclancy000/flight/FlightCommands.java I'm taking a look at this to add the actual flying functionality.

    There I made it. So far plasing bedrock enables flying placing obsidian disables it.

    Code:
    @EventHandler
    public void DisableFly(BlockPlaceEvent event){
    if(event.getBlock().getType() == Material.OBSIDIAN){
       
        event.getPlayer().sendMessage("Flying is know disabled.");
        event.getPlayer().setAllowFlight(false);
    }
    }
     
     
     
    @EventHandler
    public void AllowFly(BlockPlaceEvent event){
    if(event.getBlock().getType() == Material.BEDROCK){
       
        event.getPlayer().sendMessage("Flying is know enabled.");
        event.getPlayer().setAllowFlight(true);
    }
    }
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 26, 2016
Thread Status:
Not open for further replies.

Share This Page