VoteRestart

This plugin works for every bukkit version ever released, I just set the files to 1.7.2 to let server owners know it's compatible.

Have you ever wanted to enable your server uses to vote for a restart when the server lags? Yes, yes you have. You can't deny it. Stop lying to yourself. With VoteRestart, when a certain amount of players have voted (defined in config), the server automatically restarts. This allows server owners to have some peace; letting the users automatically restart the server if it becomes laggy.

Information


Within your config, you can define how many votes are needed for a server restart. In game, players can issues the command "/vr"; this allows them to vote for a restart. Once the votes hit a certain number (defined in the config), the server will automatically restart. NEW (Version 0.2 and above): Define an interval in seconds for how often this plugin should automatically reset the votes to zero. This stops the use of bots or other miscellaneous tools to attemp to restart your server just to cause harm.

Getting Started


To get started with VoteRestart, please download the latest file from the right. Once you have downloaded it, please put it into your plugin directory (server/plugins/). Now, run the server for the first time. Once the server has started, it will create the config with some default files . Navigate to your plugins directory, and select the VoteRestart folder. Within this folder, please open up the config.yml (server/plugins/VoteRestart/config.yml). Now you have done this, please edit the file to your liking. It should look something like this:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# +----------------------------------------------------+
# <        VoteReload Config File (Version 0.1)        >
# <          Created by Tayler King (MCMedia)          >
# <      http://dev.bukkit.org/profiles/MCMedia/       >
# +----------------------------------------------------+

# This is the amount of votes needed for a restart.
# We suggest about 80% of your average daily users.
vote: '1'

# If the player does not have permission to vote, what
# message would you like to be returnd to the player?
PermissionMessage: '&cYou do not have permission to vote for a restart.'

# If the player has already voted, what message
# would you like to be returnd to the player?
VotedMessage: '&cYou have already voted for a restart.'


Once you have finished editing this file, please save and close it. But, ah ah ah! Don't do anything! Stay with us, it won't do any harm. Please navigate to the root location of your server. Within here, you should have a file named something along the lines of "start.(bat/sh)" or "run.(bat/sh)". Please open up this file; we need to do a bit of editing. If you are on windows, it is likely to end with .bat. If this file does, please replace the file contents with this:

1
2
3
4
5
6
7
@echo off
Title Bukkit (Implementing VoteReload)
SET BINDIR=%~dp0
CD /D "%BINDIR%"
:start
java -Xmx3072M -Xms3072M -jar bukkit.jar
goto start


Once you have done this, please replace "java -Xmx3072M -Xms3072M -jar bukkit.jar" with the command that you use to start up your server normally.
If your server is a linux server, it is likely that the file ends in .sh. If so, please replace the file contents with this:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#!/bin/sh
BINDIR=$(dirname "$(readlink -fn "$0")")
cd "\$BINDIR"
while true
do
java -Xmx3072M -Xms3072M -jar bukkit.jar
echo "If you want to completely stop the server process now, press Ctrl+C before the time is up!"
echo "Rebooting in:"
for i in 5 4 3 2 1
do
echo "$i..."
sleep 1
done
echo "Rebooting now!"
done


Once you have done this, please replace "java -Xmx3072M -Xms3072M -jar bukkit.jar" with the command that you use to start up your server normally.

Commands And Permissions


PermissionSyntaxUsage
VoteRestart.vote/vrVote for a server reload
VoteRestart.count/vcShows current votes and votes needed for server restart

Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    68510
  • Created
    Nov 4, 2013
  • Last Released File
    Nov 5, 2013
  • Total Downloads
    1,158
  • License

Categories

Members

Recent Files