mirror of
https://github.com/Xiao-MoMi/Custom-Nameplates.git
synced 2025-12-19 15:09:23 +00:00
2.3.3.6
This commit is contained in:
@@ -7,7 +7,7 @@ plugins {
|
|||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
|
|
||||||
version = "2.3.3.4"
|
version = "2.3.3.6"
|
||||||
|
|
||||||
apply<JavaPlugin>()
|
apply<JavaPlugin>()
|
||||||
apply(plugin = "java")
|
apply(plugin = "java")
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ dependencies {
|
|||||||
compileOnly("commons-io:commons-io:2.15.1")
|
compileOnly("commons-io:commons-io:2.15.1")
|
||||||
compileOnly("org.geysermc.geyser:api:2.2.0-SNAPSHOT")
|
compileOnly("org.geysermc.geyser:api:2.2.0-SNAPSHOT")
|
||||||
compileOnly("LibsDisguises:LibsDisguises:10.0.42")
|
compileOnly("LibsDisguises:LibsDisguises:10.0.42")
|
||||||
compileOnly("com.github.Xiao-MoMi:BiomeAPI:0.2")
|
compileOnly("com.github.Xiao-MoMi:BiomeAPI:0.3")
|
||||||
|
|
||||||
// chat channels
|
// chat channels
|
||||||
compileOnly(files("libs/VentureChat-3.7.1.jar"))
|
compileOnly(files("libs/VentureChat-3.7.1.jar"))
|
||||||
|
|||||||
@@ -85,7 +85,8 @@ public class CustomNameplatesPluginImpl extends CustomNameplatesPlugin implement
|
|||||||
Dependency.SQLITE_DRIVER,
|
Dependency.SQLITE_DRIVER,
|
||||||
Dependency.BSTATS_BASE,
|
Dependency.BSTATS_BASE,
|
||||||
Dependency.HIKARI,
|
Dependency.HIKARI,
|
||||||
Dependency.BSTATS_BUKKIT
|
Dependency.BSTATS_BUKKIT,
|
||||||
|
Dependency.BIOME_API
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
ReflectionUtils.load();
|
ReflectionUtils.load();
|
||||||
|
|||||||
@@ -312,7 +312,7 @@ public class NameplateManagerImpl implements NameplateManager, Listener {
|
|||||||
plugin.getScheduler().runTaskAsyncLater(() -> {
|
plugin.getScheduler().runTaskAsyncLater(() -> {
|
||||||
if (player.isOnline())
|
if (player.isOnline())
|
||||||
this.createNameTag(player);
|
this.createNameTag(player);
|
||||||
}, 100, TimeUnit.MILLISECONDS);
|
}, 50, TimeUnit.MILLISECONDS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,12 +22,15 @@ import com.francobm.magicosmetics.api.CosmeticType;
|
|||||||
import com.francobm.magicosmetics.cache.PlayerData;
|
import com.francobm.magicosmetics.cache.PlayerData;
|
||||||
import com.francobm.magicosmetics.cache.cosmetics.Hat;
|
import com.francobm.magicosmetics.cache.cosmetics.Hat;
|
||||||
import com.francobm.magicosmetics.events.*;
|
import com.francobm.magicosmetics.events.*;
|
||||||
|
import net.momirealms.customnameplates.api.CustomNameplatesPlugin;
|
||||||
import net.momirealms.customnameplates.paper.mechanic.nameplate.tag.unlimited.UnlimitedPlayer;
|
import net.momirealms.customnameplates.paper.mechanic.nameplate.tag.unlimited.UnlimitedPlayer;
|
||||||
import net.momirealms.customnameplates.paper.mechanic.nameplate.tag.unlimited.UnlimitedTagManagerImpl;
|
import net.momirealms.customnameplates.paper.mechanic.nameplate.tag.unlimited.UnlimitedTagManagerImpl;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
|
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
public class MagicCosmeticsListener implements Listener {
|
public class MagicCosmeticsListener implements Listener {
|
||||||
|
|
||||||
private final UnlimitedTagManagerImpl unlimitedTagManager;
|
private final UnlimitedTagManagerImpl unlimitedTagManager;
|
||||||
@@ -94,10 +97,12 @@ public class MagicCosmeticsListener implements Listener {
|
|||||||
public void onDataLoaded(PlayerDataLoadEvent event) {
|
public void onDataLoaded(PlayerDataLoadEvent event) {
|
||||||
for (Cosmetic cosmetic : event.getEquippedCosmetics()) {
|
for (Cosmetic cosmetic : event.getEquippedCosmetics()) {
|
||||||
if (cosmetic instanceof Hat hat) {
|
if (cosmetic instanceof Hat hat) {
|
||||||
|
CustomNameplatesPlugin.get().getScheduler().runTaskAsyncLater(() -> {
|
||||||
if (unlimitedTagManager.getUnlimitedObject(event.getPlayerData().getUniqueId()) instanceof UnlimitedPlayer unlimitedPlayer) {
|
if (unlimitedTagManager.getUnlimitedObject(event.getPlayerData().getUniqueId()) instanceof UnlimitedPlayer unlimitedPlayer) {
|
||||||
unlimitedPlayer.setHatOffset(hat.isHideCosmetic() ? 0 : hat.getOffSetY());
|
unlimitedPlayer.setHatOffset(hat.isHideCosmetic() ? 0 : hat.getOffSetY());
|
||||||
unlimitedPlayer.teleport();
|
unlimitedPlayer.teleport();
|
||||||
}
|
}
|
||||||
|
}, 100, TimeUnit.MILLISECONDS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ import net.momirealms.customnameplates.paper.util.ClassUtils;
|
|||||||
import net.momirealms.customnameplates.paper.util.ConfigUtils;
|
import net.momirealms.customnameplates.paper.util.ConfigUtils;
|
||||||
import net.momirealms.customnameplates.paper.util.DisguiseUtils;
|
import net.momirealms.customnameplates.paper.util.DisguiseUtils;
|
||||||
import net.momirealms.customnameplates.paper.util.GeyserUtils;
|
import net.momirealms.customnameplates.paper.util.GeyserUtils;
|
||||||
|
import org.bson.types.Binary;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|||||||
Reference in New Issue
Block a user