Inactive [FUN/DEV] MultiArrow v0.9.8 - Custom Arrow Types [1060]

Discussion in 'Inactive/Unsupported Plugins' started by ayan4m1, Jul 25, 2011.

  1. Offline

    ayan4m1

    MultiArrow - Custom Arrow Types:
    Version: v0.9.8

    This plugin would not be possible without the work of skeletonofchaos. Thank you!

    Left-click while holding a bow to select the next arrow type. Right-click to fire the selected arrow type. If you hold down the Sneak button (Shift, by default) when left-clicking, you can select the previous arrow type.



    Features:
    • Uses Bukkit permissions
    • Simple to use (no commands, configuration optional)
    • Extensible (developers can add their own arrow types easily)
    • Can give player(s) infinite arrows
    • Optional per-arrow required material
    • Optional per-arrow fee (requires iConomy 5.x)
    Included Arrow Types:
    • Explosive - Small explosion at the destination
    • Lightning - Lightning strikes the destination
    • Drill - Creates a hole under block/entity, great for catching animals
    • Water - Creates small patch of water at the destination
    • Torch - Places a torch at the destination or lights an entity on fire
    • Animal - Spawns (randomly) a pig, cow, sheep, or chicken at the destination
    • Teleport - Teleports you to the destination or a hit entity to a random destination
    Permissions:
    NOTE: This refers to Bukkit permissions, not the Permissions plugin. There are no '*' nodes in the new system, so you cannot give a user 'multiarrow.*'.

    You need to use the new Bukkit permissions system with this plugin. An excellent migration guide is available here. It will save you time and hassle down the road, as Permissions is no longer the safest, simplest way to protect your server.
    • multiarrow.use.all - Allows users to use all arrow types (default: op)
    • multiarrow.use.<name> - Allows users to use the <name> arrow type
    • multiarrow.infinite - Infinite arrows! (default: false)
    • multiarrow.free-fees - Skip iConomy fee check (default: op)
    • multiarrow.free-materials - Skip extra material check (default: op)
    Configuration:
    NOTE: If you are upgrading from MultiArrow v0.9.7 or earlier, please backup/delete your config.yml and allow MultiArrow to create a new one, as it has changed since then.

    If you desire, you can require a user to pay one unit of a given item to use a given arrow type. To do this, simply edit your MultiArrow/config.yml using the template below as a guide. To add a new requirement, simply add a line with the arrow type name as the key and the type id of the item as the value. Currently, you may only set one id for a given arrow type. If you want to use colored wool or dyes for this purpose, append a colon and the data value and then wrap it in single quotes (e.g. '35:4' for yellow wool). If you omit the quotes, the colon will break your config file until it is removed or properly quoted.

    Code:
    materials:
        lightning: 348
        explosive: 289
        teleport: '35:4'
        torch: 263
    
    You can also add lines to the remove-arrow section of your config.yml to control which arrows are removed after their effect triggers. The default is true for all arrow types (i.e. all arrows are removed after the effect triggers), so you should only ever set something to false here. Here's an example that allows you to reuse teleport arrows (thanks twiclo!):

    Code:
    remove-arrows:
        teleport: false
    
    If you use iConomy 5.x, you can charge players a fee to fire a given arrow type. Note that you MUST include a decimal point with all costs ("50" is incorrect, "50.0" is correct). The following is an example of how to configure this feature:

    Code:
    fees:
        teleport: 500.0
        animal: 10.75
    
    If you are using the fees functionality and would like the users to get a message containing their updated balance whenever a fee is charged, set the option below to true:

    Code:
    options:
        send-balance-on-fee: true
    
    Custom Arrow Types:
    You can easily add your own arrow types with a few lines of Java code. Get a copy of my source code from GitHub and then add your own class to the package com.ayan4m1.multiarrow.arrows. For the sake of example, let's say we want to create a Chicken-spawning arrow.

    Code:
    public class ChickenArrowEffect implements ArrowEffect {
    	public void onEntityHitEvent(Arrow arrow, Entity target) { }
    	public void onGroundHitEvent(Arrow arrow) {
    		arrow.getWorld().spawnCreature(arrow.getLocation(), CreatureType.CHICKEN);
    	}
    }
    
    Then, add your class name to the ArrowType enum. For example, if "ChickenArrowEffect" were the name of our class, we would add the following to ArrowType:
    Code:
    public enum ArrowType {
    	NORMAL,
    	CHICKEN
    }
    
    The plugin will automatically provide that type name as an option to the user, and will dynamically instantiate and run your ArrowEffect onEntityHitEvent/onGroundHitEvent methods whenever a user fires one of your arrows.

    If you have written a stable, interesting arrow type, reply here with a link to the source or submit a pull request from your personal fork to my GitHub repository.

    Download/Source Code:
    Download MultiArrow v0.9.8
    [​IMG]Source Code

    Roadmap:
    Version 1.0
    • Add support for all projectile entities (snowball, slime) with custom effects
    Version 1.5
    • Allow all configurable options to be set per-world
    Version 2.0
    • Configurable effect classes/options, each of which modifies base effect behavior (for easier selection)
    • Integrate simple scripting engine (LUA?) to facilitate Javaless custom effects
    Changelog:
    Version 0.9.8
    • Made compatible with CraftBukkit build 1060
    • Water created by water arrow is now temporary
    • Added send-balance-on-fee configuration option
    • Fixed exceptions generated by mobs firing arrows
    • Replaced old event detection code, significantly increased speed and lowered memory usage
    • Optimized event priorities to improve arrow type switching responsiveness
    • Refactored CustomArrowEffect to ArrowEffect, added TimedArrowEffect class for temporary/two-stage effects
    • Fixed invalid permission check for free-fees node
    • Fixed potential exception when doing required materials check
    • Improved log messages in configuration handler
    Version 0.9.7
    • Navigate backward by holding the sneak button
    • Fixed potential infinite loop on torch arrow hitting ground
    • Fixed invalid cast errors on survival servers (thanks mefisto1542!)
    • Added parsing for wool/ink data values (thanks Jade Knightblazer!)
    • Improved ground hit detection
    • Teleport arrow now sets player look pitch to 0
    Version 0.9.6
    • Fixed entities taking damage from arrows intermittently
    • Optimized event priorities
    Version 0.9.5
    • Completely overhauled ground detection, significantly improved responsiveness
    • Fixed bug where a drill arrow fired into snow caused an infinite loop
    Version 0.9.1
    • Fixed bug with last arrow type permission set to true resulted in exception during arrow cycling (thanks Jade Knightblazer!)
    Version 0.9
    • Added optional iConomy integration / configurable arrow use fee
    • Cleaned up code
    Previous Versions (open)

    Version 0.8.1
    • Explosive arrow now create EntityExplodeEvent/ExplosionPrimeEvent (fixes integration with explosive modification plugins)
    Version 0.8
    • Added 'multiarrow.infinite' permission for infinite arrows
    • More robust error handling
    Version 0.7
    • Added default config.yml creation
    • Made arrow removal user-configurable
    Version 0.6
    • Added Teleport arrow
    • Fixed effects triggering when arrow is fired straight up
    • Added snakeyaml and config.yml handling/parsing
    • Added optional "required item" for arrows
    • Cleaned up code
    Version 0.5
    • Added animal arrow, which spawns a random friendly mob
    • Changed light arrow to torch arrow
    • Torch arrow lights entities on fire
    • Fixed bug where light/torch arrow would not create a torch on top of snow
    • Explicitly unload async thread
    • Removed fire and sharp arrow types
    Version 0.3
    • Optimized memory usage
    • Clean up water/light arrows after their effect
    • Switched to dynamic class instantiation of CustomArrowEffect for increased modularity
    Version 0.2
    • Cleaned up BlockHitDetector, added reflection for custom arrows, added water/light arrow types
    Version 0.1
    • Initial release
     
    MaFiMa and BillabongBoy like this.
  2. Offline

    Tho-1528

    Could you please upgrade the plugin, so it is compatible with crafbukkit 1337?:)
     
  3. Offline

    Skepr

    Now if only this plugin will let you hold the attack button so they fly farther away, instead of the rapid shot that does like no damage. I was trying to use explosive arrows on a enderdragon, yeah....i died, a lot. And when I changed to normal arrows, they didn't fly far enough, can't hold back to charge the shot. So long it gets that fixed, i'll love this mod.
     
  4. Offline

    Dilluexe

    I had this plugin before but I got rid of it because it got rid of pull-back, is that fixed yet?
     
  5. Offline

    Duskye

    Hello, is there any way to disable the automated arrows? We would like all of the arrow types intact, but would like to actually pull back on the arrow.
     
  6. Offline

    gawelium

    Hi ! thank's for this funny plugin !
    An update for 1.2.4 ? please :)
     
  7. Offline

    USM666

    I am sorry to say this but: the plugin is great but the permissions is HORRIBLE.

    I cannot turn off any of the arrow features,all users get the arrow permissions and it cannot be removed. I cannot even turn off or remove certain kinds of arrows.

    To make things worse,the explosive arrows damage the map,even when I have Anti-Grief,TNT Heal and WorldGuard. It's a horrible design and it should obey all form of protection. It overrides these permissions and wrecks the entire world.

    I also noticed that someone else has the EXACT same plugin but with a different name,either it's stolen,copied or whatever. But they copied the entire programming for it.

    MagicArrows and MultiArrows are the same exact plugin,only a different name.
     
  8. Offline

    MrAverage

    USM666 Hey guy, have you even looked at MoArrows? Yes, MoArrows was -originally- an update AND expansion of the inactive MultiArrow plugin. However, over the course of several months, all but about 20-30 lines of code were completely rewritten for improvement and expandability. MoArrows now has over 1,000 lines of code so I find it hilarious that you think that this is somehow "stolen" or "copied" from a plugin that has been inactive for almost a year. Next time, do five minutes of research, then think before you type.
     
  9. Offline

    USM666

    How about you guys stop making duplicates of the same exact thing and giving them different names? Because I just encountered TWO more plugins that do the same exact thing.

    How do you like THAT research?
     
  10. Offline

    MrAverage

    When most people do research to back up an argument, they provide valid examples. Yeah there are 5-6 plugins out there that alter arrow mechanics in some way. To claim they are the "exact same thing" only makes you look ridiculously ignorant.

    Just because you payed your little $20 a month for a few months on a Multiplay server, doesn't make you an expert on what should and shouldn't be done with plugins, Bukkit, or Minecraft in general. Speaking of which, how's that brony hunger games server doing man? Haven't seen any users on today. Seems like a huge waste of time to complain about plugins when nobody even uses your server.

    Anyway, I've said enough about this here. If you have further issues with my plugin that you feel the need to address, discuss it in the MoArrows forum thread or on my Bukkit Dev project page.
     
    afistofirony likes this.

Share This Page