mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 22:15:08 +00:00
Add UserService and relocate private message sending
This commit is contained in:
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"));
|
||||
|
||||
Reference in new issue
Block a user