Code (YAML):
settings:
permission
: server.shutdown
updateChecker
: true
default_timer
: 10
debug
: false
auto_shutdown
: false
auto_shutdown_time
: 00:00
last_auto_shutdown
: MM-dd-yyyy
metrics
: true
Code (YAML):
console:
prefix
: '&7
[&cShutDown&7
] '
chat:
prefix
: '&7
[&bServer&7
] '
broadcastmsg
: '&bServer ShutDown in
:
&c%s%'
premessage
: '&bThe Server is stopping in&c
%s% &bseconds!'
kickmsg
:
"&bYOURSERVER.COM \n &cYOU GOT KICKED FROM THE SERVER! \n &bREASON: &cSERVER\
\ STOP!"
stoppingin
: Server is stopping in
%s% seconds
stoppingnow
: Server is stopping now
configreloaded
: The config was reloaded
numbererror
: The first argument has to be a number
terminating
: Terminating ShutDown
canceled
: '&aThe ShutDown was canceled!'
version
: 'The current version
:
%ver% Checking for Update: %check%'
version-cooldown
: ยงc/version has a built in cooldown to prevent SpigotMC from rate
limiting
command:
noperm
: '&cYou have
no permission to perform this Command!'
The API is currently just one event (ServerShutDownEvent)
How to use:
- add ShutDown to your plugins dependencies
Spigot:
plugin.yml
Code (YAML):
name
: YourPluginName
author
: YourName
version
: 1.0-SNAPSHOT
depend
:
[ShutDown
]
Listener Class
Code (Java):
import
de.flubio.shutdown.spigot.api.ServerShutDownEvent
;
import
org.bukkit.event.EventHandler
;
import
org.bukkit.event.Listener
;
public
class ExampleListener
implements Listener
{
@EventHandler
public
void onShutDown
(ServerShutDownEvent event
)
{
/*
* YOUR CODE
* */
}
}
BungeeCord:
plugin.yml
Code (YAML):
name
: YourPluginName
author
: YourName
version
: 1.0-SNAPSHOT
depends
:
[ShutDown
]
Listener Class
Code (Java):
import
de.flubio.shutdown.bungee.api.ServerShutDownEvent
;
import
org.bukkit.event.EventHandler
;
import
org.bukkit.event.Listener
;
public
class ExampleListener
implements Listener
{
@EventHandler
public
void onShutDown
(ServerShutDownEvent event
)
{
/*
* YOUR CODE
* */
}
}
INFO
This Plugin sends usage-information such as Players, ServerType(Spigot, BungeeCord), JavaVersion, etc. to the Creator of this Plugin to determine the general use of it, in order to decide if it is still worth to continue the work on it.
You consent to this by downloading