@Override public String getPlayerPrefix(String world, String player) { UUID uuid = API.getUUIDFromName(player); String prefix = API.getPlayerInfo(uuid, "prefix"); if (prefix == null) { String prigroup = API.getPlayerGroup(uuid); prefix = API.getGroupInfo(prigroup, "prefix"); } return prefix; }
@Override public void setGroupPrefix(String world, String group, String prefix) { API.setGroupInfo(group, "prefix", prefix); }
@Override public String getGroupPrefix(String world, String group) { return API.getGroupInfo(group, "prefix"); }
@Override public void setPlayerSuffix(String world, String player, String suffix) { UUID uuid = API.getUUIDFromName(player); API.setPlayerInfo(uuid, "suffix", suffix); }
@Override public String getPlayerSuffix(String world, String player) { UUID uuid = API.getUUIDFromName(player); return API.getPlayerInfo(uuid, "suffix"); }
@Override public void setGroupInfoString(String world, String group, String node, String value) { API.setGroupInfo(group, node, value); }
@Override public void setPlayerInfoString(String world, String player, String node, String value) { UUID uuid = API.getUUIDFromName(player); API.setPlayerInfo(uuid, node, value); }
@Override public String getGroupInfoString(String world, String group, String node, String defaultValue) { String val = API.getGroupInfo(group, node); return val != null ? val : defaultValue; }
@Override public void setGroupInfoBoolean(String world, String group, String node, boolean value) { API.setGroupInfo(group, node, String.valueOf(value)); }
@Override public String getPlayerInfoString(String world, String player, String node, String defaultValue) { UUID uuid = API.getUUIDFromName(player); String val = API.getPlayerInfo(uuid, node); return val != null ? val : defaultValue; }
@Override public void setPlayerInfoBoolean(String world, String player, String node, boolean value) { UUID uuid = API.getUUIDFromName(player); API.setPlayerInfo(uuid, node, String.valueOf(value)); }
@Override public void setGroupInfoDouble(String world, String group, String node, double value) { API.setGroupInfo(group, node, String.valueOf(value)); }
@Override public void setGroupInfoInteger(String world, String group, String node, int value) { API.setGroupInfo(group, node, String.valueOf(value)); }
@Override public void setPlayerInfoInteger(String world, String player, String node, int value) { UUID uuid = API.getUUIDFromName(player); API.setPlayerInfo(uuid, node, String.valueOf(value)); }
@Override public void setGroupSuffix(String world, String group, String suffix) { API.setGroupInfo(group, "suffix", suffix); }