Adds some minor style improvements

This commit is contained in:
2021-10-29 01:46:15 +02:00
parent 487cb3ad9e
commit f0e5cd45a4
5 changed files with 17 additions and 17 deletions

View File

@ -15,7 +15,7 @@ public final class EntityHelper {
* Gets the max size of an entity along its x and z axis
*
* <p>This function gets the ceiling of the max size of an entity, thus calculating the smallest box, using whole
* blocks as unit, needed to contain the entity. Assuming n is returned, an (n x n) box is needed to contain the
* blocks as unit, needed to contain the entity. Assuming n is returned, an (n x n) box is needed to contain the
* entity.</p>
*
* @param entity <p>The entity to get max size for</p>

View File

@ -26,7 +26,7 @@ public final class FileHelper {
/**
* Gets an input stream from a string pointing to an internal file
*
*
* <p>This is used for getting an input stream for reading a file contained within the compiled .jar file. The file
* should be in the resources directory, and the file path should start with a forward slash ("/") character.</p>
*

View File

@ -47,7 +47,7 @@ public final class PermissionHelper {
}
//Deny access if another player has activated the portal, and it's still in use
if (!portal.getOptions().isFixed() && portal.getPortalActivator().isActive() &&
if (!portal.getOptions().isFixed() && portal.getPortalActivator().isActive() &&
portal.getActivePlayer() != player) {
Stargate.getMessageSender().sendErrorMessage(player, Stargate.getString("denyMsg"));
return;
@ -95,7 +95,7 @@ public final class PermissionHelper {
*/
public static boolean cannotAccessPortal(Player player, Portal entrancePortal, Portal destination) {
boolean deny = false;
if (entrancePortal.getOptions().isBungee()) {
if (!PermissionHelper.canAccessServer(player, entrancePortal.getNetwork())) {
//If the portal is a bungee portal, and the player cannot access the server, deny
@ -135,7 +135,7 @@ public final class PermissionHelper {
/**
* Check if a player has been given a permission implicitly
*
* <p>This should be run if a player has a parent permission to check for the child permission. It is assumed the
* <p>This should be run if a player has a parent permission to check for the child permission. It is assumed the
* player has the child permission unless it's explicitly set to false.</p>
*
* @param player <p>The player to check</p>
@ -150,7 +150,7 @@ public final class PermissionHelper {
return true;
}
if (Stargate.getStargateConfig().isPermissionDebuggingEnabled()) {
Stargate.debug("hasPermissionImplicit::Permission", permission + " => " +
Stargate.debug("hasPermissionImplicit::Permission", permission + " => " +
player.hasPermission(permission));
}
return player.hasPermission(permission);
@ -338,12 +338,12 @@ public final class PermissionHelper {
*/
public static boolean canDestroyPortal(Player player, Portal portal) {
String network = portal.getNetwork();
//Use a special check for bungee portals
if (portal.getOptions().isBungee()) {
return hasPermission(player, "stargate.admin.bungee");
}
//Check if the player is allowed to destroy on all networks
if (hasPermission(player, "stargate.destroy.network")) {
//Check if the network has been explicitly denied