Make placing and breaking boats use containertrust (#1065)

Consistent with minecarts
This commit is contained in:
FreeMonoid 2020-10-24 05:36:47 +03:00 committed by GitHub
parent 202f03e04c
commit 03074bf934
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1867,10 +1867,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 noBuildReason = claim.allowBuild(player, Material.OAK_BOAT); // Though only checks OAK_BOAT, permission should be same for all boats. Plus it being a boat doesn't seem to make a difference currently. String reason = claim.allowContainers(player);
if (noBuildReason != null) if (reason != null)
{ {
instance.sendMessage(player, TextMode.Err, noBuildReason); instance.sendMessage(player, TextMode.Err, reason);
event.setCancelled(true); event.setCancelled(true);
} }
} }