port: replace Paper component APIs, chat pipeline, events and schedulers
- Msg.send/broadcast/actionBar/title/legacy/plain for all 58 files sendMessage replacements (plan step 3) - ChatEventListener: AsyncChatEvent->AsyncPlayerChatEvent, getRecipients filtering, manual render+Msg.send loop, HIGHEST|ignoreCancelled, nobodyHeard via Bukkit scheduler (step 4) - EnhancedChatRenderer: remove ChatRenderer/Audience, render(Player,Component,Component,Player), getLocale String, Msg.actionBar - PlayerEventListener: join/quit/death String API, getCustomName/getDisplayName legacy, Msg.broadcast - FoliaUtil: IS_FOLIA false, Bukkit scheduler only; AutoMessageManager BukkitTask - CustomCommandManager: reflective getCommandMap; other mechanical fixes (displayName, kick, inventory titles) - single universal jar (variant A) - loads on Spigot 1.20.1 and Paper
This commit is contained in:
parent
88e4e68cca
commit
7f513a7104
56 changed files with 506 additions and 416 deletions
|
|
@ -1,5 +1,7 @@
|
|||
package com.loki.lochat.commands.messaging;
|
||||
|
||||
import com.loki.lochat.compat.Msg;
|
||||
|
||||
import com.loki.lochat.LoChat;
|
||||
import com.loki.lochat.api.service.MessagingService;
|
||||
import com.loki.lochat.api.service.pm.PrivateMessageService;
|
||||
|
|
@ -37,23 +39,23 @@ public class ReplyCommand implements CommandExecutor {
|
|||
return true;
|
||||
}
|
||||
if (args.length == 0) {
|
||||
player.sendMessage(ChatFormatter.parse(plugin.getMessageConfig().getInvalidUsage("/reply <сообщение>")));
|
||||
Msg.send(player, ChatFormatter.parse(plugin.getMessageConfig().getInvalidUsage("/reply <сообщение>")));
|
||||
return true;
|
||||
}
|
||||
|
||||
Optional<UUID> lastUuid = messagingService.getLastConversation(player.getUniqueId());
|
||||
if (lastUuid.isEmpty()) {
|
||||
player.sendMessage(ChatFormatter.parse(plugin.getMessageConfig().get("pm.no-reply")));
|
||||
Msg.send(player, ChatFormatter.parse(plugin.getMessageConfig().get("pm.no-reply")));
|
||||
return true;
|
||||
}
|
||||
|
||||
Player target = Bukkit.getPlayer(lastUuid.get());
|
||||
if (target == null) {
|
||||
player.sendMessage(ChatFormatter.parse(plugin.getMessageConfig().get("pm.player-offline")));
|
||||
Msg.send(player, ChatFormatter.parse(plugin.getMessageConfig().get("pm.player-offline")));
|
||||
return true;
|
||||
}
|
||||
if (messagingService.isIgnoring(target.getUniqueId(), player.getUniqueId())) {
|
||||
player.sendMessage(ChatFormatter.parse(plugin.getMessageConfig().get("pm.ignored")));
|
||||
Msg.send(player, ChatFormatter.parse(plugin.getMessageConfig().get("pm.ignored")));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue