Updated to 1.21 by switching to cosmos

This commit is contained in:
2025-06-21 00:53:55 +02:00
parent 1dd19f0543
commit fc7860145f
40 changed files with 965 additions and 1015 deletions
@@ -8,18 +8,22 @@ import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
public class Reply implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if(!(sender instanceof Player)) {
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) {
if (!(sender instanceof Player player)) {
return true;
}
Player player = (Player) sender;
ChatUser user = ChatUserManager.getChatUser(player.getUniqueId());
if (user.getReplyTarget() == null) return false;
if(args.length == 0) return false; // todo error message or command info
if (user.getReplyTarget() == null) {
return false;
}
if (args.length == 0) {
return false; // todo error message or command info
}
String message = StringUtils.join(args, " ", 0, args.length);
ChatPlugin.getInstance().getChatHandler().privateMessage(player, user.getReplyTarget(), message);