diff --git a/BauSystem_Core/src/de/steamwar/bausystem/commands/CommandLockschem.java b/BauSystem_Core/src/de/steamwar/bausystem/commands/CommandLockschem.java index 6aebd98..c5f20eb 100644 --- a/BauSystem_Core/src/de/steamwar/bausystem/commands/CommandLockschem.java +++ b/BauSystem_Core/src/de/steamwar/bausystem/commands/CommandLockschem.java @@ -21,10 +21,7 @@ package de.steamwar.bausystem.commands; import de.steamwar.bausystem.BauSystem; import de.steamwar.command.SWCommand; -import de.steamwar.sql.SchematicNode; -import de.steamwar.sql.SchematicType; -import de.steamwar.sql.SteamwarUser; -import de.steamwar.sql.UserGroup; +import de.steamwar.sql.*; import org.bukkit.entity.Player; public class CommandLockschem extends SWCommand { @@ -35,13 +32,7 @@ public class CommandLockschem extends SWCommand { @Register(help = true) public void genericHelp(Player p, String... args) { - SteamwarUser steamwarUser = SteamwarUser.get(p.getUniqueId()); - UserGroup userGroup = steamwarUser.getUserGroup(); - - if (userGroup != UserGroup.Admin && - userGroup != UserGroup.Developer && - userGroup != UserGroup.Moderator && - userGroup != UserGroup.Supporter) { + if (!SteamwarUser.get(p.getUniqueId()).hasPerm(UserPerm.CHECK)) { return; } @@ -50,13 +41,7 @@ public class CommandLockschem extends SWCommand { @Register public void genericCommand(Player p, String owner, String schematicName) { - SteamwarUser steamwarUser = SteamwarUser.get(p.getUniqueId()); - UserGroup userGroup = steamwarUser.getUserGroup(); - - if (userGroup != UserGroup.Admin && - userGroup != UserGroup.Developer && - userGroup != UserGroup.Moderator && - userGroup != UserGroup.Supporter) { + if (!SteamwarUser.get(p.getUniqueId()).hasPerm(UserPerm.CHECK)) { return; }