mirror of
https://github.com/Xiao-MoMi/Custom-Nameplates.git
synced 2025-12-19 15:09:23 +00:00
Fixed spigot mapping
This commit is contained in:
@@ -19,6 +19,7 @@ package net.momirealms.customnameplates.bukkit.compatibility.chat;
|
||||
|
||||
import net.advancedplugins.chat.api.AdvancedChannelChatEvent;
|
||||
import net.advancedplugins.chat.api.AdvancedChatAPI;
|
||||
import net.advancedplugins.chat.api.AdvancedChatEvent;
|
||||
import net.advancedplugins.chat.channel.ChatChannel;
|
||||
import net.momirealms.customnameplates.api.CNPlayer;
|
||||
import net.momirealms.customnameplates.api.CustomNameplates;
|
||||
@@ -38,6 +39,17 @@ public class AdvancedChatProvider extends AbstractChatMessageProvider implements
|
||||
super(plugin, manager);
|
||||
}
|
||||
|
||||
@EventHandler(ignoreCancelled = true)
|
||||
public void onAdvancedChat(AdvancedChatEvent event) {
|
||||
Player player = event.getChatEvent().getPlayer();
|
||||
if (!player.isOnline()) return;
|
||||
CNPlayer cnPlayer = plugin.getPlayer(player.getUniqueId());
|
||||
if (cnPlayer == null) return;
|
||||
plugin.getScheduler().async().execute(() -> {
|
||||
manager.onChat(cnPlayer, event.getMessage(), "");
|
||||
});
|
||||
}
|
||||
|
||||
@EventHandler(ignoreCancelled = true)
|
||||
public void onAdvancedChat(AdvancedChannelChatEvent event) {
|
||||
String channel = event.getChannel().getSectionName();
|
||||
|
||||
@@ -324,18 +324,18 @@ public class Reflections {
|
||||
|
||||
public static final Class<?> clazz$HolderLookup$Provider = ReflectionUtils.getClazz(
|
||||
BukkitReflectionUtils.assembleMCClass("core.HolderLookup$Provider"),
|
||||
BukkitReflectionUtils.assembleMCClass("core.HolderLookup$b")
|
||||
BukkitReflectionUtils.assembleMCClass(VersionHelper.isVersionNewerThan1_20_5() ? "core.HolderLookup$a" : "core.HolderLookup$b")
|
||||
);
|
||||
|
||||
public static final Method method$Component$Serializer$fromJson = ReflectionUtils.getMethod(
|
||||
clazz$Component$Serializer,
|
||||
new String[] { "fromJson" },
|
||||
new String[] { "fromJson", "a" },
|
||||
String.class, clazz$HolderLookup$Provider
|
||||
);
|
||||
|
||||
public static final Method method$Component$Serializer$toJson = ReflectionUtils.getMethod(
|
||||
clazz$Component$Serializer,
|
||||
new String[] { "toJson" },
|
||||
new String[] { "toJson", "a" },
|
||||
clazz$Component, clazz$HolderLookup$Provider
|
||||
);
|
||||
|
||||
@@ -601,7 +601,7 @@ public class Reflections {
|
||||
public static final Class<?> clazz$SynchedEntityData$DataValue = requireNonNull(
|
||||
ReflectionUtils.getClazz(
|
||||
BukkitReflectionUtils.assembleMCClass("network.syncher.SynchedEntityData$DataValue"),
|
||||
BukkitReflectionUtils.assembleMCClass("network.syncher.DataWatcher$b")
|
||||
BukkitReflectionUtils.assembleMCClass(VersionHelper.isVersionNewerThan1_20_5() ? "network.syncher.DataWatcher$c" : "network.syncher.DataWatcher$b")
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user