mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 08:45:11 +00:00
Profile Tab + Config Sync
This commit is contained in:
1 parent
c7c981f4a7
commit
62482c307c
5 files changed
+33
No files matched your search
@@ -7,6 +7,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import noppes.npcs.NoppesUtilServer;
|
||||
import noppes.npcs.Server;
|
||||
import noppes.npcs.config.ConfigMain;
|
||||
import noppes.npcs.constants.EnumPacketClient;
|
||||
import noppes.npcs.constants.SyncType;
|
||||
import noppes.npcs.controllers.data.*;
|
||||
@@ -15,6 +16,16 @@ import java.util.HashMap;
|
||||
|
||||
public class SyncController {
|
||||
|
||||
public static void syncConfigs(EntityPlayerMP player){
|
||||
NBTTagCompound nbtTagCompound = new NBTTagCompound();
|
||||
nbtTagCompound.setBoolean("Profiles", true);
|
||||
Server.sendData(player, EnumPacketClient.SYNC_CONFIG, nbtTagCompound);
|
||||
}
|
||||
|
||||
public static void receiveConfigs(NBTTagCompound compound){
|
||||
ConfigMain.EnableProfiles = compound.getBoolean("Profiles");
|
||||
}
|
||||
|
||||
public static void syncPlayer(EntityPlayerMP player){
|
||||
NBTTagList list = new NBTTagList();
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
|
||||
Reference in new issue
Block a user