mirror of
https://github.com/bloodmc/GriefDefender.git
synced 2024-11-19 11:45:18 +01:00
Fix /claiminfo displaying public and wilderness owner incorrectly.
This commit is contained in:
parent
347419a7fd
commit
af5fade803
@ -262,25 +262,25 @@ public void execute(CommandSender src, String[] args) {
|
||||
for (UUID uuid : accessorList) {
|
||||
final String userName = PlayerUtil.getInstance().getUserName(uuid);
|
||||
if (userName != null) {
|
||||
accessors += PlayerUtil.getInstance().getUserName(uuid) + " ";
|
||||
accessors += userName + " ";
|
||||
}
|
||||
}
|
||||
for (UUID uuid : builderList) {
|
||||
final String userName = PlayerUtil.getInstance().getUserName(uuid);
|
||||
if (userName != null) {
|
||||
builders += PlayerUtil.getInstance().getUserName(uuid) + " ";
|
||||
builders += userName + " ";
|
||||
}
|
||||
}
|
||||
for (UUID uuid : containerList) {
|
||||
final String userName = PlayerUtil.getInstance().getUserName(uuid);
|
||||
if (userName != null) {
|
||||
containers += PlayerUtil.getInstance().getUserName(uuid) + " ";
|
||||
containers += userName + " ";
|
||||
}
|
||||
}
|
||||
for (UUID uuid : managerList) {
|
||||
final String userName = PlayerUtil.getInstance().getUserName(uuid);
|
||||
if (userName != null) {
|
||||
managers += PlayerUtil.getInstance().getUserName(uuid) + " ";
|
||||
managers += userName + " ";
|
||||
}
|
||||
}
|
||||
|
||||
@ -361,7 +361,7 @@ public void execute(CommandSender src, String[] args) {
|
||||
Component ownerLine = TextComponent.builder("")
|
||||
.append("Owner", TextColor.YELLOW)
|
||||
.append(" : ")
|
||||
.append(ownerName != null && !claim.isAdminClaim() ? ownerName : "administrator", TextColor.GOLD).build();
|
||||
.append(ownerName != null && !claim.isAdminClaim() && !claim.isWilderness() ? ownerName : "administrator", TextColor.GOLD).build();
|
||||
Component adminShowText = TextComponent.empty();
|
||||
Component basicShowText = TextComponent.empty();
|
||||
Component subdivisionShowText = TextComponent.empty();
|
||||
|
@ -99,6 +99,13 @@ public String lookupPlayerName(String uuid) {
|
||||
|
||||
@Nullable
|
||||
public String getUserName(UUID uuid) {
|
||||
if (uuid == GriefDefenderPlugin.PUBLIC_UUID) {
|
||||
return "public";
|
||||
}
|
||||
if (uuid == GriefDefenderPlugin.ADMIN_USER_UUID || uuid == GriefDefenderPlugin.WORLD_USER_UUID) {
|
||||
return "administrator";
|
||||
}
|
||||
|
||||
final GDPermissionUser user = PermissionHolderCache.getInstance().getOrCreateUser(uuid);
|
||||
if (user == null) {
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user