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