Improves button and material customization
Allows specifying a comma-separated list of materials and tags for a portal's button, open-material, closed-material and border blocks. A random value is used if more than one material is available.0 Uses the supplied button if any, instead of enforcing the specified button material. Always protects the button against block breaking. Fixes an incorrect permission result in the previous commit, which caused players stargate access to be inverted.
This commit is contained in:
@@ -409,11 +409,13 @@ public final class PermissionHelper {
|
||||
}
|
||||
|
||||
//Player cannot access portal
|
||||
if (!PermissionHelper.cannotAccessPortal(player, entrancePortal, destination)) {
|
||||
if (PermissionHelper.cannotAccessPortal(player, entrancePortal, destination)) {
|
||||
if (!entrancePortal.getOptions().isSilent()) {
|
||||
Stargate.getMessageSender().sendErrorMessage(player, Stargate.getString("denyMsg"));
|
||||
}
|
||||
new PlayerTeleporter(entrancePortal, player).teleportPlayer(entrancePortal, event);
|
||||
Stargate.debug("PermissionHelper::playerCannotTeleport", "Closed portal because player is " +
|
||||
"missing necessary permissions");
|
||||
entrancePortal.getPortalOpener().closePortal(false);
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user