From 2cc2dee7ebec1ae6f99d1c63a8dcea47f9c307be Mon Sep 17 00:00:00 2001 From: Sleaker Date: Sun, 19 Feb 2012 09:11:58 -0800 Subject: [PATCH] use GM methods for prefix/suffix so we return group values if no player value exists. --- .../vault/chat/plugins/Chat_GroupManager.java | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/net/milkbowl/vault/chat/plugins/Chat_GroupManager.java b/src/net/milkbowl/vault/chat/plugins/Chat_GroupManager.java index 95f8667..27d1d1c 100644 --- a/src/net/milkbowl/vault/chat/plugins/Chat_GroupManager.java +++ b/src/net/milkbowl/vault/chat/plugins/Chat_GroupManager.java @@ -266,12 +266,30 @@ public class Chat_GroupManager extends Chat { @Override public String getPlayerPrefix(String worldName, String playerName) { - return getPlayerInfoString(worldName, playerName, "prefix", ""); + AnjoPermissionsHandler handler; + if (worldName == null) { + handler = groupManager.getWorldsHolder().getWorldPermissionsByPlayerName(playerName); + } else { + handler = groupManager.getWorldsHolder().getWorldPermissions(worldName); + } + if (handler == null) { + return ""; + } + return handler.getUserPrefix(playerName); } @Override public String getPlayerSuffix(String worldName, String playerName) { - return getPlayerInfoString(worldName, playerName, "suffix", ""); + AnjoPermissionsHandler handler; + if (worldName == null) { + handler = groupManager.getWorldsHolder().getWorldPermissionsByPlayerName(playerName); + } else { + handler = groupManager.getWorldsHolder().getWorldPermissions(worldName); + } + if (handler == null) { + return ""; + } + return handler.getUserSuffix(playerName); } @Override