added offline-time to the config

This commit is contained in:
ajgeiss0702
2020-05-11 10:35:46 -07:00
parent 6e32224b7c
commit e5000a7b28
2 changed files with 6 additions and 3 deletions
+1 -2
View File
@@ -24,7 +24,6 @@ import us.ajg0702.queue.utils.BungeeStats;
public class Main extends Plugin implements Listener { public class Main extends Plugin implements Listener {
int timeBetweenPlayers = 5; int timeBetweenPlayers = 5;
int offlineSecs = 120;
BungeeStats metrics; BungeeStats metrics;
@@ -118,7 +117,7 @@ public class Main extends Plugin implements Listener {
int len = plys.size(); int len = plys.size();
if(notif) { if(notif) {
String or = msgs.get("status.offline.restarting"); String or = msgs.get("status.offline.restarting");
if(ot > offlineSecs) { if(ot > config.getInt("offline-time")) {
or = msgs.get("status.offline.offline"); or = msgs.get("status.offline.offline");
} else { } else {
//ply.sendMessage(formatMessage(ot + " <= "+offlineSecs)); //ply.sendMessage(formatMessage(ot + " <= "+offlineSecs));
+5 -1
View File
@@ -1,10 +1,14 @@
# Dont touch this number please # Dont touch this number please
config-version: 1 config-version: 2
# The time the server will wait between sending people in the queue # The time the server will wait between sending people in the queue
# Default: 5 # Default: 5
wait-time: 5 wait-time: 5
# The time that a server has to be offline to be marked as offline instead of restarting
# Default: 120
offline-time: 120
# If a player is in a server, you can have the plugin make them automatically join a queue for another server # If a player is in a server, you can have the plugin make them automatically join a queue for another server
# Example with the default values: Player joins survivalfallback server, they will auto-join the queue for survival # Example with the default values: Player joins survivalfallback server, they will auto-join the queue for survival
queue-servers: queue-servers: