[MECH/FUN] BinaryBlood v0.5.1 - Make players/NPCs bleed using DoT! [670-1000]

Discussion in 'Inactive/Unsupported Plugins' started by Binaryclock, Apr 8, 2011.

  1. Offline


    BinaryBlood - Implements bleeding via a timed task at regular intervals. RPG players will recognize this as a DoT effect. This is a small section of the larger plugin called 'ClockMod.'

    Version: v0.5.1 - Compiled against RB 1000 (works and tested with 670 to 1000)

    BinaryBlood makes players and NPCs experience the joys of bleeding and incurring damage over time. Ever wanted to make that gold sword actually worth using in battle? Well your dreams have come true. One hit with that gold sword and you can do some great damage over time with the bleeding code.


    Detailed Description

    The plugin is heavily configurable. You can configure which items cause bleeding, the chance of the bleeding code executing when hit, the amount of damage each tick inflicts on the target, the amount of ticks a certain item makes a player bleed for, the messages displayed when a player is bleeding, the duration of delay between each tick, and much, much more!

    You can also make players bleed from breaking glass with their own bare hands! Make them pay for their stupidity!

    As an added Easter-egg, when a player is bleeding he/she can punch white wool and make it red (bleeding on the wool.) This feature like all other features can be disabled/enabled.

    Here is how you would add an item in to the configuration:

    # gold sword (283) - at least they aren't useless now!

    In the above example, item 283 is a gold sword. If you wanted to add a different item instead, just change the number after Item_ to any item in the data values wiki available here: http://www.minecraftwiki.net/wiki/Data_values


    All features can be enabled/disabled using the configuration file as I believe strongly in user configuration and customization.
    • Make players and NPCs bleed using any wield-able item in the database.
    • Highly configurable - can change every setting, display message, even the timing!
    • Punish players for breaking glass with their bare hands.
    • Bleed on white wool to make it turn red.
    • Permissions support
    • Developer support - use BinaryBlood to make players bleed from your own plugin! See below for details.

    Permissions Support:

    There is only one setting in Permissions:
    • 'binaryblood.nodamage' - If this permission is assigned, the player/group will not take damage when bleeding.

    WorldGuard Support:

    This plugin will detect PVP safe zones that have been set by the WorldGuard plugin. If an attacker attempts to initiate a bleed inside a PVP protected zone no bleeding will occur. However bleeding will still occur on a player who is hit outside of the PVP zone then runs back in to the PVP protection.​

    Please use these versions of WorldGuard/WorldEdit if you would like BinaryBlood to protect players from bleeding in PVP free zones:
    • WorldEdit 4.3
    • WorldGuard 5.0 alpha 8

    For Developers - Hook in to the bleeding code!

    Want to make your plugin make players bleed? Don't reinvent the wheel - hook in to the DoT bleeding code of BinaryBlood. Here's how:

    Details for Developers! (open)

    There are two main public functions that you can use from your package. Both of these functions are in the BinaryBloodPlugin class.
    • public void setBleeding( Player player, int ticksToBleed, int bleedingDamagePerTick )
      Allows you to add a player to the bleeding task. I think it's pretty self-explanatory with the variable names.​
    • public void setBleeding( LivingEntity le, int ticksToBleed, int bleedingDamagePerTick )
      Allows you to add an NPC to the bleeding task.​

    • public final HashMap<String,EntityBleeding> getBleedingList()
    Returns an unmodifiable list of players or NPCs that are currently bleeding. This is in a HashMap format with the player's name as the key. The EntityBleeding object is a public object that can be imported using:
    import com.binaryblood.EntityBleeding
    In order to find out if the EntityBleeding object is a player or an NPC, you can check it and cast it using the the following code:
    EntityBleeding eb;
    if ( eb instanceof PlayerBleeding )
       PlayerBleeding pb = (PlayerBleeding)eb;
       String name = pb.getName(); // player name
       // maybe some find player function to find the player object in one of the worlds..
    else if ( eb instanceof NPCBleeding )
       NPCBleeding nb = (NPCBleeding)nb;
       int id = nb.getUniqueId();
       String world = nb.getWorld();
       // maybe some function to find the NPC in the world called 'world' comparing the id.
    PlayerBleeding uses a "String name" member to identify the Player.
    NPCBleeding uses both the unique id of the NPC, and the world that the NPC resides in to check to see if you have identified the correct NPC.

    1. Add these imports, members, and functions to your main class that extends JavaPlugin. Usually this is contained in something like MyPlugin.java file.

    import com.binaryblood.BinaryBloodPlugin;
    import com.binaryblood.PlayerBleeding;
    import org.bukkit.plugin.Plugin;
    public static BinaryBloodPlugin BinaryBlood;
    private void setupBinaryBlood()
        Plugin test = this.getServer().getPluginManager().getPlugin( "BinaryBlood" );
        if ( YourPlugin.BinaryBlood == null ) {
            if ( test != null )
                YourPlugin.BinaryBlood = ( (BinaryBloodPlugin)test );
                log( "BinaryBlood plugin detected! Will implement bleeding code!" );
                log( "BinaryBlood plugin not detected. Not using BinaryBlood." );

    2. Where ever you wish to start a player bleeding, just call something like this:

    // check for BinaryBlood plugin.. if exists, let's make 'em bleed!
    if ( YourPlugin.BinaryBlood != null )
           player.sendMessage( "You did something really stupid.." );
           // sets player to bleed for five (5) ticks, damaging player one (1) damage per tick
           YourPlugin.BinaryBlood.setBleeding( player, 5, 1 );

    ..and the plugin will take care of the rest!


    Version 0.5.1
    • Compiled against 677
    • NPCs can now be damaged by bleeding code.
    • Improved destruct() code to properly unregister bleeding task and clear hashtables upon reload/stopping the server.
    • Rewrite/rename of classes to properly incorporate NPCs in the bleeding hashtables using inheritance. This means there are some minor changes to the developer API to interface with the bleeding code. Please see above developer section.
    Back Versions (open)

    Version 0.4.3
    • Compiled against RB 674
    Version 0.4.2
    • Developers can now hook in to the bleeding code and functions by using setBleeding( .. ). Details above.
    • Added "Loading BinaryBlood <version>" in console/logs when plugin loads.
    Version 0.4.1
    • WorldEdit and WorldGuard support for PVP areas. Will not cut players in PVP protected zones. However player will continue to bleed in PVP areas if the cut was started outside of the area.
    Version 0.3.1
    • First publicly available release.

    Troubleshooting and Support

    Any questions, comments, or bug reports please post in this thread and include:
    • Bukkit Version: <version>
    • BinaryBlood Plugin Version: <version>
    • BinaryBlood blood.config file, pasted to http://pastie.org

    Still Not Sold?

    If you would like to see this plugin in action, visit my minecraft server Thunderdome. The address is: thunderdome-mc.com

    Hope you enjoy it :)
    kahlilnc, Sir Savary and Finer1 like this.
  2. Offline


    Can you update it or load the old zips, where we can download and update it...
    Your website is not longer alive.

Share This Page