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

Stupid workaround of just not adding the backpack as a passenger

This commit is contained in:
LoJoSho
2023-01-02 11:03:46 -06:00
parent bc0f1d1b49
commit b8576252c3
2 changed files with 4 additions and 1 deletions

View File

@@ -44,6 +44,8 @@ public class CosmeticBackpackType extends Cosmetic {
user.getBackpackEntity().teleport(loc);
PacketManager.sendRidingPacket(player.getEntityId(), user.getBackpackEntity().getEntityId(), loc);
/*
if (player.getPassengers().isEmpty()) {
//HMCCosmeticsPlugin.getInstance().getLogger().info("No passengers");
user.getBackpackEntity().teleport(loc);
@@ -51,6 +53,7 @@ public class CosmeticBackpackType extends Cosmetic {
} else {
//HMCCosmeticsPlugin.getInstance().getLogger().info("Passengers: " + player.getPassengers());
}
*/
user.getBackpackEntity().setRotation(loc.getYaw(), loc.getPitch());
user.showBackpack();

View File

@@ -223,7 +223,7 @@ public class CosmeticUser {
this.invisibleArmorstand = (ArmorStand) NMSHandlers.getHandler().spawnBackpack(this, cosmeticBackpackType);
player.addPassenger(invisibleArmorstand);
//player.addPassenger(invisibleArmorstand);
MessagesUtil.sendDebugMessages("spawnBackpack Bukkit - Finish");
}