3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 12:30:06 +01:00
Paper/CraftBukkit-Patches/0008-Update-timeout-time-to-new-default-value.patch

47 Zeilen
2.3 KiB
Diff

2013-02-08 07:09:51 +01:00
From 266474a8588a30de49a7c2a883dde257b7e001ee Mon Sep 17 00:00:00 2001
From: md_5 <md_5@bigpond.com>
Date: Thu, 10 Jan 2013 12:33:37 +1100
2013-01-19 09:22:25 +01:00
Subject: [PATCH] Update timeout time to new default value.
---
src/main/java/org/bukkit/craftbukkit/Spigot.java | 9 ++++++++-
src/main/resources/configurations/bukkit.yml | 2 +-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java
2013-02-08 07:09:51 +01:00
index a53c7b0..30bc542 100644
--- a/src/main/java/org/bukkit/craftbukkit/Spigot.java
+++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java
2013-02-08 07:09:51 +01:00
@@ -7,7 +7,14 @@ public class Spigot {
public static void initialize(CraftServer server, SimpleCommandMap commandMap, YamlConfiguration configuration) {
commandMap.register("bukkit", new org.bukkit.craftbukkit.command.RestartCommand("restart"));
- org.bukkit.craftbukkit.util.WatchdogThread.startThread(configuration.getInt("settings.timeout-time", 180), configuration.getBoolean("settings.restart-on-crash", false));
+ int timeout = configuration.getInt("settings.timeout-time", 300);
+ if (timeout == 180) {
+ timeout = 300;
+ server.getLogger().info("Migrating to new timeout time of 300");
+ configuration.set("settings.timeout-time", timeout);
+ server.saveConfig();
+ }
+ org.bukkit.craftbukkit.util.WatchdogThread.startThread(timeout, configuration.getBoolean("settings.restart-on-crash", false));
server.whitelistMessage = configuration.getString("settings.whitelist-message", server.whitelistMessage);
server.stopMessage = configuration.getString("settings.stop-message", server.stopMessage);
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
2013-02-08 07:09:51 +01:00
index 5262ae1..55bfb77 100644
--- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml
@@ -26,7 +26,7 @@ settings:
deprecated-verbose: default
shutdown-message: Server closed
restart-script-location: start.bat
- timeout-time: 180
+ timeout-time: 300
restart-on-crash: false
filter-unsafe-ips: false
whitelist-message: You are not white-listed on this server!
--
2013-02-08 07:09:51 +01:00
1.8.1-rc2