Fixed labymod emote

This commit is contained in:
Emmanuel Lampe 2020-04-13 12:38:35 +02:00
parent 5ca2599e6e
commit f587cc6cfa
2 changed files with 4 additions and 3 deletions

View File

@ -98,7 +98,7 @@ public abstract class NPCBase implements NPC, NPCPacketHandler {
forcedEmote.addProperty("uuid", uuid.toString());
forcedEmote.addProperty("emote_id", emoteId);
array.add(forcedEmote);
LMCUtils.sendLMCMessage(receiver, "emote_api", array.getAsJsonObject());
LMCUtils.sendLMCMessage(receiver, "emote_api", array);
}
public void disableFOV() {

View File

@ -1,6 +1,7 @@
package net.labymod.utilities;
import com.comphenix.tinyprotocol.Reflection;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
@ -30,9 +31,9 @@ public class LMCUtils {
*
* @param player Minecraft Client
* @param key LMC message key
* @param messageContent json object content
* @param messageContent json element
*/
public static void sendLMCMessage(Player player, String key, JsonObject messageContent) {
public static void sendLMCMessage(Player player, String key, JsonElement messageContent) {
byte[] bytes = LMCUtils.getBytesToSend(key, messageContent.toString());
// 12/4/20, JMB: Converted into reflections for multi-version support: