Anti-Sprint
I made this plugin while experimenting with Java. I noticed that there aren't any plugins out there to prevent sprinting and I figured that some people may find this useful. The main reason why this is practically the only anti-sprinting plugin around is that sprinting is usually client-sided process which is not easily controlled by the server sided plugins. Adding a potion effect is a common way to control speed but is not practical in terms of our purpose and setting the player's velocity makes movement horribly choppy.
What is Anti-Sprint?
This plugin offers an innovative and lightweight solution for server owners who would like to disable sprinting for all players or just a select few. It's completely customizable with the ability to only enable it for certain players and comes with a function to disable it completely if not in use. Unlike many other plugins that aimed for the same purpose, it does not cause the player to go crazy when moving and is almost completely free of bugs (if I may say so).
What Are This Plugin's Features?
- Lightweight and easy to install.
- New approach to disabling sprinting.
- Allows for enabling and disabling for a select number of players.
- Permissions support.
How to Install
- Download the latest build of Anti-Sprint here.
- Download the latest CraftBukkit recommended build.
- Drag Anti-Sprint.jar into the CraftBukkit plugins folder and start up the server.
- Reload the server.
Commands
- /antisprint - Shows basic plugin information.
- /antisprint toggle - Enables/disables the plugin's anti-sprint feature.
- /antisprint setfood <amount> - Sets minimum food required in order to sprint. Set to 21 to disallow all sprinting.
- /antisprint allow <player> - Enables sprinting for the given player.
- /antisprint disable <player> - Disables sprinting for the given player.
Permissions
Nodes:
- antisprint.bypass - Players who have this node can bypass sprint restrictions.
- antisprint.configure - Allows players to configure the settings.
Change Log:
Version 1.0:
- Release.
To Do List
Open to suggestions in comments.
Is there a setting to turn of sprinting for OPs?
@ultimateowner56
Yeah. Running is controlled by the client which is why there aren't many plugins that disable sprinting. Sprinting works like this: The client checks if food is above a certain level and then if it is, it sends a packet to the server toggling sprint. The server's only in charge of playing the sprint particle effect. The hack clients work by bypassing the food limit (this plugin temporarily sets the player's food to 0 each time a player tries to sprint), thus bypassing all sprinting restrictions. I recommend getting AntiCheat or another anti-hack plugins to prevent this from happening and then this plugin should work fine.
This is great, although I see one problem. One who uses a hacking client can still sprint via autosprint. For some reason it isn't picked up by this plugin.