mirror of
https://github.com/bloodmc/GriefDefender.git
synced 2025-01-09 19:57:45 +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) {
|
for (UUID uuid : accessorList) {
|
||||||
final String userName = PlayerUtil.getInstance().getUserName(uuid);
|
final String userName = PlayerUtil.getInstance().getUserName(uuid);
|
||||||
if (userName != null) {
|
if (userName != null) {
|
||||||
accessors += PlayerUtil.getInstance().getUserName(uuid) + " ";
|
accessors += userName + " ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (UUID uuid : builderList) {
|
for (UUID uuid : builderList) {
|
||||||
final String userName = PlayerUtil.getInstance().getUserName(uuid);
|
final String userName = PlayerUtil.getInstance().getUserName(uuid);
|
||||||
if (userName != null) {
|
if (userName != null) {
|
||||||
builders += PlayerUtil.getInstance().getUserName(uuid) + " ";
|
builders += userName + " ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (UUID uuid : containerList) {
|
for (UUID uuid : containerList) {
|
||||||
final String userName = PlayerUtil.getInstance().getUserName(uuid);
|
final String userName = PlayerUtil.getInstance().getUserName(uuid);
|
||||||
if (userName != null) {
|
if (userName != null) {
|
||||||
containers += PlayerUtil.getInstance().getUserName(uuid) + " ";
|
containers += userName + " ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (UUID uuid : managerList) {
|
for (UUID uuid : managerList) {
|
||||||
final String userName = PlayerUtil.getInstance().getUserName(uuid);
|
final String userName = PlayerUtil.getInstance().getUserName(uuid);
|
||||||
if (userName != null) {
|
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("")
|
Component ownerLine = TextComponent.builder("")
|
||||||
.append("Owner", TextColor.YELLOW)
|
.append("Owner", TextColor.YELLOW)
|
||||||
.append(" : ")
|
.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 adminShowText = TextComponent.empty();
|
||||||
Component basicShowText = TextComponent.empty();
|
Component basicShowText = TextComponent.empty();
|
||||||
Component subdivisionShowText = TextComponent.empty();
|
Component subdivisionShowText = TextComponent.empty();
|
||||||
|
@ -99,6 +99,13 @@ public String lookupPlayerName(String uuid) {
|
|||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public String getUserName(UUID uuid) {
|
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);
|
final GDPermissionUser user = PermissionHolderCache.getInstance().getOrCreateUser(uuid);
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user