9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2026-01-04 15:41:38 +00:00

添加图腾函数

This commit is contained in:
jhqwqmc
2025-11-25 21:52:34 +08:00
parent 13acd6f86e
commit d897a5587c
6 changed files with 114 additions and 1 deletions

View File

@@ -34,6 +34,7 @@ import net.momirealms.craftengine.core.plugin.context.CooldownData;
import net.momirealms.craftengine.core.plugin.locale.TranslationManager;
import net.momirealms.craftengine.core.plugin.network.ConnectionState;
import net.momirealms.craftengine.core.plugin.network.EntityPacketHandler;
import net.momirealms.craftengine.core.sound.SoundData;
import net.momirealms.craftengine.core.sound.SoundSource;
import net.momirealms.craftengine.core.util.*;
import net.momirealms.craftengine.core.world.*;
@@ -1278,4 +1279,9 @@ public class BukkitServerPlayer extends Player {
public void setExperienceLevels(int level) {
platformPlayer().setLevel(level);
}
@Override
public void sendTotemAnimation(Item<?> totem, @Nullable SoundData sound, boolean removeSound) {
PlayerUtils.sendTotemAnimation(this, totem, sound, removeSound);
}
}

View File

@@ -57,7 +57,7 @@ public final class PlayerUtils {
}
}
public static void sendTotemAnimation(Player player, Item<ItemStack> totem, @Nullable SoundData sound, boolean removeSound) {
public static void sendTotemAnimation(Player player, Item<?> totem, @Nullable SoundData sound, boolean removeSound) {
List<Object> packets = new ArrayList<>();
try {
Object totemItem = totem.getLiteralObject();