PVP Log Warner
Command prevention and fire/tnt/potion detection is pending acceptance of v9005 by Our Glorious Moderators
LATEST RELEASE: YOU WILL NEED A bannedcommands.yml FILE TO KEEP PLAYERS FROM USING COMMANDS TO ESCAPE PVP
Overview
Sick of people logging out during PVP to prevent death? We can detect their misbehavior and punish them accordingly, motivating people to stop this behavior.
Features
- PVP logging detection, with customizable sensitivity
- Punishment for PVP logging is customizable, with the ability to do any server command. This includes banning, as well as other commands from other plugins.
- Optional messages to moderators that are logged in, so they can be notified of PVP logging.
- The optional messages to moderators are completely customizable, with different color options as well. See the section below on "Messages With Custom Colors and Player Names"
- Able to reload the config.yml file while running with the /pvpwarn reload command and the right permission
- Stops players from using commands. Note: a bannedcommands.yml needs to be created for this feature to work
- Detects player to player damage, fire, TNT, arrows, enchanted weapons, and potions
Installation
Simply place the jar file into your plugins folder and start your Bukkit server. A default configuration file will be generated the first time it is run. To have it stop player commands while in PVP, look at the bannedcommands.yml. You will need to make your own since every server has different commands that could be used to escape PVP
Permissions
- pvpwarn.warnuser - Permission for which players to warn when a player has PVP logged. Default: OP
- pvpwarn.reload - Permission for which players can use /pvpwarn reload. Default: OP
Commands
- /pvpwarn reload - used to reload the config.yml file. Need "pvpwarn.reload" permission to do this.
Configuration
PLEASE SEE bannedcommands.yml FOR HOW TO HAVE IT STOP COMMANDS
- letOPpvplog - This is true/false on whether we are to allow OPs to PVP log with impunity. If this is false, then whenever an OP triggers PVP logging, he is treated like a normal player, and mods are warned of it as well as the command is executed. NOTE: SOME COMMANDS LIKE /tempban FROM ESSENTIALS DO NOT WORK ON OP'd PLAYERS. Default: false
- timeamount - This is to check for how long ago a player has been hit by another player before triggering a PVP logging. Value is in seconds. Default: 3
- healthamount - This is to check for how much health a player must have in order to NOT trigger an event. If a player has this much health or more health than this value, they are NOT considered to be PVP logging if they leave. Value is in HALF hearts. Default: 6
- tellmods - This is true/false on whether to tell people with "antipvplogger.warnuser" permission whenever someone does PVP logging. Default: true
- modwarn - This is a string that tells governs what warnings moderators get whenever a player PVP logs.
- command - This is the command that will be called when player PVP logs. It can be any command executable from the server console. You can use &&p to substitute the name of whatever player PVP logged in as part of the command. Do not put a slash at the beginning. Default: none.
Messages With Custom Colors and Player Names
The warning strings can have colors in them, as well as the player name. To do so, include the following codes into your warning message in the configuration file.
- &0 - makes text after it black
- &1 - makes text after it dark blue
- &2 - makes text after it dark green
- &3 - makes text after it dark aqua
- &4 - makes text after it dark red
- &5 - makes text after it dark purple
- &6 - makes text after it gold
- &7 - makes text after it gray
- &8 - makes text after it dark gray
- &9 - makes text after it blue
- &a - makes text after it green
- &b - makes text after it aqua
- &c - makes text after it red
- &d - makes text after it light purple
- &e - makes text after it yellow
- &f - makes text after it white
- &&p - replaces the '&&p' with the player name of whomever PVP logged. You can also use this for the Command
Suggested Use
It works with any other plugin as well, so you could configure it to subtract from their iConomy money, tokens, or other things as punishment. You could even combine this with a plugin to kill the player and drop all their inventory, so they'll log back on dead and needing to respawn. The possibilities are endless.
Or you could just leave it at warning moderators, letting them to do as they please on a case by case basis!
Upcoming Features
Tracking how often someone PVP logs, long term. With that I'll be: Adding a /pvpwarn [playername] command that tells how many times a player has pvplogged (and when).
update to 1.5.2:D need a plugin like this
Could you opensource this to github or something? With factions, when you hit someone in safezone, it still counts as attack. I would like to see if lowering de event priority fixes this, or otherwise integrate it with said plugin.
Thank you, great plugin BTW!
Oh, i just saw this isn't working.
But anyways, here an error: http://pastebin.com/sQi45KUJ
Please add a feature to disable flying while PVP'ing
Sorry for late response. FYI, this is not abandoned, and I'm working on update to 1.3.1, since I heard that it isn't working anymore with it. @Enrux
I'm unsure what you mean by disable the health option, do you mean have it so that it only detects if people have been in battle recently, and not care if they were actually hurt badly? If that's what you mean, put it at 20, which is full health.
Use the kill command if you want players to drop their items and die, that functionality is built into that command if you have essentials installed.
Amazing plugin, cookies for you good sir.
The plugin is awesome, I think it would be nice to have this feature included in the plugin:
A way the player get killed when he quits so that items fall to the floor. (or this may work if I use the /kill cmd?)
And also is there any way to deactivate the health option? putting -1 work?
@fred0012100
EDIT: Added in fire, TNT, and potion damage to trigger pvp events. Look for version 9005 to be approved in the next couple of hours.
This plugin can do any command that can be done by the server.
For iConomy it would be the command:
money take &&p AMOUNT
and &&p should stay like that, the plugin will automatically change that to the player that is pvp logging.
Hello on mu server i have a map No pvp but people can use tnt,lighter and tnt for kill each other so i whant to know if this plugin can subtract money from iconomy (auto) and how Thank you very much :)
@joemort
Super
I will test the plugin on next Maintaince on the server! :)
@joemort
I was finally able to reproduce it, and I'm hoping that I've fixed it. I think it's a bukkit issue, as I was getting sent the logout event several hundred times when a person logged out just once. I made it as bulletproof as possible in version 9004, and it should be fixed now.
@Zardizstuhr
That's strange. I'll try to look into what could possibly cause that. Are you running any other plugins at the moment, and what are they?
@joemort
I use 2.9.1 Essentials And 9002 Pvp log warn
Spam ban. When a player is tag as Pvp logger! The console run the tempban command like 20 times in a row :)
@Zardizstuhr
thanks for that info. I have some good news and some bad news.
The good news is, I can fix whether or not it triggers when people log out after they have died very easily.
Unfortunately, I could not replicate your error message with essentials tempban, and I had it work flawlessly with the command given. Is there any chance you have an older version of either essentials or PVP Log Warner? Current essentials is 2.9.1, which is what i tested it with. Also make sure you have version 9002 of PVP Log Warner, as it did have a couple of fixes in it from the previous version. (Also watch for version 9003 which should be posted within the next hour, then whenever our glorious moderators decide to approve it you'll be able to download it).
Lastly, could you please elaborate what it means by it spams ban the person?
@joemort
healthamount: 6 tellmods: true modwarn: '&4&&p har pvp logged' timeamount: 3 command: tempban &&p 21600
And it also spam ban the person!
And also, if one die and he press back to menu instead of respawn it will run the command also and ban him!
@Zardizstuhr
Thanks for the info. I'll try re-creating that with essentials. Could you tell me what you had in your configuration file so I know what commands and messages to use to duplicate?
@evilmidget38
But it's the Tempban command?
@Zardizstuhr
Thanks for reporting that. I was looking through the stacktrace, and that's actually an error with Essentials and the /kick command. We won't be able to help you with that, you'll have to report it to them.
Just what I was looking for! :D
I get this error on pvp log
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:460) at net.minecraft.server.ServerConfigurationManager.disconnect(ServerConfigurationManager.java:179) at net.minecraft.server.NetServerHandler.disconnect(NetServerHandler.java:158) at org.bukkit.craftbukkit.entity.CraftPlayer.kickPlayer(CraftPlayer.java:213) at com.earth2me.essentials.PlayerExtension.kickPlayer(PlayerExtension.java) at com.earth2me.essentials.commands.Commandtempban.run(Commandtempban.java:51) at com.earth2me.essentials.commands.EssentialsCommand.run(EssentialsCommand.java:108) at com.earth2me.essentials.Essentials.onCommandEssentials(Essentials.java:379) at com.earth2me.essentials.Essentials.onCommand(Essentials.java:288) at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:166) at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:479) at org.bukkit.Bukkit.dispatchCommand(Bukkit.java:198) at com.gmail.joemort.PVPLogWarner.penalizePlayer(PVPLogWarner.java:32) at com.gmail.joemort.PVPLogWarner$DamageListener.onLogout(PVPLogWarner.java:101)