Push progress

This commit is contained in:
len
2021-06-06 21:32:13 +02:00
parent 5d8d7b5dff
commit 198e80aa7a
15 changed files with 242 additions and 140 deletions
@@ -1,5 +1,6 @@
package com.alttd.chat.commands;
import com.alttd.chat.ChatAPI;
import com.alttd.chat.VelocityChat;
import com.alttd.chat.config.Config;
import com.mojang.brigadier.arguments.StringArgumentType;
@@ -25,7 +26,7 @@ public class GlobalChatToggle {
.then(RequiredArgumentBuilder
.<CommandSource, String>argument("message", StringArgumentType.greedyString())
.executes(context -> {
LuckPerms luckPerms = VelocityChat.getPlugin().getLuckPerms();
LuckPerms luckPerms = ChatAPI.get().getLuckPerms();
Player player = (Player) context;
luckPerms.getUserManager().modifyUser(player.getUniqueId(), user -> {
if(player.hasPermission(Config.GCPERMISSION)) { //TODO THIS MUST BE A CONSTANT FROM CONFIG?