Spigot Moar Bows 2.6

Add 25+ unique bows to your server!

  1. Indyuce submitted a new resource:

    Moar Bows - Add new varieties of bows to your server!

    Read more about this resource...
    • Like Like x 1
    • Funny Funny x 1
  2. How does the plugin recognize each bow?
  3. I'm using EntityShootBowEvent (i do think this is not the simpliest way to do this)
    event.getBow() returns to an ItemStack so you just have to test if it has a special display name using ItemMeta
    if the bow has a display name, then i add the arrow to an HashMap<Arrow, String>
    (There is a different String for each type of bow: explosive_bow, fire_bow, etc.).

    You can then use a repeating task to send particles to the arrows that were shot by special bows
    You can then use entity.isOnGround() to test if they are on ground. If so, they you simply make the bow effects appply

    Finally, use EntityDamageByEntityEvent
    and test if event.getDamager() is an Arrow.
    If so, just recognize special arrows using the HashMap<Arrow, String> and apply the bow effects!

    I hope I helped you!
    If you like the plugin, please leave a rating! :)
  4. Indyuce updated Moar Bows with a new update entry:

    Update I

    Read the rest of this update entry...
  5. If I've correctly understood, you identify bows with their name, the one which is editable with an anvil, right?
  6. Absolutely! The one you can get with ItemStack.getItemMeta().getDisplayName().
    But i dont test the name of the bow for each bow, thatĀ“ld be way too long. Instead, i give the bows names a white color (&f color code), and just test (in EntityShootBowEvent) if the bow you use has that white color. I then add the arrow to the HashMap with the corresponding String (to recognize what type of arrow it is) and use a loop to send particles, etc.
    Hope i helped you! If you need help with the code, just tell me! :p
  7. Still, as all the bows have this white color tag, you cant just create them by renaming a normal bow with an anvil.
  8. 'kay thanks.
    2 things :
    Code (Text):
    [23:33:33 WARN]: [MoarBows] Task #2 for MoarBows v1.0 generated an exception
    java.lang.IllegalArgumentException: No enum constant me.Indyuce.mb.Bow.&FEXPLOSIVE_BOW
            at java.lang.Enum.valueOf(Unknown Source) ~[?:1.8.0_121]
            at me.Indyuce.mb.Bow.valueOf(Bow.java:1) ~[?:?]
            at me.Indyuce.mb.MainListener.loop(MainListener.java:98) ~[?:?]
            at me.Indyuce.mb.MainListener$1.run(MainListener.java:49) ~[?:?]
            at org.bukkit.craftbukkit.v1_11_R1.scheduler.CraftTask.run(CraftTask.java:71) ~[spigot-1.11.2.jar:git-Spigot-b4417b8-a552117]
            at org.bukkit.craftbukkit.v1_11_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:353) [spigot-1.11.2.jar:git-Spigot-b4417b8-a552117]
            at net.minecraft.server.v1_11_R1.MinecraftServer.D(MinecraftServer.java:738) [spigot-1.11.2.jar:git-Spigot-b4417b8-a552117]
            at net.minecraft.server.v1_11_R1.DedicatedServer.D(DedicatedServer.java:399) [spigot-1.11.2.jar:git-Spigot-b4417b8-a552117]
            at net.minecraft.server.v1_11_R1.MinecraftServer.C(MinecraftServer.java:678) [spigot-1.11.2.jar:git-Spigot-b4417b8-a552117]
            at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:576) [spigot-1.11.2.jar:git-Spigot-b4417b8-a552117]
            at java.lang.Thread.run(Unknown Source) [?:1.8.0_121]
    I don't know when exactly this error happens. I have it multiple times.

    And this :
  9. Thank you for posting these bugs! Theyll will be corrected in tomorrow's update.
  10. Indyuce updated Moar Bows with a new update entry:

    Update II

    Read the rest of this update entry...
  11. Can I configure Bow names?
  12. You can add config:
    + change name and lore bows (NBTEditor). Bows need have lore to use new varieties. Ex: &6&lBow:_&bIce
    + enchant (NBTEditor)
    + Permission use bows.
    + attribute items vd: MaxHeatlh (NBTEditor)
  13. Thank you guys for your ideas! The next update will allow you to change the bows' names and lores.
    I might also add a few permissions to use each bow.
    • Optimistic Optimistic x 1
  14. It looks perfect now. :D

    So I propose 2 things :3

    - 1 new bow : Artillery Bow or Railgun Bow
    A bow which creates an explosion which destroys the ground. It's a strong bow but it requires 2 condition : the shooter has to be in a cart placed on rails, and must wait some time between 2 shots.

    - 1 adding to Corrosive Bow
    If it's corrosive, it could destroy the block where it lands and the block below, if it isn't bedrock or obsidian.
    • Like Like x 1
  15. That sounds so cool! I'm adding it right now before making the name/lore update!!!
    • Like Like x 1
  16. Indyuce updated Moar Bows with a new update entry:

    Update III - Railgun and configurable items!

    Read the rest of this update entry...
  17. Better every day. :D

    Could you block composite bow and railgun bow from shooting when the cooldown is active or when the railgun bow's shooter isn't in a minecart ? Or just do something to tell the player that he can shoot again ? You could make particles, send a message with chat or action bar.

    And I noticed arrows don't activate their effect when they hit a boat (with 2 places).
  18. That's "kind of" normal. The arrows only activate their effects when hitting a living being/entity. It should normally don't work either on ItemFrames, Minecarts, and all these types of non living entities. I'll change this so arrows that normally apply their effects when hitting the ground also apply effect when hitting all type of entity. Thank you for reporting this "bug"!

    Adding this right now.