rework internals
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package com.alttd.velocitychat.commands;
|
||||
package com.alttd.chat.commands;
|
||||
|
||||
import com.alttd.velocitychat.api.GlobalAdminChatEvent;
|
||||
import com.alttd.chat.api.GlobalAdminChatEvent;
|
||||
import com.alttd.chat.config.Config;
|
||||
import com.mojang.brigadier.arguments.StringArgumentType;
|
||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.alttd.velocitychat.commands;
|
||||
package com.alttd.chat.commands;
|
||||
|
||||
import com.mojang.brigadier.arguments.StringArgumentType;
|
||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.alttd.velocitychat.commands;
|
||||
package com.alttd.chat.commands;
|
||||
|
||||
import com.alttd.velocitychat.ChatPlugin;
|
||||
import com.alttd.chat.VelocityChat;
|
||||
import com.alttd.chat.config.Config;
|
||||
import com.mojang.brigadier.arguments.StringArgumentType;
|
||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||
@@ -24,7 +24,7 @@ public class GlobalChatToggle {
|
||||
.then(RequiredArgumentBuilder
|
||||
.<CommandSource, String>argument("message", StringArgumentType.greedyString())
|
||||
.executes(context -> {
|
||||
LuckPerms luckPerms = ChatPlugin.getPlugin().API().getLuckPerms();
|
||||
LuckPerms luckPerms = VelocityChat.getPlugin().API().getLuckPerms();
|
||||
Player player = (Player) context;
|
||||
luckPerms.getUserManager().modifyUser(player.getUniqueId(), user -> {
|
||||
if(player.hasPermission(Config.GCPERMISSION)) { //TODO THIS MUST BE A CONSTANT FROM CONFIG?
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.alttd.velocitychat.commands;
|
||||
package com.alttd.chat.commands;
|
||||
|
||||
import com.alttd.velocitychat.ChatPlugin;
|
||||
import com.alttd.velocitychat.api.PrivateMessageEvent;
|
||||
import com.alttd.chat.VelocityChat;
|
||||
import com.alttd.chat.api.PrivateMessageEvent;
|
||||
import com.alttd.chat.config.Config;
|
||||
import com.mojang.brigadier.arguments.StringArgumentType;
|
||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||
@@ -39,7 +39,7 @@ public class Message {
|
||||
Player receiver = playerOptional.get();
|
||||
proxyServer.getEventManager().fire(new PrivateMessageEvent(context.getSource(), receiver, context.getArgument("message", String.class))).thenAccept((event) -> {
|
||||
if(event.getResult() == ResultedEvent.GenericResult.allowed()) {
|
||||
ChatPlugin.getPlugin().getChatHandler().privateMessage(event);
|
||||
VelocityChat.getPlugin().getChatHandler().privateMessage(event);
|
||||
}
|
||||
// event has finished firing
|
||||
// do some logic dependent on the result
|
||||
|
||||
Reference in New Issue
Block a user