[INACTIVE][FUN] Fight v1.1.4 - Arena Type Battles [740]

Discussion in 'Inactive/Unsupported Plugins' started by Deminetix, May 5, 2011.

  1. Offline


    Fight - Arena Type Battles
    version 1.1.4 | Download | Source | Requires Permissions
    • PVP Arena style!
    • Two Teams (Red and Blue)
    • Customisable classes
    • Easy to set up
    • Almost commandless (one to join, one to watch)
    • Permissions support
    • iConomy(v5+) and item rewards support
    Arena Setup Suggestion

    How to use
    1. Type /Fight and you will automatically be chosen a team (Red or Blue) and teleported to that team lounge.

    2. Punch a sign with the class you want to be, your name will be added to an available slot on the sign and the class items will appear in your inventory.

    3. Punch it again to remove your name (and the items) if you want to choose a different class

    4. Once your team is ready (Everyone has picked a class) punch the Iron Block, when both teams are ready you will be teleported inside the arena, BATTLE BEGINS!

    5. Players that die will be teleported to the spectator area to watch the rest of the fight

    6. When only one team is left standing everyone will be teleported out and the winning team announced! They get bragging rights!
    How to set up
    1. Download and put Fight.jar in your plugins directory

    2. Boot your server to generate the config.yml file in plugins/Fight directory

    3. Edit the config.yml file and add your own custom classes and rewards, here is an example:
                        items: 261,262:64,298,299,300,301
                         items: 272,310,311,312,313
                         items: 276,306,307,308,309
                         items: 259,46:2,298,299,300,301
                     amount: 0
                     entry-fee: 0
                     items: none
      - Items must be written: <itemID>:<amount>
      - If no item amount is specified it will be 1
      - Seperate each item with a comma

    4. Add the permissions for users (fight.user) and admins (fight.admin)
      Permissions is REQUIRED

    5. Boot up your server and set the Waypoints by typing /Fight <command> (see commands below)

    6. Create a sign in each lounge for each class you have added.

      - The top line is the name of the class you have in config.yml - typed exactly (eg "Ranger" or "Tank")

      - The second line is unused so i put "------------" to make the class underlined
      - The bottom two lines are used for putting the players name on it.

    7. Each lounge needs an Iron Block. When it is punched and both teams are ready (chosen classes) the fight will begin.

    8. I recommend using WorldGuard or something to protect your arena from being destroyed.

    9. If you want destructible terrain inside the actual arena, you should use WorldEdit's blueprints commands to save and load the finished blueprint after each fight. I may try to incorporate this into Fight in the future.
    • Admin Commands

      /Fight redlounge - Sets the Waypoint for the Red team lounge

      /Fight redspawn - Sets the Waypoint in the arena where Red team starts

      /Fight bluelounge - Sets the Waypoint for the Blue team lounge
      /Fight bluespawn - Sets the Waypoint in the arena where Blue team starts

      /Fight spectator - Sets the Waypoint where spectators go, and where players go when they die in the arena.

      /Fight exit - Sets the Waypoint players will go to when they type /Fight leave

    • User Commands

      /Fight - Automatically picks a team and warps you to that lounge
      /Fight watch - Warps your to the spectator area
      /Fight leave - Leaves the team your on, and the fight
    Very simple permissions structure
    • fight.admin - Allows you to set up the Waypoints
    • fight.user - Allows you to Fight!
    To Do Now
    • Not sure!
    • Destructible terrain that reloads after a Fight finishes
    • Support multiple Arenas
    • Save and Restore inventory before/after a Fight
    • Leaderboards
    • Lives - So you can seek revenge!
    • Manually choose team (with command /Fight <Blue/Red>) (optional to admin)

    • v1.1.4(12th May 2011)
      When player disconnect/logout/crash player is removed from team properly and you can still fight again!
      Players get health refilled after a fight
      Hopefully a lot of bugs are gone with this build.
    • v1.1.3 (11th May 2011)
      When a player disconnect/logout his name is removed from signs
      You can no longer teleport out of a fight using /home or /spawn or anything else
      Entry fees for iConomy users - in config file under the node rewards.entry-fee is now charged to player who join a team
    • v1.1.2 (9th May 2011)
      Parentheses bug with rewards system - Now correctly configures config file on first run (do not use parenthesis)
    • v1.1.1 (9th May 2011)
      Fixed bug where respawned players permanently go to spectator area
      Added an Exit waypoint - Players go here when they type /Fight Leave
    • v1.1.0 (9th May 2011)
      Added iConomy support and item rewards for the winning team
      Fixed all major bugs, no item cheats, no problems with fights
    • v1.0.2 (7th May 2011)
      You can no longer drop items
      Fixed a bug when players used /Fight before setting waypoints

      Inventory now gets cleared properly when a fight finishes
    • v1.0.1 (7th May 2011)
      Fixed a bug with config file
    • v1.0 (6th May 2011)
      Initial Release
    frastie, PinkHell, jjoonn222 and 6 others like this.
  2. Offline


    I don't think an arena should be generated. That way people can build their own.
  3. Offline


    There should be a option for it? I would like this arena thats why i suggest. :p
  4. Offline


    Thank you so much for adding the no warping. But now every time I do /fight I fall through the floor but I can use a warp to the same location and the doesn't happen and if someone dc's or we both leave fight and try to start another it says a fight is in progress . Also I would like to see a way to use deferent arena's like /fight (arenaname) .
  5. Offline


    I'll use it once it's cleaned up a bit. :) Add a few more things like

    Multiple Arenas
    Other more configurable things i can't think of
  6. Offline


    Got to love a programmer who fixed bugs that fast!

    Big up to you and love the plugin, Keep it updating =), leaderbord ftw! :p
  7. Offline

    Bob Barker

    How come I get this error:
    [SEVERE] Could not pass event PLUGIN_ENABLE to Fight
    java.lang.NoClassDefFoundError: com/iConomy/iConomy
    at me.ashconnell.Fight.FightServerListener.onPluginEnable(FightServerListener.java:30)
    at org.bukkit.plugin.java.JavaPluginLoader$34.execute(JavaPluginLoader.java:408)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:257)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:633)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:218)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:116)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:94)
    at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:287)
    at org.bukkit.command.SimpleCommandMap$ReloadCommand.execute(SimpleCommandMap.java:201)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:85)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:247)
    at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:394)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:379)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
  8. Offline


    You need the latest version of iConomy (v5.0+)
  9. Offline


    I cleaned up the stack trace a bit to the important part. Willing to bet even a non-programmer can figure out what the issue is here.

    (just in case not, it's complaining that it can't find iConomy because you don't have it installed, and that's a dependency for this mod)
  10. Offline


    For some reason older version of iConomy don't register with the com.iConomy.iConomy... only the latest one does.
  11. Offline


    I try to use admin commands to set up spawn points, but I get this error:

    21:58:31 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'fight' in plugin Fight v1.1.4
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:8)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:55)
            at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandlerjava:677)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:640
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:634)
            at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
            at net.minecraft.server.NetworkManager.a(NetworkManager.java:195)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:74)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:370)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Caused by: java.lang.NullPointerException
            at me.ashconnell.Fight.Fight.hasPermissions(Fight.java:372)
            at me.ashconnell.Fight.Fight.onCommand(Fight.java:196)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
            ... 12 more
    How can I fix that? I'm really excited to use this plugin.
  12. Offline


    Show me your permissions setup. Also make sure you have the latest version of permissions.
  13. Offline


    This is my setup on Permissions 2.0 I believe (I can't download 2.1 for some reason):

    # Supports "Default" and "GroupUsers"
    system: default

    # Groups can contain inheritance.
    # To make a group inherit the permissions from another
    # group simply place the groups name in the "inheritance:"
    # field seperated by commas.
    # Example: inheritance: Default,Admins,
    # All permissions including the asterisks must be placed in single quotes.
    # like so:
    # - 'general.spawn'
    # Otherwise errors will happen!
    # Globalized Permission settings:
    # If a permission contains periods (.) you can denote a globalized parameter:
    # - 'general.*'
    # This will allow you to use all general commands.
    # Single Asterisk denotes all commands:
    # - '*'
    default: true
    build: true
    - 'general.spawn'
    default: true
    build: true
    - Default
    - 'general.time'
    - 'general.teleport'
    - 'general.teleport.here'
    - 'general.player-info'
    - 'fight.user'
    default: false
    build: true
    - Moderator
    - '*'
    - 'fight.admin'

    # DarkGrave has control over all commands.
    # sk89q can use /spawn & /time
    group: Admins

    I'm quite new to Permissions so I'm not sure how correct it is.
  14. Offline


    That is correctly set up - but please download Permissions(phoenix) v2.7.2+

    The one you have is the outdated one i think - they made a fork of it
  15. Offline


    Ok thanks I'll try that and get back to you if I have any trouble
  16. Offline


    In Fight.java line 556, try changing:

    if(rewardItems != "none"){



    in Java, == and != compare object references and not string values, so even though rewardItems might be a String with the value of "none", it is a different String object than the "none" String object literal on the right side of the comparison. Using the .equals() method of String actually compares the string values. I put "none" on the left side even though it looks unnatural because it protects from a NullPointerException in the event rewardItems happens to be null. Without this change, the value of "none" is making it into the if() statement and line 569 is trying to parseInt("none"), which is the source of the Exception.

    Also adding try{}catch{} in your FightDeathListener:eek:nEntityDeath should prevent the server crash I was seeing in the event that other bugs crop up. I'm not a bukkit/MineCraft developer (yet), so I'm not sure what standard protocol is for dealing with caught exceptions in this environment, but usually it consists of sending it to a log object somewhere so it shows up in the server output and can be debugged by users sending in the stack trace.

    Thanks for your work on this mod, you've done a great job for being so relatively new to Java!
  17. Offline


    Wow your very helpful. I have to work on some client work atm but i will definately be having a look at what you have mentioned. Thank you for helping me to improve the plugin and my code!
  18. Offline


    To do now:
    Add a tweak so it converts to ops if there are no permissons! Please? :)
  19. Offline


    I am tidying the code up and will be trying to catch errors so I dont crash peoples clients first. Then I will ad op support and a few other things.
  20. Offline


    :D yay cleaning up.

    Could possibly make it so that people could also just use signs as well?
    (I personally hate commands.)

    I think something similar to what you had with the "kits" would be awesome.


    [ [Red - Town Arena] ]
    [ Name ]
    [ Name ]
    [ Name ]

    [ [Red - Town Arena] ]
    [ Name ]
    [ Name ]
    [ Name ]

    Allows 6 people to right click a respective side to join the rosters.
    Then allow for a "grandmaster" (who would be an admin) to start the fight. =)

    [ [Red - UndergrndArena] ]
    [ Name ]
    [ Name ]
    [ Name ]

    [ [Blue - UndergrndArena] ]
    [ Name ]
    [ Name ]
    [ Name ]

    Would then allow for 3 on each team. tied to a different arena (that was setup with admin commands, because i don't mind admins using commands. I just like making things simple for the people playing, and we already have a LOT of commands for them.)

    You tie the amount of signs to the amount of people. (because we can have up to 20 people on our server. XD most of which like to fight)

    But limit to three signs and you have 9 v 9 pvp. (With 9 blocks being the size of the crafting table. Which is how our server is setup.)

    I know you just said you're cleaning up code, but just an idea to throw out there about something.

    XD I already gave a big design decision to another plugin this week so honestly, I'll just be content with your honest opinion, no need to randomly actually add it within a day of me asking. xD (that was awesome how that worked out though...)

    Tho the very last cool thing would be to allow for specific towns in Towny to have a predetermined "team" that, if they tried to join the other team, it would say "You need to join the team your town supports!" or something.

    >_> (Sadly, my associate who works with me on our server decided to go the route of Socio-economic with eventual industries rather than "Lets dig dig dig and we dig dig dig and we dig the whole way through" minecraft.)
  21. Offline


    Very good idea - And yes a lot of plugins rely on commands but i think there is a way to do everything without commands (for the users, not the admins) if you just sit down and think about it.

    For multiple arenas i was thinking of using /fight <arena-name> <command>
    And use /fight list to list arenas that have been set up

    Once that is working well it is quite possible to add a feature so that players can join an arena by simply walking up to the front door (or gate, or chamber) and walking onto a telepad that teleports you into the team lounge.

    Most servers have the /warp plugin so you could set warps to the outside of the arena. This way you dont have to use another command /fight, you just use /warp which people are already familiar with

    Just throwing ideas out
    Rytharr likes this.
  22. Offline


    Lol I have already suggested using signs instead of commands but anyways here are my improvments to your ideas :

    - Sign based fight join : Use signs to execute the fight command and also clear the inventory (or store the items in a chest). Here is the syntax :

    Line 1 : [Join arena]
    Line 2 : [<Arena Name>]
    Line 3 : [<No. of players> / <max capacity>]
    Line 4 : [Arena manager's name]

    The sign will also provide some info about the arena, The sign will be automaticly updated as soon as a player stands 1 block away.

    - Teleport pad entrance : By createing a teleport pad, every player that will step on the pressure plate will be teleported to the arena.
    The pads will be created like the blue telepads plugin (except maybe for the sign below the lapis block).

    - Lobby Waypoint : Add an optional waypoint that will be used as a lobby. Players will be teleported to the lobby after the fight if no exit waypoint set.

    - Exit room : You will be able to set an exit room (by just setting an exit point) and place another teleport pad, that will lead to the lobby.

    That's it, I will be glad if you comment and tell me what you think about that.
  23. Offline


    Ya the recent update fixed my major bugs :D I turned off the fly hack kick so people don't suddenly d/c anymore.
    I think signs are a better idea than command. Its just more intuitive to hit a sign then to type out a command for most of my users :p They prefer hitting buttons
  24. Offline


    After a fight verything is ok , but when i try to start a new figght i get "a fight is allready going"
    and i cant enter, what can be the problem?
    getting this error allso ...
  25. Offline


    The fight already going was a bug from an older version - download v.1.1.4 and let me know if that works.

    Also, the bug you described from pastebin is my bad coding - If you remove the text 'none' from the config file under rewards -> items: then it will work

    Ill fix it some time soon
  26. Offline


    downloaded, did not worked i will try to delete the folder to ... thanks
    "version 1.1.3 | Download"

    where can i download 1.1.4 ?
  27. Offline


    Woops that is the right link hehe
  28. Offline


    remember the problem with the inventory?
    well I found a solution - portal stick's region manager.
    you can define a region that when people step into the region they get thier inventory cleared and they will only have a stick and all thier inventory is being saved. after leaving the region they get the items back, check it out and maybe you will be able to use thier code to make the inventoy save feature work
  29. Offline


    Heey again!
    This is what i posted before but i think you fergot to read it ;) because you didnt answer it jet but you answered the qeustions on the next page. So i tought lets post it again because i realy wanna play arena's And i hope you can help me :)
  30. Offline


    Well, try to download the latest version of permissions (currently 2.7.2) and then set it again the same way you did (just add the Fight.user permission to the default group, you don't need to add it to yourself because you got - '*' which means that you got all the permissions no matter what)
  31. Offline


    If you edit the config file and try to change the entry fee, you get an error, the only ways to bypass it that i know of are deleting the : or deleting the config file and letting fight rewrite it.

    I think a cool feature to add to this would be the ability to place doors at the team spawns and make it so they cant be opened, then have a 5...4...3...2...1... countdown and open the doors for both teams simultaneously

    Also a note for people using this, the pitfall mod lets you make awesome traps in your arenas.

Share This Page