fix some stuff
This commit is contained in:
parent
68e14f9ceb
commit
cba5fbbdf8
|
|
@ -600,6 +600,18 @@ public class Claim
|
|||
managers.addAll(this.managers);
|
||||
}
|
||||
|
||||
public void getClaimNearbyPermission(ArrayList<String> permissions)
|
||||
{
|
||||
//loop through all the entries in the hash map
|
||||
for (Map.Entry<String, ClaimPermission> entry : this.playerIDToClaimPermissionMap.entrySet())
|
||||
{
|
||||
//build up a list for each permission level
|
||||
if (entry.getValue() == ClaimPermission.Claim)
|
||||
{
|
||||
permissions.add(entry.getKey());
|
||||
}
|
||||
}
|
||||
}
|
||||
//returns a copy of the location representing lower x, y, z limits
|
||||
public Location getLesserBoundaryCorner()
|
||||
{
|
||||
|
|
@ -749,7 +761,7 @@ public class Claim
|
|||
Supplier<String> canClaimTrust = claim2.checkPermission(player, ClaimPermission.Claim, null);
|
||||
if (canClaimTrust == null) continue;
|
||||
|
||||
player.sendMiniMessage("<red>You can't claim this close to " + claim2.getOwnerName() + " their claim.", null); // TODO MINIMESSAG + CONFIG
|
||||
player.sendMiniMessage("<red>You can't claim this close to " + claim2.getOwnerName() + "'s claim.", null); // TODO MINIMESSAG + CONFIG
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -1339,7 +1339,8 @@ public class GriefPrevention extends JavaPlugin
|
|||
ArrayList<String> accessors = new ArrayList<>();
|
||||
ArrayList<String> managers = new ArrayList<>();
|
||||
claim.getPermissions(builders, containers, accessors, managers);
|
||||
|
||||
ArrayList<String> nearbyclaimers = new ArrayList<>();
|
||||
claim.getClaimNearbyPermission(nearbyclaimers);
|
||||
GriefPrevention.sendMessage(player, TextMode.Info, Messages.TrustListHeader);
|
||||
|
||||
StringBuilder permissions = new StringBuilder();
|
||||
|
|
@ -1381,13 +1382,24 @@ public class GriefPrevention extends JavaPlugin
|
|||
permissions.append(this.trustEntryToPlayerName(accessor)).append(' ');
|
||||
}
|
||||
|
||||
player.sendMessage(permissions.toString());
|
||||
permissions = new StringBuilder();
|
||||
permissions.append(ChatColor.RED).append('>');
|
||||
|
||||
if (nearbyclaimers.size() > 0)
|
||||
{
|
||||
for (String accessor : nearbyclaimers)
|
||||
permissions.append(this.trustEntryToPlayerName(accessor)).append(' ');
|
||||
}
|
||||
|
||||
player.sendMessage(permissions.toString());
|
||||
|
||||
player.sendMessage(
|
||||
ChatColor.GOLD + this.dataStore.getMessage(Messages.Manage) + " " +
|
||||
ChatColor.YELLOW + this.dataStore.getMessage(Messages.Build) + " " +
|
||||
ChatColor.GREEN + this.dataStore.getMessage(Messages.Containers) + " " +
|
||||
ChatColor.BLUE + this.dataStore.getMessage(Messages.Access));
|
||||
ChatColor.BLUE + this.dataStore.getMessage(Messages.Access) + " " +
|
||||
ChatColor.RED + "Claimnear");
|
||||
|
||||
if (claim.getSubclaimRestrictions())
|
||||
{
|
||||
|
|
@ -2715,7 +2727,7 @@ public class GriefPrevention extends JavaPlugin
|
|||
}
|
||||
else if (permissionLevel == ClaimPermission.Claim)
|
||||
{
|
||||
permissionDescription = "Granted this player the ability to claim near your claim"; // TODO message
|
||||
permissionDescription = "Granted this player the ability to claim near your claim, this is not a permanent trust."; // TODO message
|
||||
}
|
||||
else //ClaimPermission.Inventory
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user