diff --git a/src/main/java/com/onarandombox/MultiverseCore/utils/PermissionTools.java b/src/main/java/com/onarandombox/MultiverseCore/utils/PermissionTools.java index 84e9c2be..e3471612 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/utils/PermissionTools.java +++ b/src/main/java/com/onarandombox/MultiverseCore/utils/PermissionTools.java @@ -146,4 +146,22 @@ public class PermissionTools { } return true; } + + /** + * Checks to see if a player should bypass game mode restrictions. + * + * @param toWorld world travelling to. + * @param teleportee player travelling. + * @return True if they should bypass restrictions + */ + public boolean playerCanIgnoreGameModeRestriction(MultiverseWorld toWorld, Player teleportee) { + if (toWorld != null) { + return this.plugin.getMVPerms().canIgnoreGameModeRestriction(teleportee, toWorld); + } else { + //TODO: Determine if this value is false because a world didn't exist + // or if it was because a world wasn't imported. + return true; + } + return true; + } }