5.4
This commit is contained in:
parent
098a8c557f
commit
9b277f5801
|
|
@ -1,7 +1,7 @@
|
|||
name: GriefPrevention
|
||||
main: me.ryanhamshire.GriefPrevention.GriefPrevention
|
||||
softdepend: [Vault, Multiverse-Core, My Worlds]
|
||||
version: 5.3
|
||||
version: 5.4
|
||||
commands:
|
||||
abandonclaim:
|
||||
description: Deletes a claim.
|
||||
|
|
@ -121,6 +121,10 @@ commands:
|
|||
description: Kills a player, optionally giving his inventory to another player.
|
||||
usage: /DeathBlow <player> [recipientPlayer]
|
||||
permission: griefprevention.deathblow
|
||||
claimslist:
|
||||
description: Lists information about a player's claim blocks and claims.
|
||||
usage: /ClaimsList <player>
|
||||
permission: griefprevention.adjustbonusclaimblocks
|
||||
permissions:
|
||||
griefprevention.createclaims:
|
||||
description: Grants permission to create claims.
|
||||
|
|
|
|||
|
|
@ -418,16 +418,6 @@ public class FlatFileDataStore extends DataStore
|
|||
//String claimsString = inStream.readLine();
|
||||
inStream.readLine();
|
||||
|
||||
//find all the claims belonging to this player and note them for future reference
|
||||
for(int i = 0; i < this.claims.size(); i++)
|
||||
{
|
||||
Claim claim = this.claims.get(i);
|
||||
if(claim.ownerName.equals(playerName))
|
||||
{
|
||||
playerData.claims.add(claim);
|
||||
}
|
||||
}
|
||||
|
||||
inStream.close();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1253,6 +1253,35 @@ public class GriefPrevention extends JavaPlugin
|
|||
return true;
|
||||
}
|
||||
|
||||
//claimslist <player>
|
||||
else if(cmd.getName().equalsIgnoreCase("claimslist"))
|
||||
{
|
||||
//requires exactly one parameter, the other player's name
|
||||
if(args.length != 1) return false;
|
||||
|
||||
//try to find that player
|
||||
OfflinePlayer otherPlayer = this.resolvePlayer(args[0]);
|
||||
if(otherPlayer == null)
|
||||
{
|
||||
GriefPrevention.sendMessage(player, TextMode.Err, Messages.PlayerNotFound);
|
||||
return true;
|
||||
}
|
||||
|
||||
//load the player's data
|
||||
PlayerData playerData = this.dataStore.getPlayerData(otherPlayer.getName());
|
||||
player.sendMessage(playerData.accruedClaimBlocks + "(+" + playerData.bonusClaimBlocks + ")=" + playerData.accruedClaimBlocks + playerData.bonusClaimBlocks);
|
||||
for(int i = 0; i < playerData.claims.size(); i++)
|
||||
{
|
||||
Claim claim = playerData.claims.get(i);
|
||||
player.sendMessage("(-" + claim.getArea() + ") " + getfriendlyLocationString(claim.getLesserBoundaryCorner()));
|
||||
}
|
||||
|
||||
if(playerData.claims.size() > 0)
|
||||
player.sendMessage("=" + playerData.getRemainingClaimBlocks());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//deathblow <player> [recipientPlayer]
|
||||
else if(cmd.getName().equalsIgnoreCase("deathblow"))
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user