Tweaks: Build outside claims warning.
This commit is contained in:
parent
c4f7236e5f
commit
ea0efad12c
|
|
@ -201,6 +201,8 @@ public class BlockEventHandler implements Listener
|
||||||
Claim claim = this.dataStore.getClaimAt(block.getLocation(), true, playerData.lastClaim);
|
Claim claim = this.dataStore.getClaimAt(block.getLocation(), true, playerData.lastClaim);
|
||||||
if(claim != null)
|
if(claim != null)
|
||||||
{
|
{
|
||||||
|
playerData.lastClaim = claim;
|
||||||
|
|
||||||
//FEATURE: prevent theft from container using a hopper when the container is at the very bottom of a land claim
|
//FEATURE: prevent theft from container using a hopper when the container is at the very bottom of a land claim
|
||||||
|
|
||||||
if(block.getType() == Material.HOPPER)
|
if(block.getType() == Material.HOPPER)
|
||||||
|
|
@ -325,7 +327,7 @@ public class BlockEventHandler implements Listener
|
||||||
}
|
}
|
||||||
|
|
||||||
//FEATURE: warn players when they're placing non-trash blocks outside of their claimed areas
|
//FEATURE: warn players when they're placing non-trash blocks outside of their claimed areas
|
||||||
else if(!this.trashBlocks.contains(block.getType()) && GriefPrevention.instance.claimsEnabledForWorld(block.getWorld()) && playerData.claims.size() > 0)
|
else if(!this.trashBlocks.contains(block.getType()) && GriefPrevention.instance.claimsEnabledForWorld(block.getWorld()))
|
||||||
{
|
{
|
||||||
if(!playerData.warnedAboutBuildingOutsideClaims
|
if(!playerData.warnedAboutBuildingOutsideClaims
|
||||||
&& (playerData.lastClaim == null
|
&& (playerData.lastClaim == null
|
||||||
|
|
|
||||||
|
|
@ -1033,7 +1033,7 @@ public abstract class DataStore
|
||||||
this.addDefault(defaults, Messages.HowToClaimRegex, "(^|.*\\W)how\\W.*\\W(claim|protect|lock)(\\W.*|$)", "This is a Java Regular Expression. Look it up before editing! It's used to tell players about the demo video when they ask how to claim land.");
|
this.addDefault(defaults, Messages.HowToClaimRegex, "(^|.*\\W)how\\W.*\\W(claim|protect|lock)(\\W.*|$)", "This is a Java Regular Expression. Look it up before editing! It's used to tell players about the demo video when they ask how to claim land.");
|
||||||
this.addDefault(defaults, Messages.NoBuildOutsideClaims, "You can't build here unless you claim some land first.", null);
|
this.addDefault(defaults, Messages.NoBuildOutsideClaims, "You can't build here unless you claim some land first.", null);
|
||||||
this.addDefault(defaults, Messages.PlayerOfflineTime, " Last login: {0} days ago.", "0: number of full days since last login");
|
this.addDefault(defaults, Messages.PlayerOfflineTime, " Last login: {0} days ago.", "0: number of full days since last login");
|
||||||
this.addDefault(defaults, Messages.BuildingOutsideClaims, "Other players can undo your work here! Consider using a golden shovel to claim this area so that your work will be protected.", null);
|
this.addDefault(defaults, Messages.BuildingOutsideClaims, "Other players can build here, too. Consider creating a land claim to protect your work!", null);
|
||||||
this.addDefault(defaults, Messages.TrappedWontWorkHere, "Sorry, unable to find a safe location to teleport you to. Contact an admin, or consider /kill if you don't want to wait.", null);
|
this.addDefault(defaults, Messages.TrappedWontWorkHere, "Sorry, unable to find a safe location to teleport you to. Contact an admin, or consider /kill if you don't want to wait.", null);
|
||||||
this.addDefault(defaults, Messages.CommandBannedInPvP, "You can't use that command while in PvP combat.", null);
|
this.addDefault(defaults, Messages.CommandBannedInPvP, "You can't use that command while in PvP combat.", null);
|
||||||
this.addDefault(defaults, Messages.UnclaimCleanupWarning, "The land you've unclaimed may be changed by other players or cleaned up by administrators. If you've built something there you want to keep, you should reclaim it.", null);
|
this.addDefault(defaults, Messages.UnclaimCleanupWarning, "The land you've unclaimed may be changed by other players or cleaned up by administrators. If you've built something there you want to keep, you should reclaim it.", null);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user