9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-19 15:09:19 +00:00

feat: use new hibiscus commons method for pufferfish spawning

This commit is contained in:
Logan
2025-09-07 21:34:38 -05:00
parent 3843a28804
commit 732c3de0d8

View File

@@ -1,8 +1,8 @@
package com.hibiscusmc.hmccosmetics.user.manager;
import com.hibiscusmc.hmccosmetics.HMCCosmeticsPlugin;
import com.hibiscusmc.hmccosmetics.util.packets.HMCCPacketManager;
import lombok.Getter;
import me.lojosho.hibiscuscommons.nms.NMSHandlers;
import org.bukkit.Location;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
@@ -21,6 +21,7 @@ public class UserBalloonPufferfish extends UserEntity {
public UserBalloonPufferfish(UUID owner, int pufferFishEntityId, UUID uuid) {
super(owner);
this.pufferFishEntityId = pufferFishEntityId;
setIds(List.of(pufferFishEntityId));
this.uuid = uuid;
}
@@ -30,8 +31,11 @@ public class UserBalloonPufferfish extends UserEntity {
}
public void spawnPufferfish(Location location, List<Player> sendTo) {
NMSHandlers.getHandler().getPacketHandler().sendInvisibleEntity(pufferFishEntityId, EntityType.PUFFERFISH, location, uuid, sendTo);
/*
HMCCPacketManager.sendEntitySpawnPacket(location, pufferFishEntityId, EntityType.PUFFERFISH, uuid, sendTo);
HMCCPacketManager.sendInvisibilityPacket(pufferFishEntityId, sendTo);
*/
}
public void destroyPufferfish() {