Remove PermissionCheck for Spectate Command
Dieser Commit ist enthalten in:
Ursprung
3a92106559
Commit
31f1d91254
@ -21,7 +21,6 @@ package de.steamwar.misslewars.commands;
|
|||||||
|
|
||||||
import de.steamwar.misslewars.MWTeam;
|
import de.steamwar.misslewars.MWTeam;
|
||||||
import de.steamwar.misslewars.MissileWars;
|
import de.steamwar.misslewars.MissileWars;
|
||||||
import de.steamwar.misslewars.items.Missile;
|
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
@ -30,21 +29,10 @@ import org.bukkit.entity.Player;
|
|||||||
|
|
||||||
public class CommandSpectate implements CommandExecutor {
|
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
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
if(!(sender instanceof Player)) return false;
|
if(!(sender instanceof Player)) return false;
|
||||||
Player player = (Player) sender;
|
Player player = (Player) sender;
|
||||||
if (!hasPermissions(player)) return false;
|
|
||||||
|
|
||||||
MWTeam mwTeam = MissileWars.getTeam(player);
|
MWTeam mwTeam = MissileWars.getTeam(player);
|
||||||
if (mwTeam == null) return false;
|
if (mwTeam == null) return false;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren