mcMMO Combat Level
mcMMO Combat Level
Displays a combat level above users heads and in chat based on their mcMMO stats that affect combat:
- Unarmed
- Swords
- Axes
- Archery
- Acrobatics
- Taming
Default combat formula
(Unarmed + Swords + Axes + Archery + (.25 * Acrobatics) + (.25 * Taming)) / 45
Each stat's weight on the combat formula is capped at level 1000, so the maximum combat level possible is 100, and minimum is 0.
Installation
- You need the mcMMO plugin first.
- Download McCombatLevel.jar
- Place in your server's plugins folder
- Run your server to generate the config
- Edit the config to your liking
- Reload the plugin or restart the server
Config
- enable_prefix : True by default, this is the prefix to the left of the name in chat. You can also choose [combatlevel] in your chat plugin
- enable_tag_level : True by default, this is the level that appears above the player's head
- tag_name : "Combat" by default, this is the text that appears after the level above the player's head
- tag_color : GREEN by default, this is the color of the tag_name
- prefix_bracket_color : GOLD by default, change the color of the brackets in the level prefix
- prefix_level_color : DARK_GREEN by default, change the color of the level in the prefix
Permissions
This plugin requires no permissions to operate. If you wish to edit someone's combat level, you must change their mcMMO stats using /mmoedit to gain the required combat level.
Commands
/level or /combatlevel displays current player combat level.
Please use the Tickets for any issues, errors or suggestions.
https://github.com/games647/McCombatLevel/issues
Source
You don't have to decompile the plugin. You can find there the source code with comments and building utilities.
McCombatLevel is open source and hosted on GitHub; feel free to fork, star, or contribute by making pull requests and opening issues.
Hey! Great plugin man! I wondered if you could make it so you can edit the max combat level in the config. And maybe have this in the config too: people can change to have Combat before (Combat) over their heads, so it will say example: Combat 36 instead of 36 combat. and maybe add so when you are 5 combats (configureable) higher than a person, you will see their Combat and number in the chat, green instead of a configured color. and when they are just 4 combats below you, they get more and more yellow until they are the same combat as you. Then they are completely yellow and get more and more red until they are 5 combats higher than you, and then they are completely red.
I love it! Please make it so you can change the formula, that would be appriciated!
Added in 1.7
@Mrphpfan
Also, when using a scoreboard, your combat level becomes invisible to all other players. Is this fixable? Finally, can this plugin be made to work with McMMO Tag API? (Plugin that colors usernames based on McMMO parties) Currently, with both plugins installed, anyone who is in an McMMO party with you or is in an allied McMMO party will have a combat level of 0. Sorry for going on and on. Thank you in advance for your assistance.
@Mrphpfan
How can I make this work using EssentialsChat and Colorme? The prefix for combat level shows up in the console, yet will not show up in game. Thanks in advance.
Is it possible to add a permission for using the combat level show under player name? as of now, it is not working with mcmmo or myrpg level system. turn them off but still not showing.
@Mrphpfan
Thank you for this awesome plugin!
Do you think, you can add support with bChatManager and myRPG? as of now, the combatlevel is in front of everything in chat.
Would be nice can be format it to includes the tags from those other plugins?
@madtomic
It will still work even with that error, but thank you for reporting. I've submitted a new file with the fix to that error which should be available once it gets approved. Thanks!
@Mrphpfan
Thank you, that issue is fix but this is new error.
[17:54:54 INFO]: [McCombatLevel] Enabling McCombatLevel v1.2 [17:54:54 ERROR]: [McCombatLevel] McCombatLevel v1.2 attempted to register an in valid EventHandler method signature "public boolean com.gmail.mrphpfan.McCombatL evel.onCommand(org.bukkit.command.CommandSender,org.bukkit.command.Command,java. lang.String,java.lang.String[])" in class com.gmail.mrphpfan.McCombatLevel [17:54:54 INFO]: [McCombatLevel] McCombatLevel Enabled.
@madtomic
The issue you were experiencing should be fixed with version 1.2, for CB 1.7.2-R0.3. Just download the newest McCombatLevel and it should work. If you are now using a newer dev version of bukkit, let me know which it is and I will get it working on that version. I pmed you about the issue, we can talk more there if it's still giving you errors.
@Mrphpfan
Anything I can do to make this plugin work on my server or wait for you to update this? I really like this. :)
@madtomic
Issue is fixed now. Thanks for reporting.
i'm using cb1.7.2-r0.3 but i have no idea why this is happening when I log on. anyone can help?
[10:07:35 ERROR]: Could not pass event PlayerJoinEvent to McCombatLevel v1.1 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja va:320) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav a:62) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.j ava:486) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j ava:471) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.PlayerList.c(PlayerList.java:225) [craft bukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.PlayerList.a(PlayerList.java:116) [craft bukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.LoginListener.c(LoginListener.java:78) [ craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.LoginListener.a(LoginListener.java:42) [ craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.NetworkManager.a(NetworkManager.java:149 ) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.ServerConnection.c(SourceFile:134) [craf tbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:6 55) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:2 50) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:5 45) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java :457) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:6 17) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] Caused by: java.lang.IndexOutOfBoundsException: Index: 0 at java.util.Collections$EmptyList.get(Unknown Source) [?:1.7.0] at com.gmail.nossr50.util.player.UserManager.getPlayer(UserManager.java: 94) [?:?] at com.gmail.nossr50.api.ExperienceAPI.getLevel(ExperienceAPI.java:370) [?:?] at com.gmail.mrphpfan.McCombatLevel.updateLevel(McCombatLevel.java:206) [?:?] at com.gmail.mrphpfan.McCombatLevel.onPlayerJoinEvent(McCombatLevel.java :165) [?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [?:1.7.0 ] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [?:1.7.0 ] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [?:1 .7.0] at java.lang.reflect.Method.invoke(Unknown Source) [?:1.7.0] at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja va:318) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] ... 14 more
Great plugin, I love it :) Is there a possibility to add a command like /combatlevel which will then display the users combat level, since a user cannot see his own combat level :)
@Xemnian
The issue is fixed with the new download.
When placing this jar into my plugins folder nothing seems to generate. I'd very much like to use this plugin for my server but I've never come across one that fails to even generate the files. I receive the following error:
07:09:32] [Server thread/ERROR]: Could not load 'plugins\McCombatLevel.jar' in folder 'plugins' org.bukkit.plugin.UnknownDependencyException: ChatManager at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:201) [spigot.jar:git-Spigot-1322] at org.bukkit.craftbukkit.v1_7_R1.CraftServer.loadPlugins(CraftServer.java:355) [spigot.jar:git-Spigot-1322] at net.minecraft.server.v1_7_R1.DedicatedServer.init(DedicatedServer.java:135) [spigot.jar:git-Spigot-1322] at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:437) [spigot.jar:git-Spigot-1322] at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [spigot.jar:git-Spigot-1322]
@Eljoex
I have not tested it, but I assume they would conflict, at least the above-head tag part. Can always disable that part in the config, and then combat levels will only display next to names in chat.
How does this interact with the HealthBar plugin?
Could you make this plugin handle all things mcmmo? Not just combat? I would love it if there was an overall level of everything.