diff --git a/src/de/steamwar/lobby/commands/ShieldCommand.java b/src/de/steamwar/lobby/commands/ShieldCommand.java index 8eb99c6..c81d937 100644 --- a/src/de/steamwar/lobby/commands/ShieldCommand.java +++ b/src/de/steamwar/lobby/commands/ShieldCommand.java @@ -20,9 +20,9 @@ public class ShieldCommand implements CommandExecutor { UserGroup userGroup = steamwarUser.getUserGroup(); if(userGroup != UserGroup.Developer && - userGroup != UserGroup.Moderator && - userGroup != UserGroup.Admin && - userGroup != UserGroup.Youtuber) { + userGroup != UserGroup.Moderator && + userGroup != UserGroup.Admin && + userGroup != UserGroup.Youtuber) { player.sendMessage("§cDu verfügst nicht über die benötigten Rechte!"); return false; } diff --git a/src/de/steamwar/lobby/inventorys/LobbyInventory.java b/src/de/steamwar/lobby/inventorys/LobbyInventory.java index 4ec32d3..18f8a6b 100644 --- a/src/de/steamwar/lobby/inventorys/LobbyInventory.java +++ b/src/de/steamwar/lobby/inventorys/LobbyInventory.java @@ -2,6 +2,8 @@ package de.steamwar.lobby.inventorys; import de.steamwar.lobby.utils.ItemBuilder; import de.steamwar.lobby.utils.LobbyPlayer; +import de.steamwar.sql.SteamwarUser; +import de.steamwar.sql.UserGroup; import org.bukkit.Material; import org.bukkit.entity.Player; @@ -35,6 +37,14 @@ public class LobbyInventory { .removeAllAtributs() .build()); + + UserGroup userGroup = SteamwarUser.get(player.getUniqueId()).getUserGroup(); + if(userGroup != UserGroup.Developer && + userGroup != UserGroup.Moderator && + userGroup != UserGroup.Admin && + userGroup != UserGroup.Youtuber) { + return; + } player.getInventory().setItem(8, new ItemBuilder(SCHILD) .setDisplayName("§bSchild §8| " + (lobbyPlayer.isShield() ? "§aan" : "§caus")) .setUnbreakable(true)