Require build permission to place a boat.
Avoids boat spam, especially in public areas where /accesstrust is often granted to everyone.
This commit is contained in:
parent
5258416db4
commit
b2de66d030
|
|
@ -1805,10 +1805,10 @@ class PlayerEventHandler implements Listener
|
||||||
Claim claim = this.dataStore.getClaimAt(clickedBlock.getLocation(), false, playerData.lastClaim);
|
Claim claim = this.dataStore.getClaimAt(clickedBlock.getLocation(), false, playerData.lastClaim);
|
||||||
if(claim != null)
|
if(claim != null)
|
||||||
{
|
{
|
||||||
String noAccessReason = claim.allowAccess(player);
|
String noBuildReason = claim.allowBuild(player, Material.BOAT);
|
||||||
if(noAccessReason != null)
|
if(noBuildReason != null)
|
||||||
{
|
{
|
||||||
GriefPrevention.sendMessage(player, TextMode.Err, noAccessReason);
|
GriefPrevention.sendMessage(player, TextMode.Err, noBuildReason);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user