SteamWar/MissileWars
Archiviert
13
0

Remove PermissionCheck for Spectate Command

Dieser Commit ist enthalten in:
jojo 2020-09-26 12:42:51 +02:00
Ursprung 3a92106559
Commit 31f1d91254

Datei anzeigen

@ -21,7 +21,6 @@ package de.steamwar.misslewars.commands;
import de.steamwar.misslewars.MWTeam;
import de.steamwar.misslewars.MissileWars;
import de.steamwar.misslewars.items.Missile;
import org.bukkit.GameMode;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
@ -30,21 +29,10 @@ import org.bukkit.entity.Player;
public class CommandSpectate implements CommandExecutor {
public boolean hasPermissions(Player p) {
if (p.hasPermission("bungeecore.group.admin")) return true;
if (p.hasPermission("bungeecore.group.developer")) return true;
if (p.hasPermission("bungeecore.group.moderator")) return true;
if (p.hasPermission("bungeecore.group.supporter")) return true;
if (p.hasPermission("bungeecore.group.builder")) return true;
if (p.hasPermission("bungeecore.group.youtuber")) return true;
return false;
}
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if(!(sender instanceof Player)) return false;
Player player = (Player) sender;
if (!hasPermissions(player)) return false;
MWTeam mwTeam = MissileWars.getTeam(player);
if (mwTeam == null) return false;