Fly For Food
Fly for Food
I wanted a realistic flying plugin. Most plugins I found had to be activated with a command and when activated players where invincible. Fly for Food enables players on a server to fly per right mouse click when they have a feather in their hand.
While it is not possible with the bukkit API (at least for me) to make a player vincible while flying, the flight mode will be automatically disabled when he lands. Further while flying the players food level decreases for the distance and time he flys. If the food level reaches 0, the flight mode will be deactivated.
My main purpose was to make a flight plugin that is as realistic as possible, please feel free to give constructive critique. If you have a good idea how to improve the pluging I will consider to implement it.
Features
- Activates flying with right click when a player has a feather in his hand.
- Flying costs food, it is calculated from time and distance.
Permissions
permission | description | default |
---|---|---|
flyforfood.fly | Allows a player to use a feather to fly (by default flying is allowed) | true |
flyforfood.freeflight | If set, flying will not cause hunger (by default flying causes hunger) | false |
config.yml
With the two parameters cost_distance and cost_time in config.yml you can control how much flying costs. The values are in percent to the default setting.
The default config.yml will be created at you-plugin-folder/Fly for Food/config.yml and looks like that:
cost_distance: 100 cost_time: 100 console_output: false player_messages: true player_message_start: You spread your wings, have fun and don't forget to eat! player_message_landed: You landed. player_message_no_food: You are too hungry to fly! player_message_no_food_while_flying: You are too hungry to fly, you had to fold your wings.
Commands
If you are searching for a plugin where you can toggle flight mode with a command, you should take a look at http://dev.bukkit.org/server-mods/dyrofly/
If you guys want to change how much it costs to fly i found a way since config is not out yet. Im not so good with java and stuff however i still found one.
Open up the flyforfood plugin with winrar. open at folder in it and then the other folder inside it. There it will be 3 class files, the one you want is HungerMaker.class drag it to desktop or somewhere.
Open it up with a program which can edit class files. I used http://classeditor.sourceforge.net/ Go to Constant pool scroll down to 2 lines which says double_value=40.0. Click modify mode on and then change the value to higher if you want less food too cost, and more food cost if you lessen the value. I changed the values to the same however you can try just changing one value. Click save. Then open up the flyforfood plugin again with winrar. got to the same folder and delete the HungerMaker.class there and then drag your modified class file to the folder instead. Done! you should see a change in food drain.
I hope you understand my little guide:) Using your plugin for my Angel kit on my HG server:) works great!
@tehsa
what language do you want? Can you translate it?
It would be great to be able to change the language in some kind of locale.yml .
@poonjab1_0
Does it not work with epicglass?
@OfficialK4G
Sure, I would be glad if I can :) I just uploaded a new version which is under review and will be available soon.
@Gregosteros
I added two configuration options. cost_time controls the food cost over time while cost_distance adds cost per distance. Per default both are set to 100 in this case it means 100% from my default setting.
I tried to make the default cost not too high and not too low. When it is too low, I expect everyone on my server to fly instead of walk ...
Do you (and everyone else reading this) think the cost should be lower or higher? If yes please explain to me why.
Our group is making a video on this plugin. Would you consider putting it on the front page?
Thanks for this plugin! This is a great solution to give reliable members on a server the option to fly. But I do not like that the food level only decreases for flight distance. If you fly up in the night and stay some blocks over the ground, you will be untouchable for mobs, but your food level does not decrease when standing still. So I would prefer to add a timer which decreases your food level for your flight time.
I have been looking for a plugin like this, Maybe have it hook into epicglass so you can fly through windows?
@titen96 I have already implemented persmissions, when I finished testing I will upload a new version.
@blandxd When you mean it costs too much food, that will be configurable soon. I already implemented a permission node to fly for free.
@hoohoo4 I do it that way, but it seems that when I set p.allowFlight(true) and p.setFlying(true) the player will not take damage ... but maybe thats not that bad, because it hurts too much if you crash and all experience is lost, so I think of it as a feature for now :)
this has permission nodes?
It's very easy to make a player vincible while flying, just set p.allowFlight(true) and p.setFlying(true)
This needs a bit of work i feel its a bit over powered, if you need a youtube vid for you plugin make sure to contact me