mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-27 20:59:12 +01:00
Try harder to find translations when not using English. Closes #787
This commit is contained in:
parent
7faefde51b
commit
986f52b1e1
@ -27,6 +27,7 @@ import java.text.MessageFormat;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.ResourceBundle;
|
||||
@ -84,7 +85,7 @@ public class BungeeCord extends ProxyServer
|
||||
/**
|
||||
* Localization bundle.
|
||||
*/
|
||||
public final ResourceBundle bundle = ResourceBundle.getBundle( "messages" );
|
||||
public ResourceBundle bundle;
|
||||
public final MultithreadEventLoopGroup eventLoops = new NioEventLoopGroup( 0, new ThreadFactoryBuilder().setNameFormat( "Netty IO Thread #%1$d" ).build() );
|
||||
/**
|
||||
* locations.yml save thread.
|
||||
@ -149,6 +150,14 @@ public class BungeeCord extends ProxyServer
|
||||
|
||||
public BungeeCord() throws IOException
|
||||
{
|
||||
try
|
||||
{
|
||||
bundle = ResourceBundle.getBundle( "messages" );
|
||||
} catch ( MissingResourceException ex )
|
||||
{
|
||||
bundle = ResourceBundle.getBundle( "messages", Locale.ENGLISH );
|
||||
}
|
||||
|
||||
Log.setOutput( new PrintStream( ByteStreams.nullOutputStream() ) ); // TODO: Bug JLine
|
||||
AnsiConsole.systemInstall();
|
||||
consoleReader = new ConsoleReader();
|
||||
|
Loading…
Reference in New Issue
Block a user