Add UserService and relocate private message sending

This commit is contained in:
Draycia committed 2020-07-01 13:24:57 -07:00
1 parent a57254aa6a
commit 554775ba13
17 files changed
+87 -117

No files matched your search

@@ -19,7 +19,7 @@ public class CommandManager {
commandManager = new BukkitCommandManager(simpleChat);
commandManager.getCommandCompletions().registerCompletion("chatchannel", (context) -> {
ChatUser user = UserManager.wrap(context.getPlayer());
ChatUser user = simpleChat.getUserService().wrap(context.getPlayer());
ArrayList<String> completions = new ArrayList<>();
@@ -45,7 +45,7 @@ public class CommandManager {
});
commandManager.getCommandConditions().addCondition(ChatChannel.class,"canuse", (context, execution, value) -> {
ChatUser user = UserManager.wrap(context.getIssuer().getPlayer());
ChatUser user = simpleChat.getUserService().wrap(context.getIssuer().getPlayer());
if (!value.canPlayerUse(user)) {
throw new ConditionFailedException(simpleChat.getConfig().getString("language.cannot-use-channel"));