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 Jun 12, 2012@Tr0n1x
Yes, apparently, I think factions cancels their /f home command so that other plugins think it's cancelled and then immediately executes the teleportation (possibly to avoid conflict with other plugins). I had to make the event handler ignore the event's cancellation which solved the problem. :)
-
View User Profile
-
Send Message
Posted Jun 12, 2012I don't know how Factin work, but isn't possible to add a soft dependency with Faction plugin to interact with it and solve the f home not cancelled ? Else can't you play with event priority to intercept and cancel the faction command ?
I hope this can help you.
Waiting the next release for reinstall your great plugin ! Thanks again.
-
View User Profile
-
Send Message
Posted Jun 11, 2012@nhoclesnar
I'm working on it right now. I estimate that the new version will be out in a day or two depending on my time and whether or not I will add a few more features. Also, it seems that faction home still works because it ignores the influence of other plugins and teleports them away regardless if they are cancelled or not. I'm going to have to fix this some other way.
-
View User Profile
-
Send Message
Posted Jun 10, 2012Is there any news on the next update? The bugs people mentioned are pretty critical.
-
View User Profile
-
Send Message
Posted Jun 5, 2012@levisn1
@Tr0n1x
@Sapd
@Jordan0510
Thanks for the bug reports. I will look into all these issues and try to resolve them.
-
View User Profile
-
Send Message
Posted Jun 3, 2012/F home work...it sat the message but people can teleport away...pls fix it.-..i use the last version un 1.2.5 r2
-
View User Profile
-
Send Message
Posted Jun 2, 2012Thanks for your plugin.
I try it, and I found some critical bugs:
- Don't forbid command for plugin Faction, example: "/f home" work. In config I have: DisallowAll: 'on'
- If a player is kick when pvp, he is kill and ban
- If a player pvp while server stop/restart, he is kill
- The github is not up to date: https://github.com/r0306/Anti-Relog
-
View User Profile
-
Send Message
Posted Jun 2, 2012The users who try to log out during pvp combat gets banned etc. But my user reports that the items don't drop. DropItems is set to on
-
View User Profile
-
Send Message
Posted Jun 1, 2012I have a bug to report. When someone gets killed and instead of hitting "Respawn" and they hit "Title Screen", this plugin thinks they're combat logging so it bans them. Please fix this. I enjoy having this plugin on my server. :)
-
View User Profile
-
Send Message
Posted May 23, 2012Great stuff. Thanks.
-
View User Profile
-
Send Message
Posted May 22, 2012@Aangiix3
Yes, many people have asked me to add in economy penalty support and I have already added it to the to-do list. The killing function has been there ever since 1.1. I can also try to add a console-runnable command but that would be sort of overkill. :\
-
View User Profile
-
Send Message
Posted May 22, 2012@spunkiie
Ok. I will see what I can do about that but I don't think servers can actually disable the messages announcing when a player joins/leaves the server. :P
-
View User Profile
-
Send Message
Posted May 22, 2012@balloon27
Hmm, I haven't really added any support for enabling/disabling this plugin in multiple worlds yet. Might add that on the to-do list. However, I don't see any reason why it shouldn't work with MultiVerse. :)
-
View User Profile
-
Send Message
Posted May 22, 2012@darkcloud784
Yes, this works well with Heroes plugin as I have just fixed the compatibility issue in Version 1.4.
-
View User Profile
-
Send Message
Posted May 21, 2012Does this work well with Heroes?
-
View User Profile
-
Send Message
Posted May 21, 2012Does this support MultiVerse or anything similar?
-
View User Profile
-
Send Message
Posted May 21, 2012r0306
Kicking the player would be a good option, servers could easily disable the login/logout message as it is annoying on servers with +50 players.
I have a 300+ server :)
-
View User Profile
-
Send Message
Posted May 21, 2012I don't really like it when a player gets banned just because he logged out one time.
I think you should add: Losing Money, jailing the Person, or even kill him and make him drop everything.
EDIT: For Jail I would recommend adding a custom command to run in the console when a player loggs out while pvping.
-
View User Profile
-
Send Message
Posted May 20, 2012@spunkiie
Well, the ban message will not work for servers in offline mode because the only way to ban a player in offline is to simply ban them, where it is impossible to add a custom ban message to it. The only other way to do so is to kick the player AFTER they join the server, which would spam your players with "Player has joined the game. Player has left the game" each time they are kicked and will increase the possibilities of conflicts with other plugins. If anyone knows a fix for this, please feel free to send me a message and I will be glad to add this feature in. Otherwise, I have tried all sorts of methods and it has not been able to work correctly unless it's in online mode. :\
-
View User Profile
-
Send Message
Posted May 20, 2012Hey r036,
The ban MSG is not showing to the player, it shows only the default MC ban message:
You're banned from this server.
Could you please fix it ?