/** * A safe method to retrieve a message string based on Locale of the plugin. It will automatically * colorize the configured messages and if the message is not loaded in the language pack, it will * return an empty string and send a warning to log. * * @param key * @return */ public static String getMessage(String key) { try { return getMessage1(key); } catch (MessageNotFoundException e) { Townships.log(Level.SEVERE, "Messages.properties is missing: " + key); return ""; } }
public static void broadcast(Townships plugin, String msg, Object... params) { plugin.getServer().broadcastMessage(parameterizeMessage(msg, params)); }