Plugin category: Protection(?) Suggested name: FlyDMG What I want: I need an plugin which allows me to block ALL DMG (hitting with items or hands) while player is in /fly Ideas for commands: No commands needed for this plugin. Ideas for permissions: Players with node - fly.nodmg cannot deal any damage to entities (animals, monsters, players). When I'd like it by: Any time soon.
Semirotta This sounds easy, so do you want it so when they are flying then cant deal nor take any damage, or?
when they are up in the air. Really annoying when people "abuse" mob spawners with /fly They are flying in the air hitting / killing mobs while mobs cannot fight back. I just want to remove all dmg from FLYING persons. DMG in creative already is prevented but normal /fly in survival still deals.
Semirotta I will look into this in a while(1 hour at least) so if anyone else wants to do it, by all means.
Its already almost 1 am for me, got to go sleep since early wake up in the morning. Contact me via private message So far haven't heard anything from Trevor1134, if someone wants to do this and manages to do it before Trevor, pls? EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Trevor1134, Semirotta wants your reply Semirotta, you need to tahg people if you want their attention
Semirotta https://mega.co.nz/#!fRoymCKZ!OXxYi3mUMpzQMPgxEqcPkiqHaM4qdH14mLrHV0Qck18 should work. Permission is flydamage.bypass; users with the permission won't be affected by the plugin. The plugin will cancel the players hitting monsters and shooting arrows. src: Code:java package me.sainttx.flydamage; import org.bukkit.entity.Player;import org.bukkit.event.EventHandler;import org.bukkit.event.Listener;import org.bukkit.event.entity.EntityDamageByEntityEvent;import org.bukkit.event.entity.EntityShootBowEvent;import org.bukkit.plugin.java.JavaPlugin; public final class FlyDamage extends JavaPlugin implements Listener { public void onEnable() { getServer().getPluginManager().registerEvents(this, this); } @EventHandler public void onEntityDamageByEntityEvent(EntityDamageByEntityEvent e) { if (e.getDamager() instanceof Player){ Player p = (Player) e.getDamager(); if ((p.isFlying()) && !(p.hasPermission("flydamage.bypass"))){ e.setCancelled(true); } } } @EventHandler public void onEntityShootBowEvent(EntityShootBowEvent b) { if (b.getEntity() instanceof Player){ Player p = (Player) b.getEntity(); if ((p.isFlying()) && !(p.hasPermission("flydamage.bypass"))){ b.setCancelled(true); } } } public void onDisable() { } }
Thank you! I'll test it out asap SainttX EDIT: I assume OP can still kill while /fly ? because i tried testing it as OP , i did /fly and then spawned a pig, killed it with a diamond sword EDIT2: OP or not OP, i can kill monsters and animals while flying.? EDIT3: VIP+ just tested, they can still kill monsters and animals.
Semirotta Sorry. Only tested using no plugins. This *should* work: https://mega.co.nz/#!ScJlzYAA!IDHc01z8TRlhcz5_1BqDz3h4Zcl1DC62OpMGn5OWTPA src: Code:java package me.sainttx.flydamage; import java.util.logging.Logger; import net.milkbowl.vault.permission.Permission; import org.bukkit.entity.Player;import org.bukkit.event.EventHandler;import org.bukkit.event.Listener;import org.bukkit.event.entity.EntityDamageByEntityEvent;import org.bukkit.event.entity.EntityShootBowEvent;import org.bukkit.plugin.RegisteredServiceProvider;import org.bukkit.plugin.java.JavaPlugin; public final class FlyDamage extends JavaPlugin implements Listener { private static final Logger log = Logger.getLogger("Minecraft"); public static Permission perms = null; @Override public void onDisable() { log.info(String.format("[%s] Disabled Version %s", getDescription().getName(), getDescription().getVersion())); } public void onEnable() { getServer().getPluginManager().registerEvents(this, this); setupPermissions(); } private boolean setupPermissions() { RegisteredServiceProvider<Permission> rsp = getServer().getServicesManager().getRegistration(Permission.class); perms = rsp.getProvider(); return perms != null; } @EventHandler public void onEntityDamageByEntityEvent(EntityDamageByEntityEvent e) { if (e.getDamager() instanceof Player){ Player p = (Player) e.getDamager(); if ((p.isFlying()) && !(perms.has(p, "flydamage.bypass"))){ e.setCancelled(true); } } } @EventHandler public void onEntityShootBowEvent(EntityShootBowEvent b) { if (b.getEntity() instanceof Player){ Player p = (Player) b.getEntity(); if ((p.isFlying()) && !(perms.has(p, "flydamage.bypass"))){ b.setCancelled(true); } } } }
SainttX Ok i don't know why but it has stopped working, people can still fly and hit mobs but flying and arrows shooting is not doing dmg. PLUGINS LIST: (35): WorldBorder, bPermissions, LinksOnSigns, PTweaks, WorldEdit, Vault, Backpack, TerrainControl, WorldGuard, SilkSpawners, MChat, Parkour, UnhealthyDeath, CoreProtect, LimitedCreative, Mob Healthbars, Lockette, ZavAutoMessager, ProtocolLib, FoundOres Revisited, RandomTP, MobName, MakeYourOwnCommands, HorseTools, Essentials, AncientGates, OtherDrops, EssentialsSpawn, FlyDamage, NoItem, Enjin Minecraft Plugin, EssentialsAntiBuild, MCBans, SemiRPG, BKCommonLib
try http://dev.bukkit.org/bukkit-plugins/noflypvp/ block: pvp: true # Block PVP While Flying potions: true # Block Potions While Flying bowfire: true # Block Shooting A Bow While Flying (Overrides Player/Mob Bow Damage) bowdamageplayer: true # Block Shooting A Player With A Bow While Flying bowdamagemob: false # Block Shooting A Mob With A Bow While Flying blockbreak: false # Block Breaking Blocks While Flying blockplace: false # Block Placing Blocks While Flying bucketempty: false # Block Emptying Buckets While Flying bucketfill: false # Block Filling Buckets While Flying pickupitem: false # Block Picking Up Items While Flying pvp: disableflyonhit: true # Turn Off Fly When Hit By A Player (Aka DiveBomb) fallminhealth: 1 # Minimum Health To Leave A Player Whose Fly Was Turned Off mobdisablefly: false # Mobs That Deal Damage To A Player Turn Off Their Fly
I just would need to get the plugin fixed I dont really understand why it stopped working all of a sudden. Perhaps its the SemiRPG that causes it? Don't know. I don't want a new plugin which brings so much useless stuff...