null check herotitles node.

This commit is contained in:
Sleaker 2012-01-06 16:23:12 -08:00
parent 7fbe05f7d4
commit e839dc264f

View File

@ -85,8 +85,11 @@ public class Chat_HeroTitles extends Chat {
@Override
public String getPlayerPrefix(String world, String player) {
if (PlayerTitleManager.getTitlePrefix(player) != null) {
return PlayerTitleManager.getTitlePrefix(player).data;
}
return "";
}
@Override
public void setPlayerPrefix(String world, String player, String prefix) {
@ -95,8 +98,11 @@ public class Chat_HeroTitles extends Chat {
@Override
public String getPlayerSuffix(String world, String player) {
if (PlayerTitleManager.getTitleSuffix(player) != null) {
return PlayerTitleManager.getTitleSuffix(player).data;
}
return "";
}
@Override
public void setPlayerSuffix(String world, String player, String suffix) {
@ -234,7 +240,7 @@ public class Chat_HeroTitles extends Chat {
@Override
public String getPlayerInfoString(String world, String player, String node, String defaultValue) {
if (node.equals("color"))
return PlayerTitleManager.getTitleColor(player).toString();
return PlayerTitleManager.getTitleColor(player) != null ? PlayerTitleManager.getTitleColor(player).toString() : "";
if (subChat != null)
return subChat.getPlayerInfoString(world, player, node, defaultValue);