Extra debugging

This commit is contained in:
cnaude 2015-03-13 09:13:51 -07:00
parent 7885a2597e
commit d440e0220b

View File

@ -972,7 +972,7 @@ public class PurpleIRC extends JavaPlugin {
} }
} }
} catch (Exception ex) { } catch (Exception ex) {
logDebug("Problem with primary group (" + player.getName() + "): " + ex.getMessage()); logDebug("getPlayerGroup (" + player.getName() + "): " + ex.getMessage());
} }
if (groupName == null) { if (groupName == null) {
groupName = ""; groupName = "";
@ -1204,20 +1204,33 @@ public class PurpleIRC extends JavaPlugin {
* @return * @return
*/ */
public String getGroupPrefix(String worldName, String player) { public String getGroupPrefix(String worldName, String player) {
logDebug("getGroupPrefix: 1");
String prefix = ""; String prefix = "";
try { try {
logDebug("getGroupPrefix: 2");
UUID uuid = getPlayerUuid(player); UUID uuid = getPlayerUuid(player);
logDebug("getGroupPrefix: 3");
if (vaultHelpers != null && uuid != null) { if (vaultHelpers != null && uuid != null) {
logDebug("getGroupPrefix: 4");
if (vaultHelpers.chat != null && vaultHelpers.permission != null) { if (vaultHelpers.chat != null && vaultHelpers.permission != null) {
logDebug("getGroupPrefix: 5");
String group = ""; String group = "";
logDebug("getGroupPrefix: 6");
OfflinePlayer offlinePlayer = getServer().getOfflinePlayer(uuid); OfflinePlayer offlinePlayer = getServer().getOfflinePlayer(uuid);
logDebug("getGroupPrefix: 7");
if (offlinePlayer != null) { if (offlinePlayer != null) {
logDebug("getGroupPrefix: 8");
group = vaultHelpers.permission.getPrimaryGroup(worldName, offlinePlayer); group = vaultHelpers.permission.getPrimaryGroup(worldName, offlinePlayer);
logDebug("getGroupPrefix: 9");
} }
logDebug("getGroupPrefix: 10");
if (group == null) { if (group == null) {
logDebug("getGroupPrefix: 11");
group = ""; group = "";
} }
logDebug("getGroupPrefix: 12");
prefix = vaultHelpers.chat.getGroupPrefix(worldName, group); prefix = vaultHelpers.chat.getGroupPrefix(worldName, group);
logDebug("getGroupPrefix: 13");
} }
} }
if (prefix == null) { if (prefix == null) {
@ -1226,6 +1239,7 @@ public class PurpleIRC extends JavaPlugin {
} catch (Exception ex) { } catch (Exception ex) {
logDebug("getGroupPrefix (" + player + "): " + ex.getMessage()); logDebug("getGroupPrefix (" + player + "): " + ex.getMessage());
} }
logDebug("getGroupPrefix: 14");
return ChatColor.translateAlternateColorCodes('&', prefix); return ChatColor.translateAlternateColorCodes('&', prefix);
} }