Archiviert
1
0

Give Mods /mod permission

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2023-09-03 20:17:52 +02:00
Ursprung 244f922091
Commit ecf17dd347
2 geänderte Dateien mit 4 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -24,6 +24,7 @@ import de.steamwar.bungeecore.inventory.SWInventory;
import de.steamwar.bungeecore.inventory.SWItem; import de.steamwar.bungeecore.inventory.SWItem;
import de.steamwar.bungeecore.inventory.SWListInv; import de.steamwar.bungeecore.inventory.SWListInv;
import de.steamwar.bungeecore.inventory.SWStreamInv; import de.steamwar.bungeecore.inventory.SWStreamInv;
import de.steamwar.bungeecore.listeners.ConnectionListener;
import de.steamwar.command.SWCommand; import de.steamwar.command.SWCommand;
import de.steamwar.sql.Mod; import de.steamwar.sql.Mod;
import net.md_5.bungee.api.chat.ClickEvent; import net.md_5.bungee.api.chat.ClickEvent;
@ -36,7 +37,7 @@ import java.util.stream.Collectors;
public class ModCommand extends SWCommand { public class ModCommand extends SWCommand {
public ModCommand() { public ModCommand() {
super("mod", "bungeecore.softreload", "mods"); super("mod", ConnectionListener.MOD_PERMISSION, "mods");
} }
public static final Map<ProxiedPlayer, Mod.ModType> playerFilterType = new HashMap<>(); public static final Map<ProxiedPlayer, Mod.ModType> playerFilterType = new HashMap<>();

Datei anzeigen

@ -57,6 +57,7 @@ public class ConnectionListener extends BasicListener {
public static final String POLLRESULT_PERMISSION = "bungeecore.pollresult"; public static final String POLLRESULT_PERMISSION = "bungeecore.pollresult";
public static final String SOFTRELOAD_PERMISSION = "bungeecore.softreload"; public static final String SOFTRELOAD_PERMISSION = "bungeecore.softreload";
public static final String TEAMCHAT_PERMISSION = "bungeecore.teamchat"; public static final String TEAMCHAT_PERMISSION = "bungeecore.teamchat";
public static final String MOD_PERMISSION = "bungeecore.mod";
private static final Set<UUID> newPlayers = new HashSet<>(); private static final Set<UUID> newPlayers = new HashSet<>();
@ -80,6 +81,7 @@ public class ConnectionListener extends BasicListener {
player.setPermission(ALERT_PERMISSION, true); player.setPermission(ALERT_PERMISSION, true);
player.setPermission(KICK_PERMISSION, true); player.setPermission(KICK_PERMISSION, true);
player.setPermission(POLLRESULT_PERMISSION, true); player.setPermission(POLLRESULT_PERMISSION, true);
player.setPermission(MOD_PERMISSION, true);
} }
if(user.hasPerm(UserPerm.TEAM)) { if(user.hasPerm(UserPerm.TEAM)) {