Fix nicknames and prefixes

This commit is contained in:
destro174
2021-07-18 00:48:55 +02:00
parent 3f7084eeb7
commit 96dbdc6dd0
18 changed files with 178 additions and 109 deletions
@@ -16,7 +16,7 @@ public class GlobalAdminChat {
public GlobalAdminChat(ProxyServer proxyServer) {
LiteralCommandNode<CommandSource> command = LiteralArgumentBuilder
.<CommandSource>literal("globaladminchat")
.requires(ctx -> ctx.hasPermission("command.proxy.globaladminchat"))// TODO permission system? load permissions from config?
.requires(ctx -> ctx.hasPermission("command.proxy.globaladminchat"))
.then(RequiredArgumentBuilder
.<CommandSource, String>argument("message", StringArgumentType.greedyString())
.executes(context -> {
@@ -24,7 +24,7 @@ public class Message {
/*public Message(ProxyServer proxyServer) {
LiteralCommandNode<CommandSource> command = LiteralArgumentBuilder
.<CommandSource>literal("message")
.requires(ctx -> ctx.hasPermission("command.proxy.message"))// TODO permission system? load permissions from config?
.requires(ctx -> ctx.hasPermission("command.proxy.message"))
.then(RequiredArgumentBuilder
.<CommandSource, String>argument("player", StringArgumentType.word())
.suggests((context, builder) -> {
@@ -42,7 +42,7 @@ public class SendMail {
LiteralCommandNode<CommandSource> command = LiteralArgumentBuilder
.<CommandSource>literal("mail")
.requires(ctx -> ctx.hasPermission("command.proxy.mail"))// TODO permission
.requires(ctx -> ctx.hasPermission("command.proxy.mail"))
.then(LiteralArgumentBuilder.<CommandSource>literal("send")
.then(playerNode
.then(RequiredArgumentBuilder