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