9
0
mirror of https://github.com/Xiao-MoMi/Custom-Nameplates.git synced 2025-12-26 02:19:28 +00:00
This commit is contained in:
XiaoMoMi
2024-10-18 23:43:29 +08:00
parent ffdc7c49ce
commit f5e33f5647
3 changed files with 8 additions and 2 deletions

View File

@@ -17,13 +17,17 @@
package net.momirealms.customnameplates.bukkit;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.minimessage.MiniMessage;
import net.momirealms.customnameplates.api.*;
import net.momirealms.customnameplates.api.event.NameplatesReloadEvent;
import net.momirealms.customnameplates.api.feature.ChatListener;
import net.momirealms.customnameplates.api.feature.JoinQuitListener;
import net.momirealms.customnameplates.api.feature.OffsetFont;
import net.momirealms.customnameplates.api.feature.PlayerListener;
import net.momirealms.customnameplates.api.helper.AdventureHelper;
import net.momirealms.customnameplates.api.helper.VersionHelper;
import net.momirealms.customnameplates.api.placeholder.internal.StaticPosition;
import net.momirealms.customnameplates.api.util.Vector3;
import net.momirealms.customnameplates.backend.feature.actionbar.ActionBarManagerImpl;
import net.momirealms.customnameplates.backend.feature.advance.AdvanceManagerImpl;
@@ -284,6 +288,8 @@ public class BukkitCustomNameplates extends CustomNameplates implements Listener
AdventureHelper.clearCache();
this.onlinePlayerMap.clear();
this.entityIDFastLookup.clear();
this.scheduler.shutdownScheduler();
this.scheduler.shutdownExecutor();
this.loaded = false;
}

View File

@@ -163,7 +163,7 @@ public class BukkitNetworkManager implements PacketSender, PipelineInjector {
BukkitCNPlayer cnPlayer = new BukkitCNPlayer(plugin, channel);
cnPlayer.setPlayer(player);
injectChannel(channel, ConnectionState.PLAY);
((BukkitCustomNameplates) plugin).handleJoin(player);
plugin.handleJoin(player);
}
}
}

View File

@@ -287,7 +287,7 @@ public class Reflections {
public static final Object instance$MinecraftRegistry;
static {
if (VersionHelper.isVersionNewerThan1_20()) {
if (VersionHelper.isVersionNewerThan1_20_5()) {
try {
Method method = requireNonNull(ReflectionUtils.getMethod(clazz$CraftRegistry, new String[]{"getMinecraftRegistry"}));
instance$MinecraftRegistry = method.invoke(null);