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.
@RustyDagger
If there are players around them when they log out, they might not have been in PVP in the first place and that would cause an unreasonable death if another player simply breaks the block and takes all the items. However, I could add a feature to slow the players down and make it configurable through the config.yml. Otherwise, it's really hard for the plugin to tell between two people who are simply near each other and a player who is running away from a fight.
@VampiricMoon
I'm currently looking into the ban message as I'm having trouble finding how to change the message exactly (might conflict with Essentials Ban Message). As for the armor, thanks for pointing that out. I will certainly add that in the next update coming soon. :)
If possible could you add the ability to change the ban message? Many of my players are freaking out when they try to log back in and see "The ban hammer has spoken".
Also, combat loggers do not drop their armour. Could this be added? :D
@r0306
search for players in X blocks I guess and if theres none dont spawn them or only spawn them if they have recently been running. as the problem is people running away from battle. with out being hit the chances are that if they don't sprint they would of been hit. yer i too want to keep this simple and light but at the same time i want to make the game fair its hard to balance.
never really liked npc's that's why i said blocks :D
@Mick6666
Yup. I thought of that and it is possible to do it so I'll try to implement that sometime after a more stable release is out.
Can you make the bans increasing if they do it many times? like, 5, 10, 15, 20.
Thatd be awesome.
@RustyDagger
Hmm. But what if the player was not in battle when they logged out? That would make anybody who logs out vulnerable. I might be able to add NPCs that act as the player who logged out and fight back but that would ruin the point of this lightweight plugin.
@ro306
You are going to be busy for some time it seems that the plugin needs a fair chunk of work but that is expected as its new. I have one more issue to add to the list.
The plugins name claims it prevents relogging but users that have not been hit that are running away from another player can still log out with no penalty.
To fix this I had a few simple light weigh ideas that could be implemented (optional in the config ofc)
1. Place Some kind of block where they were when they logged out for X amount of seconds if blocks are destroyed kill them drop items.. Some thing like red wool could be good or even sponge. down sides blocks would need to not drop items.
@Toxic__Waste
Sorry for that. I know that I can definitely fix that by the next update.
another lil flaw is when the server restarts its bans everyone withing the 7 seconds listed there was a big pvp battle going on and the automatic restart i have installed restrrted and when the server came back 8 people banned and did not lift the ban after the 3 minutes i configured
@RustyDagger
I'll have a look at the worldguard and factions api and see what I can do about that. :P
Another thing i have noticed as a bit of a flaw is that in faction safezones and worldguard no pvp zones if you hit a player and you do no damage they still cant use any commands some players have been abusing this on my server to prevent people tp from spawn.
Could you maybe add a check to the flag system to make sure the player took at least 0.1 of damage? That would fix it I think.
@migsthegod
Yes, I will put the source on GitHub as soon as I fix some stuff in the code.
@erdrickk Yup. I've been trying to implement that feature but haven't seem to have any luck yet. As a last resort, I'm going to use Essnetials to display the message.
@RustyDagger
Yes, I can add an option to remove the MOTD. I put it there because the person requested for MOTD integration.
@jenks1999
I'll try to add something in to integrate with those plugins.
I'd love to learn this.
Any chance we could view source?
yes it would be great to be able to remove the MOTD, there is no point for it.
Request #2 - is there a way to modify the ban message? right now silly noobs just think they get a general ban for nothing even though I have explained the new system. Is there a way to make the ban message customizable? "you have been banned for being a coward, come back in # amount of time"
awesome plugin simple and straight to the point.
BUT! I do have one issue. the god dam motd why just why is it there and why can i not Disable it if i remove it to blank it resets its self for now iv just made it a . but :( its messing up my normal motd most servers have another plugin to do a motd and it is completely off topic for this plugin.
So please a way to turn it off or remove it. It really is horrid. essentials dose a much better job.
Is there a way to integrate this to a selected region only? or have this tie in with plugins like regios and towny? Because i have a specific area only for pvp and want it to function there, or maybe add a permission node that will be checked prior to action which has to be present before anything happens. Because then i can use other plugins to add that node only in the selected region. But then the plugin is node dependant on that specific node for it to function.
Can this be done?