1. Important information on Next Recommended Build

    Hi Guest,

    We're cleaning up our code to help us better prepare for the release of Minecraft 1.2. As a result, a lot of old, inefficient and buggy code is being removed and plugins will need to be updated.

    Please check your plugins, find out if the plugin developers have been keeping everything up to date and kindly let them know that they need to update their plugins to make sure they will be ready for R5.

[FUN/MECH] Breathe v1.0 - Breathe underwater [1060]

Discussion in 'Plugin Releases' started by SwearWord, Aug 21, 2011.

     
  1. Offline

    SwearWord Community Staff Moderator BukkitDev Staff

    dev.bukkit.org profile:
    SwearWords
    My Plugins
    Plugin: Breathe
    Version: 1.0

    Description:
    Been making a lot of really basic plugins that really should exist already. Let's you breath underwater, no pumpkins nothing stupid. Apparently the only other plugin that let you do this hooked into PLAYER_MOVE and spawned a block of air on your head.

    Features:
    Breathe underwater.

    Permissions:
    breathe.use - Breathe underwater.

    Source:
    Code:
    package org.blockface.breathe;
    
    import org.bukkit.entity.Player;
    import org.bukkit.event.Event;
    import org.bukkit.event.entity.EntityDamageEvent;
    import org.bukkit.event.entity.EntityListener;
    import org.bukkit.plugin.java.JavaPlugin;
    
    public class Breathe extends JavaPlugin {
        public void onDisable() {
            System.out.println(this + " is now disabled!");
        }
    
        public void onEnable() {
            this.getServer().getPluginManager().registerEvent(Event.Type.ENTITY_DAMAGE,new EntityEvents(), Event.Priority.Normal,this);
            System.out.println(this + " is now enabled!");
        }
    
        public class EntityEvents extends EntityListener
        {
            @Override
            public void onEntityDamage(EntityDamageEvent event)
            {
                if(!(event.getEntity() instanceof Player)) return;
                Player player = (Player)event.getEntity();
                if(!player.hasPermission("breathe.use")) return;
                if(event.getCause() == EntityDamageEvent.DamageCause.DROWNING) event.setCancelled(true);
    
            }
        }
    }
    
    Download

    Change Log
    • 1.0
      • First and final release.

    This post has been edited 1 times. It was last edited by SwearWord Aug 21, 2011.
  2.  
  3. Offline

    JagCraft

    Nice and simple. I'm gonna use this forsure.
  4. Offline

    SebbeG17

    Im looking for a quick answer:
    My dosent work, i have the latest craftbukkit, and the latest of this. I have the Breathe.jar in the plugins folder, and then i have the permission node breathe.use But when im going underwater everything seems normal, and after a little while i die like normal.
    This dosent work or do i anything wrong ?
  5. Offline

    sh4nks

    nice! i really like small plugins :)
  6. Offline

    SwearWord Community Staff Moderator BukkitDev Staff

    dev.bukkit.org profile:
    SwearWords
    My Plugins
    SuperPerms, upgrade.
  7. Offline

    Subject0017

    Does this Support EssentialGroupManager if so Great I will get it :D
  8. Offline

    Celeixen

    dev.bukkit.org profile:
    Celeixen
    My Plugins
    Sorry dude it doesn't see... player.hasPermission("breathe.use") <-- that is for the bukkit built in superPerm system only :p
    But anyway i suggest you update to something like bPermissions anyway its much better and can import groupmanager settings anyway.
  9. Offline

    SwearWord Community Staff Moderator BukkitDev Staff

    dev.bukkit.org profile:
    SwearWords
    My Plugins
    Sigh.

    SuperPerms is not a plugin. bPerms is a super perms manager. It tells player.hasPermissions when to return true.
  10. Offline

    Celeixen

    dev.bukkit.org profile:
    Celeixen
    My Plugins
    umm derp thats what i said. i am a plugin dev Btw, maybe you should read what i said again, i was just helping the other guy.

    I clearly was stating that he should upgrade from Groupmanager (a permission managing plugin) to bPermissions (One of the new permissions managers). I referenced the source code, trying to show that group manager does not support that type of permissions management.Also why would i say "built in" to bukkit if i think superPerms is a plugin?

    You be trolling?

    This post has been edited 3 times. It was last edited by Celeixen Sep 14, 2011.
  11. Offline

    SwearWord Community Staff Moderator BukkitDev Staff

    dev.bukkit.org profile:
    SwearWords
    My Plugins
    I thought you were talking to me and telling me to update this for bPerms.

    Either way, "I am a plugin dev." Don't make me laugh.
  12. Offline

    Celeixen

    dev.bukkit.org profile:
    Celeixen
    My Plugins
    Ohh, i thought you were trying to be really condescending which you still are but meh (it was pretty clear that i quoted that guy). I am not trying to start a war or anything because you seem like a cool guy but really a lot of the plugins you have made are pretty basic,Although careers does look interesting :p

    I understand that i don't have many plugins yet or the title but i decided to release one in the last week. And the only reason i refereed to being a "plugin dev" was because all of my plugins use superPerms, and it would seem pretty stupid if i didn't even understand my own plugin.

    This will be the last thing i post because i don't wanna hijack this thread :)
  13. Offline

    SwearWord Community Staff Moderator BukkitDev Staff

    dev.bukkit.org profile:
    SwearWords
    My Plugins
  14. Offline

    Celeixen

    dev.bukkit.org profile:
    Celeixen
    My Plugins
    Fair enough, i get where you are coming from. Now next time when i quote a guy thats not you, can you read it twice before responding and making everything really confusing for me because i was like wtf did he mean to tag the other guy? why is he saying to me what i just said :/

    and if you want ill delete all these of your post so doesnt ruin your plugin wall.
  15. Offline

    SwearWord Community Staff Moderator BukkitDev Staff

    dev.bukkit.org profile:
    SwearWords
    My Plugins
    @Celeixen
    Relax it doesn't matter, I thought you were quoting yourself for some reason, it was my mistake.
  16. Offline

    Opterongeek

    Can anyone tell me if this works for 1.8 bukkit with PermissionsEX? Really getting tired of the door trick ;)
  17. Offline

    SwearWord Community Staff Moderator BukkitDev Staff

    dev.bukkit.org profile:
    SwearWords
    My Plugins
    Yes it does.
  18. Offline

    CeramicTitan

    broken link, buddy
  19. Offline

    SwearWord Community Staff Moderator BukkitDev Staff

    dev.bukkit.org profile:
    SwearWords
    My Plugins
  20. Offline

    CeramicTitan

  21. Offline

    CeramicTitan

    sorry but its not on bukkitdev
  22. Offline

    AS1LV3RN1NJA

Share This Page