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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user