Commit a1c12a77 authored by Ashijin's avatar Ashijin
Browse files

Fixed emotes and other bugs on 1.19.2

parent b0a7e0e2
......@@ -187,7 +187,7 @@
<dependency>
<groupId>com.ticxo.playeranimator</groupId>
<artifactId>PlayerAnimator</artifactId>
<version>R1.2.2</version>
<version>R1.2.4</version>
</dependency>
<!-- Spigot API -->
......
......@@ -2,34 +2,54 @@ package io.lumine.cosmetics.storage.sql;
import java.util.UUID;
import io.lumine.utils.plugin.LuminePlugin;
import io.lumine.utils.promise.Promise;
import io.lumine.utils.storage.players.Profile;
import io.lumine.utils.storage.players.adapters.SqlPlayerStorageAdapter;
import io.lumine.utils.storage.sql.SqlConnector;
public class SqlStorage implements SqlPlayerStorageAdapter {
public class SqlStorage<MCCosmeticsPlugin,CosmeticsProfile> extends SqlPlayerStorageAdapter {
public SqlStorage(LuminePlugin plugin, SqlConnector connector) {
super(plugin, connector);
// TODO Auto-generated constructor stub
}
@Override
public void load(LuminePlugin arg0) {
// TODO Auto-generated method stub
}
@Override
public Promise load(UUID uuid) {
public void unload() {
// TODO Auto-generated method stub
}
@Override
public Promise load(UUID arg0) {
// TODO Auto-generated method stub
return null;
}
@Override
public Promise loadByName(String name) {
public Promise loadByName(String arg0) {
// TODO Auto-generated method stub
return null;
}
@Override
public Promise save(UUID uuid, Profile profile) {
public Promise save(UUID arg0, Profile arg1) {
// TODO Auto-generated method stub
return null;
}
@Override
public boolean saveSync(UUID uuid, Profile profile) {
public boolean saveSync(UUID arg0, Profile arg1) {
// TODO Auto-generated method stub
return false;
}
}
......@@ -107,7 +107,6 @@ public class VolatileHatImpl implements VolatileEquipmentHelper {
}
public void handleSpawn(Profile profile) {
/*
final var maybeEquipped = profile.getEquipped(Hat.class);
if(maybeEquipped.isEmpty()) {
return;
......@@ -122,13 +121,12 @@ public class VolatileHatImpl implements VolatileEquipmentHelper {
final var nmsHat = CraftItemStack.asNMSCopy(hat.getCosmetic(equip));
ClientboundSetEquipmentPacket equipmentPacket = new ClientboundSetEquipmentPacket(player.getEntityId(), List.of(Pair.of(EquipmentSlot.HEAD, nmsHat)));
FriendlyByteBuf byteBuf = new FriendlyByteBuf(Unpooled.buffer());
byteBuf.writeByte(80);
equipmentPacket.write(byteBuf);
//FriendlyByteBuf byteBuf = new FriendlyByteBuf(Unpooled.buffer());
//byteBuf.writeByte(80);
//equipmentPacket.write(byteBuf);
final var pipeline = ((CraftPlayer) player).getHandle().connection.getConnection().channel.pipeline();
pipeline.writeAndFlush(byteBuf);
*/
pipeline.writeAndFlush(equipmentPacket);
}
}
......@@ -94,7 +94,6 @@ public class VolatileOffhandImpl implements VolatileEquipmentHelper {
}
public void handleSpawn(Profile profile) {
/*
final var maybeEquipped = profile.getEquipped(Offhand.class);
if(maybeEquipped.isEmpty()) {
return;
......@@ -114,8 +113,7 @@ public class VolatileOffhandImpl implements VolatileEquipmentHelper {
equipmentPacket.write(byteBuf);
final var pipeline = ((CraftPlayer) player).getHandle().connection.getConnection().channel.pipeline();
pipeline.writeAndFlush(byteBuf);
*/
pipeline.writeAndFlush(equipmentPacket);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment