mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-27 20:59:12 +01:00
Dont throw exceptions on missing translations
This commit is contained in:
parent
ddb93fd988
commit
77e0dcc7f8
@ -25,6 +25,7 @@ import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
@ -330,7 +331,14 @@ public class BungeeCord extends ProxyServer
|
||||
@Override
|
||||
public String getTranslation(String name)
|
||||
{
|
||||
return bundle.getString( name );
|
||||
String translation = "<translation '" + name + "' missing>";
|
||||
try
|
||||
{
|
||||
translation = bundle.getString( name );
|
||||
} catch ( MissingResourceException ex )
|
||||
{
|
||||
}
|
||||
return translation;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,6 +1,5 @@
|
||||
package net.md_5.bungee.connection;
|
||||
|
||||
import java.util.Arrays;
|
||||
import net.md_5.bungee.BungeeCord;
|
||||
import net.md_5.bungee.EntityMap;
|
||||
import net.md_5.bungee.UserConnection;
|
||||
|
Loading…
Reference in New Issue
Block a user