fix some stuff
This commit is contained in:
parent
68e14f9ceb
commit
cba5fbbdf8
|
|
@ -600,6 +600,18 @@ public class Claim
|
||||||
managers.addAll(this.managers);
|
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
|
//returns a copy of the location representing lower x, y, z limits
|
||||||
public Location getLesserBoundaryCorner()
|
public Location getLesserBoundaryCorner()
|
||||||
{
|
{
|
||||||
|
|
@ -749,7 +761,7 @@ public class Claim
|
||||||
Supplier<String> canClaimTrust = claim2.checkPermission(player, ClaimPermission.Claim, null);
|
Supplier<String> canClaimTrust = claim2.checkPermission(player, ClaimPermission.Claim, null);
|
||||||
if (canClaimTrust == null) continue;
|
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 false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -1339,7 +1339,8 @@ public class GriefPrevention extends JavaPlugin
|
||||||
ArrayList<String> accessors = new ArrayList<>();
|
ArrayList<String> accessors = new ArrayList<>();
|
||||||
ArrayList<String> managers = new ArrayList<>();
|
ArrayList<String> managers = new ArrayList<>();
|
||||||
claim.getPermissions(builders, containers, accessors, managers);
|
claim.getPermissions(builders, containers, accessors, managers);
|
||||||
|
ArrayList<String> nearbyclaimers = new ArrayList<>();
|
||||||
|
claim.getClaimNearbyPermission(nearbyclaimers);
|
||||||
GriefPrevention.sendMessage(player, TextMode.Info, Messages.TrustListHeader);
|
GriefPrevention.sendMessage(player, TextMode.Info, Messages.TrustListHeader);
|
||||||
|
|
||||||
StringBuilder permissions = new StringBuilder();
|
StringBuilder permissions = new StringBuilder();
|
||||||
|
|
@ -1381,13 +1382,24 @@ public class GriefPrevention extends JavaPlugin
|
||||||
permissions.append(this.trustEntryToPlayerName(accessor)).append(' ');
|
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(permissions.toString());
|
||||||
|
|
||||||
player.sendMessage(
|
player.sendMessage(
|
||||||
ChatColor.GOLD + this.dataStore.getMessage(Messages.Manage) + " " +
|
ChatColor.GOLD + this.dataStore.getMessage(Messages.Manage) + " " +
|
||||||
ChatColor.YELLOW + this.dataStore.getMessage(Messages.Build) + " " +
|
ChatColor.YELLOW + this.dataStore.getMessage(Messages.Build) + " " +
|
||||||
ChatColor.GREEN + this.dataStore.getMessage(Messages.Containers) + " " +
|
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())
|
if (claim.getSubclaimRestrictions())
|
||||||
{
|
{
|
||||||
|
|
@ -2715,7 +2727,7 @@ public class GriefPrevention extends JavaPlugin
|
||||||
}
|
}
|
||||||
else if (permissionLevel == ClaimPermission.Claim)
|
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
|
else //ClaimPermission.Inventory
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user