Fix build!
This commit is contained in:
@@ -8,7 +8,7 @@ import com.velocitypowered.api.command.CommandSource;
|
||||
import com.velocitypowered.api.command.SimpleCommand;
|
||||
import com.velocitypowered.api.proxy.Player;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.minimessage.placeholder.Placeholder;
|
||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.alttd.velocitychat.commands;
|
||||
|
||||
import com.alttd.chat.config.Config;
|
||||
import com.alttd.chat.util.Utility;
|
||||
import com.alttd.velocitychat.VelocityChat;
|
||||
import com.mojang.brigadier.arguments.StringArgumentType;
|
||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||
@@ -21,8 +22,6 @@ import java.util.Optional;
|
||||
|
||||
public class Report {
|
||||
|
||||
private static final MiniMessage miniMessage = MiniMessage.miniMessage();
|
||||
|
||||
public Report(ProxyServer proxyServer) {
|
||||
LiteralCommandNode<CommandSource> command = LiteralArgumentBuilder
|
||||
.<CommandSource>literal("report")
|
||||
@@ -46,7 +45,7 @@ public class Report {
|
||||
.<CommandSource, String>argument("report", StringArgumentType.greedyString())
|
||||
.executes(context -> {
|
||||
if (!(context.getSource() instanceof Player player)) {
|
||||
context.getSource().sendMessage(miniMessage.deserialize(Config.NO_CONSOLE));
|
||||
context.getSource().sendMessage(Utility.parseMiniMessage(Config.NO_CONSOLE));
|
||||
return 1;
|
||||
}
|
||||
Optional<ServerConnection> optionalServerConnection = player.getCurrentServer();
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.alttd.chat.util.Utility;
|
||||
import com.alttd.velocitychat.commands.SubCommand;
|
||||
import com.velocitypowered.api.command.CommandSource;
|
||||
import com.velocitypowered.api.proxy.Player;
|
||||
import net.kyori.adventure.text.minimessage.placeholder.Placeholder;
|
||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -38,7 +38,7 @@ public class Create implements SubCommand {
|
||||
}
|
||||
if (PartyManager.getParty(args[1]) != null) {
|
||||
source.sendMessage(Utility.parseMiniMessage(Config.PARTY_EXISTS,
|
||||
Placeholder.miniMessage("party", args[1])
|
||||
Placeholder.parsed("party", args[1])
|
||||
));
|
||||
return;
|
||||
}
|
||||
@@ -47,8 +47,8 @@ public class Create implements SubCommand {
|
||||
party.addUser(ChatUserManager.getChatUser(player.getUniqueId()), player.getUsername());
|
||||
PartyManager.addParty(party);
|
||||
source.sendMessage(Utility.parseMiniMessage(Config.CREATED_PARTY,
|
||||
Placeholder.miniMessage("party_name", party.getPartyName()),
|
||||
Placeholder.miniMessage("party_password", party.getPartyPassword())));
|
||||
Placeholder.unparsed("party_name", party.getPartyName()),
|
||||
Placeholder.unparsed("party_password", party.getPartyPassword())));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+4
-4
@@ -8,7 +8,7 @@ import com.alttd.velocitychat.VelocityChat;
|
||||
import com.alttd.velocitychat.commands.SubCommand;
|
||||
import com.velocitypowered.api.command.CommandSource;
|
||||
import com.velocitypowered.api.proxy.Player;
|
||||
import net.kyori.adventure.text.minimessage.placeholder.Placeholder;
|
||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -39,7 +39,7 @@ public class Disband implements SubCommand {
|
||||
return;
|
||||
}
|
||||
if (args.length == 1) {
|
||||
source.sendMessage(Utility.parseMiniMessage(Config.DISBAND_PARTY_CONFIRM, Placeholder.miniMessage("party", party.getPartyName())));
|
||||
source.sendMessage(Utility.parseMiniMessage(Config.DISBAND_PARTY_CONFIRM, Placeholder.unparsed("party", party.getPartyName())));
|
||||
return;
|
||||
}
|
||||
if (!args[1].equalsIgnoreCase("confirm") || !args[2].equals(party.getPartyName())) {
|
||||
@@ -48,8 +48,8 @@ public class Disband implements SubCommand {
|
||||
}
|
||||
VelocityChat.getPlugin().getChatHandler().sendPartyMessage(party,
|
||||
Utility.parseMiniMessage(Config.DISBANDED_PARTY,
|
||||
Placeholder.miniMessage("owner", player.getUsername()),
|
||||
Placeholder.miniMessage("party", party.getPartyName())
|
||||
Placeholder.unparsed("owner", player.getUsername()),
|
||||
Placeholder.unparsed("party", party.getPartyName())
|
||||
), null);
|
||||
party.delete();
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.alttd.velocitychat.commands.SubCommand;
|
||||
import com.velocitypowered.api.command.CommandSource;
|
||||
import com.velocitypowered.api.proxy.Player;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.minimessage.placeholder.Placeholder;
|
||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -38,8 +38,8 @@ public class Info implements SubCommand {
|
||||
}
|
||||
|
||||
source.sendMessage(Utility.parseMiniMessage(Config.PARTY_INFO,
|
||||
Placeholder.miniMessage("party", party.getPartyName()),
|
||||
Placeholder.miniMessage("password", party.getPartyPassword()),
|
||||
Placeholder.unparsed("party", party.getPartyName()),
|
||||
Placeholder.unparsed("password", party.getPartyPassword()),
|
||||
Placeholder.component("owner", party.getPartyUser(party.getOwnerUuid()).getDisplayName()),
|
||||
Placeholder.component("members", Component.join(Component.text(", "), displayNames))
|
||||
));
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.alttd.velocitychat.VelocityChat;
|
||||
import com.alttd.velocitychat.commands.SubCommand;
|
||||
import com.velocitypowered.api.command.CommandSource;
|
||||
import com.velocitypowered.api.proxy.Player;
|
||||
import net.kyori.adventure.text.minimessage.placeholder.Placeholder;
|
||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -50,17 +50,17 @@ public class Invite implements SubCommand {
|
||||
|
||||
if (!target.isActive()) {
|
||||
source.sendMessage(Utility.parseMiniMessage(Config.NOT_ONLINE,
|
||||
Placeholder.miniMessage("player", target.getUsername())
|
||||
Placeholder.unparsed("player", target.getUsername())
|
||||
));
|
||||
return;
|
||||
}
|
||||
|
||||
target.sendMessage(Utility.parseMiniMessage(Config.JOIN_PARTY_CLICK_MESSAGE,
|
||||
Placeholder.miniMessage("party", party.getPartyName()),
|
||||
Placeholder.miniMessage("party_password", party.getPartyPassword())
|
||||
Placeholder.unparsed("party", party.getPartyName()),
|
||||
Placeholder.unparsed("party_password", party.getPartyPassword())
|
||||
));
|
||||
source.sendMessage(Utility.parseMiniMessage(Config.SENT_PARTY_INV,
|
||||
Placeholder.miniMessage("player", target.getUsername())
|
||||
Placeholder.unparsed("player", target.getUsername())
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import com.alttd.velocitychat.VelocityChat;
|
||||
import com.alttd.velocitychat.commands.SubCommand;
|
||||
import com.velocitypowered.api.command.CommandSource;
|
||||
import com.velocitypowered.api.proxy.Player;
|
||||
import net.kyori.adventure.text.minimessage.placeholder.Placeholder;
|
||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -46,11 +46,11 @@ public class Join implements SubCommand {
|
||||
// party.addUser(ChatUserManager.getChatUser(player.getUniqueId())); //Removed until we can get nicknames to translate to colors correctly
|
||||
ChatUser chatUser = ChatUserManager.getChatUser(player.getUniqueId());
|
||||
party.addUser(chatUser, player.getUsername());
|
||||
source.sendMessage(Utility.parseMiniMessage(Config.JOINED_PARTY, Placeholder.miniMessage("party_name", party.getPartyName())));
|
||||
source.sendMessage(Utility.parseMiniMessage(Config.JOINED_PARTY, Placeholder.unparsed("party_name", party.getPartyName())));
|
||||
VelocityChat.getPlugin().getChatHandler().sendPartyMessage(party,
|
||||
Utility.parseMiniMessage(Config.PLAYER_JOINED_PARTY,
|
||||
Placeholder.component("player_name", chatUser.getDisplayName()),
|
||||
Placeholder.miniMessage("party_name", party.getPartyName())
|
||||
Placeholder.unparsed("party_name", party.getPartyName())
|
||||
), null);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.alttd.velocitychat.commands.SubCommand;
|
||||
import com.velocitypowered.api.command.CommandSource;
|
||||
import com.velocitypowered.api.proxy.Player;
|
||||
import com.velocitypowered.api.proxy.ServerConnection;
|
||||
import net.kyori.adventure.text.minimessage.placeholder.Placeholder;
|
||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -45,8 +45,8 @@ public class Leave implements SubCommand {
|
||||
source.sendMessage(Utility.parseMiniMessage(Config.NOTIFY_FINDING_NEW_OWNER));
|
||||
VelocityChat.getPlugin().getChatHandler().sendPartyMessage(party,
|
||||
Utility.parseMiniMessage(Config.OWNER_LEFT_PARTY,
|
||||
Placeholder.miniMessage("old_owner", player.getUsername()),
|
||||
Placeholder.miniMessage("new_owner", party.getPartyUser(uuid).getPlayerName())
|
||||
Placeholder.unparsed("old_owner", player.getUsername()),
|
||||
Placeholder.unparsed("new_owner", party.getPartyUser(uuid).getPlayerName())
|
||||
), null);
|
||||
} else {
|
||||
party.delete();
|
||||
@@ -55,7 +55,7 @@ public class Leave implements SubCommand {
|
||||
source.sendMessage(Utility.parseMiniMessage(Config.LEFT_PARTY));
|
||||
VelocityChat.getPlugin().getChatHandler().sendPartyMessage(party,
|
||||
Utility.parseMiniMessage(Config.PLAYER_LEFT_PARTY,
|
||||
Placeholder.miniMessage("player_name", player.getUsername())
|
||||
Placeholder.unparsed("player_name", player.getUsername())
|
||||
), null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.alttd.velocitychat.VelocityChat;
|
||||
import com.alttd.velocitychat.commands.SubCommand;
|
||||
import com.velocitypowered.api.command.CommandSource;
|
||||
import com.velocitypowered.api.proxy.Player;
|
||||
import net.kyori.adventure.text.minimessage.placeholder.Placeholder;
|
||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -45,7 +45,7 @@ public class Name implements SubCommand {
|
||||
}
|
||||
if (PartyManager.getParty(args[1]) != null) {
|
||||
source.sendMessage(Utility.parseMiniMessage(Config.PARTY_EXISTS,
|
||||
Placeholder.miniMessage("party", args[1])
|
||||
Placeholder.unparsed("party", args[1])
|
||||
));
|
||||
return;
|
||||
}
|
||||
@@ -54,8 +54,8 @@ public class Name implements SubCommand {
|
||||
party.setPartyName(args[1]);
|
||||
VelocityChat.getPlugin().getChatHandler().sendPartyMessage(party, Utility.parseMiniMessage(Config.RENAMED_PARTY,
|
||||
Placeholder.component("owner", ChatUserManager.getChatUser(player.getUniqueId()).getDisplayName()),
|
||||
Placeholder.miniMessage("old_name", oldName),
|
||||
Placeholder.miniMessage("new_name", args[1])
|
||||
Placeholder.unparsed("old_name", oldName),
|
||||
Placeholder.unparsed("new_name", args[1])
|
||||
), null);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.alttd.velocitychat.VelocityChat;
|
||||
import com.alttd.velocitychat.commands.SubCommand;
|
||||
import com.velocitypowered.api.command.CommandSource;
|
||||
import com.velocitypowered.api.proxy.Player;
|
||||
import net.kyori.adventure.text.minimessage.placeholder.Placeholder;
|
||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -44,15 +44,15 @@ public class Owner implements SubCommand {
|
||||
PartyUser partyUser = party.getPartyUser(args[1]);
|
||||
if (partyUser == null) {
|
||||
source.sendMessage(Utility.parseMiniMessage(Config.NOT_A_PARTY_MEMBER,
|
||||
Placeholder.miniMessage("player", args[1])
|
||||
Placeholder.unparsed("player", args[1])
|
||||
));
|
||||
return;
|
||||
}
|
||||
party.setNewOwner(partyUser.getUuid());
|
||||
VelocityChat.getPlugin().getChatHandler().sendPartyMessage(party,
|
||||
Utility.parseMiniMessage(Config.NEW_PARTY_OWNER,
|
||||
Placeholder.miniMessage("old_owner", player.getUsername()),
|
||||
Placeholder.miniMessage("new_owner", partyUser.getPlayerName())
|
||||
Placeholder.unparsed("old_owner", player.getUsername()),
|
||||
Placeholder.unparsed("new_owner", partyUser.getPlayerName())
|
||||
), null);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import com.alttd.velocitychat.VelocityChat;
|
||||
import com.alttd.velocitychat.commands.SubCommand;
|
||||
import com.velocitypowered.api.command.CommandSource;
|
||||
import com.velocitypowered.api.proxy.Player;
|
||||
import net.kyori.adventure.text.minimessage.placeholder.Placeholder;
|
||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -50,7 +50,7 @@ public class Remove implements SubCommand {
|
||||
partyUser = party.getPartyUser(args[1]);
|
||||
if (partyUser == null) {
|
||||
source.sendMessage(Utility.parseMiniMessage(Config.NOT_A_PARTY_MEMBER,
|
||||
Placeholder.miniMessage("player", args[1])
|
||||
Placeholder.unparsed("player", args[1])
|
||||
));
|
||||
return;
|
||||
}
|
||||
@@ -59,7 +59,7 @@ public class Remove implements SubCommand {
|
||||
partyUser = party.getPartyUser(onlinePlayer.getUniqueId());
|
||||
if (partyUser == null) {
|
||||
source.sendMessage(Utility.parseMiniMessage(Config.NOT_A_PARTY_MEMBER,
|
||||
Placeholder.miniMessage("player", onlinePlayer.getUsername())
|
||||
Placeholder.unparsed("player", onlinePlayer.getUsername())
|
||||
));
|
||||
return;
|
||||
}
|
||||
@@ -73,12 +73,12 @@ public class Remove implements SubCommand {
|
||||
|
||||
if (onlinePlayer != null && onlinePlayer.isActive()) {
|
||||
onlinePlayer.sendMessage(Utility.parseMiniMessage(Config.REMOVED_FROM_PARTY,
|
||||
Placeholder.miniMessage("party", party.getPartyName())
|
||||
Placeholder.unparsed("party", party.getPartyName())
|
||||
));
|
||||
}
|
||||
|
||||
source.sendMessage(Utility.parseMiniMessage(Config.REMOVED_USER_FROM_PARTY,
|
||||
Placeholder.miniMessage("player", onlinePlayer == null ? partyUser.getPlayerName() : onlinePlayer.getUsername())
|
||||
Placeholder.unparsed("player", onlinePlayer == null ? partyUser.getPlayerName() : onlinePlayer.getUsername())
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user