mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-16 09:34:46 +00:00
Made player script implementation closer to that of 1.12.
This commit is contained in:
1 parent
69b7a9aab4
commit
3a9789b3fd
12 files changed
+89
-119
No files matched your search
@@ -145,12 +145,11 @@ public class PacketHandlerServer{
|
||||
|
||||
private void playerScriptPackets(EnumPacketServer type, ByteBuf buffer, EntityPlayerMP player) throws Exception {
|
||||
NBTTagCompound compound;
|
||||
if(type == EnumPacketServer.ScriptPlayerGet) {
|
||||
PlayerDataScript data = ScriptController.Instance.playerScripts;
|
||||
compound = data.writeToNBT(new NBTTagCompound());
|
||||
if (type == EnumPacketServer.ScriptPlayerGet) {
|
||||
compound = ScriptController.Instance.playerScripts.writeToNBT(new NBTTagCompound());
|
||||
compound.setTag("Languages", ScriptController.Instance.nbtLanguages());
|
||||
Server.sendData(player, EnumPacketClient.GUI_DATA, compound);
|
||||
} else if(type == EnumPacketServer.ScriptPlayerSave) {
|
||||
Server.sendData(player, EnumPacketClient.GUI_DATA, new Object[]{compound});
|
||||
} else if (type == EnumPacketServer.ScriptPlayerSave) {
|
||||
ScriptController.Instance.setPlayerScripts(Server.readNBT(buffer));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user