Anti-Relog

Now 1.5.2 fully functional! Download version 2.5 here!
Special thanks for Swifteh for keeping the plugin updated when I wasn't here!
New Features of Version 2.x.x
- Cleaner code.
- NPCs with option for aggressive combat mode. (or assign permission nodes for individual use see below)
- NPCs are compatible with Modifyworld
- Configuration messages now support colors.
- Customized option to drop items, armor, and experience (each handled separately).
- Commands can be run from the console when a combat logger is unbanned and logs back on.
- Fixed issue with MobCatcher.
- Automatic update notifications to the console.
What is Anti-Relog?
Anti-Relog is a lightweight and easy-to-use PVP plugin that prevents players from using commands during combat to escape from the opponent. With this plugin, players will not be able to simply warp to safety but will instead be forced to fight to the death. In the case of a player logging off to escape death, they will be killed instantly* before log-off and their items will drop as usual. If NPCs are enabled, an NPC will spawn in place of the combat logger. They will automatically be banned for a preset time to prevent them from logging on immediately. I made this plugin in response to a plugin request.
What Are This Plugin's Features?
This plugin is designed to be as flexible as possible with the server owner in mind. Below are the current list of features:
- Easy to install. Just drag and drop.
- Keeps players fighting and on the alert. No more escaping from battles.
- Players who log off before the battle ends are logged into a text file with time and date.
- Detects cause of player logoff so they are not banned if their client crashes in the midst of battle.
- Customizable messages and settings.
- Functions are togglable. This means that you can turn the settings off whenever you don't need them!
- PermissionsEx support.
- NPCs compatible with Modifyworld.
How to Install
- Download the latest build of Anti-Relog here.
- Download the latest CraftBukkit recommended build.
- Drag Anti-Relog.jar into the CraftBukkit plugins folder and start up the server.
- Configure the config.yml inside the generated Anti-Relog folder to your preferences and save.
- Reload the server.
Commands
Alias for /antirelog is /ar.
- /antirelog - Shows the plugin version.
- /antirelog t (or /antirelog time) - Shows the time left before player can use commands.
- /antirelog unban <player> - Unbans the selected player if they were banned through PVP logging.
Permissions
Nodes:
- antirelog.pvpbypass - Allows user to be exempt from all PVP restrictions. Allows use of commands in PVP and allows logging off without consequence.
- antirelog.unban - Allows user to unban players who were banned by PVP logging.
- antirelog.aggressivenpc - User will spawn a NPC which will fight the attacker in place of the player when the player combat logs.
NPCs
NPCs are designed to help prevent combat loggers from ruining the fun of PvP by continuing the fight after they log off. Regular NPCs (default ones) do not fight back but instead stay they and get killed. If you really want a challenge, turn the Aggressive Mode on in the config or give players who you want to spawn aggressive NPCs the 'antirelog.aggressivenpc' permission node. NPCs will drop all the player's items when killed and the player will lose all their items upon logging back on. If an aggressive NPC manages to kill the attacker, the combat logger will maintain their inventory and the NPC will despawn.
Configuration
Although there is already information about each config node embedded in the configuration file, below are links to more information regarding the config file:
Change Log:
Version 1.0:
- Release.
Version 1.1:
- Major bug fixes.
- Added more flexible options to toggle different functions.
- EXP and equipped armor will now drop if player logs off during PVP.
- Added custom ban messages that will be shown to the player.
- If server reloads when the player is still banned, instead of leaving the player as banned, the server will unban the player.
Version 1.2:
- Fixed compatibility issues with Factions, WorldGuard, Towny, and any Safe-Zones.
- Players will not be tagged if fighting against NPCs.
- Differentiates between client crash and intentional logout. Players don't get banned when they crash!
- Minor bug fixes and performance improvements.
Version 1.3
- Emergency Release.
- Completely changed the code around using a new method of tracking PVP which is 99% glitch free.
- No more glitching during PVP.
- Fixed permissions issues.
- Allows players to see the remaining combat duration using /ar t or /ar time.
- Fixed major issues regarding Citizens and Factions.
Version 1.4
- Added fix for some cases where players are able to PVP log without penalty.
- Added support for Heroes plugin.
- Added support for banning on servers in offline mode.
- Added command for unbanning players who were banned by PVP logging (regular unbans do not work!).
- Added option for PVP logging against Mobs (agressive/passive).
- Added option to toggle the killing of the player if they PVP log.
- Added ability for server owners to choose which commands they want to disable during PVP (allowing use of spells/PVP commands).
- Added ability to toggle the disabling of commands during PVP.
- Added ability to toggle all commands off during PVP.
- Plugin will now write the reason for the player's unban in the PVP log file.
Version 1.5
- Critical bug fix with /f home.
- Fixed error messages regarding mob logger as well as implementing full functionality for passive mob logger.
- Sends a customizable message notifying players when they are/are not in combat.
- Added alias /arl for plugin conflicts.
- Fixed exploit of directly closing the client window to bypass PVP logging.
- Use <player> in config field: TempBanMessage to signify which player PVP logged.
- Fixed command issue with /unban for servers in offline mode.
Version 1.6
- Removed spam due to forgotten debug lines.
Version 2.0
- Completely recoded plugin from the ground up.
- Cleaner and more efficient code to prevent memory leaks and leave more resources for other plugins to run on.
- Added NPCs that spawn when a player combat logs.
- NPCs have basic combat AI in aggressive mode (which can be toggled in the config or be allowed through a permission node see above).
- NPCs are compatiable with Modifyworld.
- Cleaner and organized configuration format for ease of use.
- Custom messages now support color.
- Added option to run commands from the console when a combat logger logs back on once they are unbanned.
- Added option to choose whether to drop the player's inventory, armor, or exp.
- Fixed issue with items not dropping.
- Automatic update notifications to the console when a new version is available.
- Fixed issue with MobCatcher.
Version 2.1
- 1.4.5 Update. by swifteh @ www.mc-index.com
Version 2.2
- 1.4.6 Update by swifteh.
Version 2.3
- 1.4.7 Update by swifteh.
Version 2.4
- Updated for 1.5.1.
- NPCs are now fully functional.
- Kicked players will no longer be penalized for logging out.
- Fixed a minor bug with the disallow-all function.
Version 2.5
- Updated for 1.5.2.
- Added a command whitelist.
- Players cannot escape from PVP by flying.
- Fixed bug with NPC spawning.
- Fixed bug with mob logger.
To Do List
Add option to have certain allowed commands while in PVP (customizable via config.yml).- Add commands to change config in-game.
- Add options to specify worlds to enable in.
Add support for other permission plugins.Make an optional option to warp banned players to a certain location after they are unbanned.Clean up code.- Make a video tutorial.
Test the plugin and try to find plugin conflicts.Resolve conflict with Citizens and Factions.Add economy support.- Add region support.
- If player logs off in PVP, make the plugin wait a certain time before banning them.
Option to allow an NPC to spawn instead of death.

-
View User Profile
-
Send Message
Posted May 20, 2012@nhoclesnar
No problem. :)
-
View User Profile
-
Send Message
Posted May 20, 2012@r0306
Thanks for the best anti combat logger plugin xD
-
View User Profile
-
Send Message
Posted May 20, 2012@erdrickk
@nhoclesnar
Sorry guys, but the file I uploaded got mixed up with the other files and I accidentally submitted a broken build. I just uploaded the working build available here: http://dev.bukkit.org/server-mods/anti-relog/files/9-anti-relog-v1-4/
Remember to delete your config.yml file as this version has to add several options in. Thanks for pointing that error out so fast.
-
View User Profile
-
Send Message
Posted May 20, 2012Wow the new version sounds so awesome, but...what is that error below?
-
View User Profile
-
Send Message
Posted May 20, 2012latest recommended bukkit + Anti Relog 1.4 = massive melt down of my logs........
2012-05-20 04:28:15 [SEVERE] Could not pass event EntityDamageByEntityEvent to AntiRelog
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:303)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:459)
at org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDamageEvent(CraftEventFactory.java:363)
at org.bukkit.craftbukkit.event.CraftEventFactory.handleEntityDamageEvent(CraftEventFactory.java:381)
at net.minecraft.server.EntityLiving.damageEntity(EntityLiving.java:608)
at net.minecraft.server.EntityMonster.damageEntity(EntityMonster.java:38)
at net.minecraft.server.EntityHuman.attack(EntityHuman.java:750)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:997)
at net.minecraft.server.Packet7UseEntity.handle(SourceFile:33)
at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:113)
at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:558)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:450)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
Caused by: java.lang.ClassCastException: org.bukkit.craftbukkit.entity.CraftZombie cannot be cast to org.bukkit.entity.Player
at com.github.r0306.antirelog.DamageListener.damage(DamageListener.java:82)
at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301)
... 15 more
-
View User Profile
-
Send Message
Posted May 16, 2012@sleite
Hmm. I can add the feature for mobs as well. However, the other features will take some more time to add so they will be out in later releases.
-
View User Profile
-
Send Message
Posted May 15, 2012@hungoverfurbal
Ok. I have just implemented that feature into the plugin. It will be out in 1.4.
-
View User Profile
-
Send Message
Posted May 14, 2012Request / Suggestion:
Could this plug-in be adapted to be used in non-pvp situations as well? For example, when being attacked by mobs, or attacking another player's pet dog/cat. If the attacker is killed (or about to be killed) and tries to avoid death by logging off, they should be punished.
The punishments should be set in config, and vary. Some examples may include:
OR ... If anyone knows of a plug-in that already does anything remotely close to this, let me know - I've tested several, and none work. They are all geared towards PvP.
My problem is that some players frequently log-out to avoid a fight (against a regular mob, not pvp). They don't want to risk losing diamonds or other precious metal's that they have mined, so they just log out and wait a few minutes, then log back in again. At the very least, they should be forced to go back to spawn without their gear.
Thanks!
-
View User Profile
-
Send Message
Posted May 12, 2012Any chance of making so when players are kicked and they are in combat it does not kill them. That is the only issue i have had with this plugin so far.
-
View User Profile
-
Send Message
Posted May 12, 2012@r0306
yes, I'm running it in offline mode. If you can, I'm waiting for update :)
-
View User Profile
-
Send Message
Posted May 12, 2012@xBorn2play
Is your server in offline mode?
-
View User Profile
-
Send Message
Posted May 12, 2012Please help me, i have the plugin on my server however it doesnt work when people leave during combat they can automatically rejoin again and when you do /pvp t it says you are not in combat. this is a big deal for us as we really promote pvp on the server
-
View User Profile
-
Send Message
Posted May 11, 2012@pulsehh
Yes, in fact, I have just fixed the issue with Heroes but I am currently trying to add compatibility with mob arena so I will release 1.4 with as much compatibility with other plugins as possible.
-
View User Profile
-
Send Message
Posted May 11, 2012Any joy with heroes?
-
View User Profile
-
Send Message
Posted May 9, 2012@odmion
Yes, I have just updated the code. It's a bit messy right now. I will try to organize it in the future.
-
View User Profile
-
Send Message
Posted May 9, 2012You update the code on github?
-
View User Profile
-
Send Message
Posted May 6, 2012@r0306 I slowpoke. Please update your code on github.
-
View User Profile
-
Send Message
Posted May 6, 2012@odmion Edit: Thanks for the bug report. I just fixed the pvp bug. But I don't seem to find any problem with dropping the armor. Can you give me some steps to reproduced this issue?
-
View User Profile
-
Send Message
Posted May 6, 2012Bug:drop items if you hit a person in a peaceful area.
p.s. add a drop of armor.
-
View User Profile
-
Send Message
Posted May 4, 2012@bartekr4u
Are you running this plugin in offline mode? The ban feature will only work if your server is in online mode. I will try to fix that in the upcoming update.