mirror of https://github.com/PikaMug/Quests.git
Forego no more quest string if empty, fixes #1956
This commit is contained in:
parent
054d86d6bc
commit
74d071ffe8
|
@ -76,6 +76,7 @@ public class Lang {
|
|||
|
||||
/**
|
||||
* Get key for lang string
|
||||
*
|
||||
* @param value The lang string
|
||||
* @return key or "NULL" as String
|
||||
*/
|
||||
|
@ -90,6 +91,7 @@ public class Lang {
|
|||
|
||||
/**
|
||||
* Get prefixed key for lang value
|
||||
*
|
||||
* @param value The lang string
|
||||
* @param keyPrefix String that the key starts with
|
||||
* @return full key or "NULL" as String
|
||||
|
@ -118,7 +120,13 @@ public class Lang {
|
|||
}
|
||||
return orig;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Send message if not null or empty
|
||||
*
|
||||
* @param player The player to send message to
|
||||
* @param message The message to be sent
|
||||
*/
|
||||
public static void send(final Player player, final String message) {
|
||||
if (message != null && !ChatColor.stripColor(message).equals("")) {
|
||||
player.sendMessage(message);
|
||||
|
|
|
@ -257,7 +257,7 @@ public class NpcListener implements Listener {
|
|||
c.begin();
|
||||
}
|
||||
} else {
|
||||
evt.getClicker().sendMessage(ChatColor.YELLOW + Lang.get(player, "noMoreQuest"));
|
||||
Lang.send(player, ChatColor.YELLOW + Lang.get(player, "noMoreQuest"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue