mirror of
https://github.com/PaperMC/Waterfall.git
synced 2024-12-27 11:07:39 +01:00
75 lines
3.9 KiB
Diff
75 lines
3.9 KiB
Diff
From a8a33b052d445c78560370674f7b287e77396721 Mon Sep 17 00:00:00 2001
|
|
From: foss-mc <69294560+foss-mc@users.noreply.github.com>
|
|
Date: Wed, 16 Dec 2020 18:00:49 +0800
|
|
Subject: [PATCH] Disable update checker & Use bungee name
|
|
|
|
|
|
diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCordLauncher.java b/proxy/src/main/java/net/md_5/bungee/BungeeCordLauncher.java
|
|
index 6a5193fe..e82073d4 100644
|
|
--- a/proxy/src/main/java/net/md_5/bungee/BungeeCordLauncher.java
|
|
+++ b/proxy/src/main/java/net/md_5/bungee/BungeeCordLauncher.java
|
|
@@ -53,25 +53,12 @@ public class BungeeCordLauncher
|
|
return;
|
|
}
|
|
|
|
- if ( BungeeCord.class.getPackage().getSpecificationVersion() != null && System.getProperty( "IReallyKnowWhatIAmDoingISwear" ) == null )
|
|
- {
|
|
- Date buildDate = new SimpleDateFormat( "yyyyMMdd" ).parse( BungeeCord.class.getPackage().getSpecificationVersion() );
|
|
-
|
|
- Calendar deadline = Calendar.getInstance();
|
|
- deadline.add( Calendar.WEEK_OF_YEAR, -8 );
|
|
- if ( buildDate.before( deadline.getTime() ) )
|
|
- {
|
|
- System.err.println( "*** Hey! This build is potentially outdated :( ***" );
|
|
- System.err.println( "*** Please check for a new build from https://papermc.io/downloads ***" );
|
|
- System.err.println( "*** Should this build be outdated, you will get NO support for it. ***" );
|
|
- System.err.println( "*** Server will start in 10 seconds ***" );
|
|
- Thread.sleep( TimeUnit.SECONDS.toMillis( 10 ) );
|
|
- }
|
|
- }
|
|
+ // FlameCord - Disable update checker
|
|
|
|
BungeeCord bungee = new BungeeCord();
|
|
ProxyServer.setInstance( bungee );
|
|
- bungee.getLogger().info( "Enabled Travertine version " + bungee.getVersion() );
|
|
+ // FlameCord - Use bungee name
|
|
+ bungee.getLogger().info( "Enabled " + bungee.getName() + " version " + bungee.getVersion() );
|
|
bungee.start();
|
|
|
|
if ( !options.has( "noconsole" ) )
|
|
diff --git a/proxy/src/main/java/net/md_5/bungee/conf/YamlConfig.java b/proxy/src/main/java/net/md_5/bungee/conf/YamlConfig.java
|
|
index d4fad294..7994c1c1 100644
|
|
--- a/proxy/src/main/java/net/md_5/bungee/conf/YamlConfig.java
|
|
+++ b/proxy/src/main/java/net/md_5/bungee/conf/YamlConfig.java
|
|
@@ -22,6 +22,7 @@ import java.util.Locale;
|
|
import java.util.Map;
|
|
import java.util.logging.Level;
|
|
import lombok.RequiredArgsConstructor;
|
|
+import net.md_5.bungee.BungeeCord;
|
|
import net.md_5.bungee.Util;
|
|
import net.md_5.bungee.api.ChatColor;
|
|
import net.md_5.bungee.api.ProxyServer;
|
|
@@ -227,7 +228,8 @@ public class YamlConfig implements ConfigurationAdapter
|
|
Map<String, Object> val = entry.getValue();
|
|
String name = entry.getKey();
|
|
String addr = get( "address", "localhost:25565", val );
|
|
- String motd = ChatColor.translateAlternateColorCodes( '&', get( "motd", "&1Just another Travertine - Forced Host", val ) );
|
|
+ // FlameCord - Use Bungee name instead
|
|
+ String motd = ChatColor.translateAlternateColorCodes( '&', get( "motd", "&1Just another " + BungeeCord.getInstance().getName() + " - Forced Host", val ) );
|
|
boolean restricted = get( "restricted", false, val );
|
|
SocketAddress address = Util.getAddr( addr );
|
|
ServerInfo info = ProxyServer.getInstance().constructServerInfo( name, address, motd, restricted );
|
|
@@ -253,7 +255,8 @@ public class YamlConfig implements ConfigurationAdapter
|
|
|
|
for ( Map<String, Object> val : base )
|
|
{
|
|
- String motd = get( "motd", "&1Another Bungee server", val );
|
|
+ // FlameCord - Use Bungee name instead
|
|
+ String motd = get( "motd", "&1Another " + BungeeCord.getInstance().getName() + " server", val );
|
|
motd = ChatColor.translateAlternateColorCodes( '&', motd );
|
|
|
|
int maxPlayers = get( "max_players", 1, val );
|
|
--
|
|
2.31.1
|
|
|