mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-29 20:09:13 +00:00
clean: move nms spawn balloon method to CosmeticUser
This commit is contained in:
@@ -23,8 +23,6 @@ public interface NMSHandler {
|
||||
|
||||
Entity spawnDisplayEntity(Location location, String text);
|
||||
|
||||
UserBalloonManager spawnBalloon(CosmeticUser user, CosmeticBalloonType cosmeticBalloonType);
|
||||
|
||||
void slotUpdate(
|
||||
Player player,
|
||||
int slot
|
||||
|
||||
@@ -385,8 +385,17 @@ public class CosmeticUser {
|
||||
|
||||
public void spawnBalloon(CosmeticBalloonType cosmeticBalloonType) {
|
||||
if (this.userBalloonManager != null) return;
|
||||
this.userBalloonManager = NMSHandlers.getHandler().spawnBalloon(this, cosmeticBalloonType);
|
||||
//updateCosmetic(cosmeticBalloonType);
|
||||
|
||||
org.bukkit.entity.Entity entity = getEntity();
|
||||
|
||||
UserBalloonManager userBalloonManager1 = new UserBalloonManager(this, entity.getLocation());
|
||||
userBalloonManager1.getModelEntity().teleport(entity.getLocation().add(cosmeticBalloonType.getBalloonOffset()));
|
||||
|
||||
userBalloonManager1.spawnModel(cosmeticBalloonType, getCosmeticColor(cosmeticBalloonType.getSlot()));
|
||||
userBalloonManager1.addPlayerToModel(this, cosmeticBalloonType, getCosmeticColor(cosmeticBalloonType.getSlot()));
|
||||
|
||||
this.userBalloonManager = userBalloonManager1;
|
||||
//this.userBalloonManager = NMSHandlers.getHandler().spawnBalloon(this, cosmeticBalloonType);
|
||||
}
|
||||
|
||||
public void despawnBalloon() {
|
||||
|
||||
Reference in New Issue
Block a user