use of com.comphenix.packetwrapper.WrapperPlayServerPlayerInfo in project AdvancedReplay by Jumper251.
the class PacketNPC method getInfoAddPacket.
private WrapperPlayServerPlayerInfo getInfoAddPacket() {
WrapperPlayServerPlayerInfo infoPacket = new WrapperPlayServerPlayerInfo();
infoPacket.setAction(EnumWrappers.PlayerInfoAction.ADD_PLAYER);
WrappedGameProfile profile = this.profile != null ? this.profile : new WrappedGameProfile(this.uuid, this.name);
PlayerInfoData data = new PlayerInfoData(profile, 1, EnumWrappers.NativeGameMode.CREATIVE, WrappedChatComponent.fromText(this.name));
List<PlayerInfoData> dataList = new ArrayList<PlayerInfoData>();
dataList.add(data);
infoPacket.setData(dataList);
return infoPacket;
}
use of com.comphenix.packetwrapper.WrapperPlayServerPlayerInfo in project AdvancedReplay by Jumper251.
the class PacketNPC method getInfoRemovePacket.
private WrapperPlayServerPlayerInfo getInfoRemovePacket() {
WrapperPlayServerPlayerInfo infoPacket = new WrapperPlayServerPlayerInfo();
infoPacket.setAction(EnumWrappers.PlayerInfoAction.REMOVE_PLAYER);
WrappedGameProfile profile = this.profile != null ? this.profile : new WrappedGameProfile(this.uuid, this.name);
PlayerInfoData data = new PlayerInfoData(profile, 1, EnumWrappers.NativeGameMode.CREATIVE, WrappedChatComponent.fromText(this.name));
List<PlayerInfoData> dataList = new ArrayList<PlayerInfoData>();
dataList.add(data);
infoPacket.setData(dataList);
return infoPacket;
}
use of com.comphenix.packetwrapper.WrapperPlayServerPlayerInfo in project AdvancedReplay by Jumper251.
the class PacketNPCOld method getInfoRemovePacket.
private WrapperPlayServerPlayerInfo getInfoRemovePacket() {
WrapperPlayServerPlayerInfo infoPacket = new WrapperPlayServerPlayerInfo();
infoPacket.setAction(EnumWrappers.PlayerInfoAction.REMOVE_PLAYER);
WrappedGameProfile profile = this.profile != null ? this.profile : new WrappedGameProfile(this.uuid, this.name);
PlayerInfoData data = new PlayerInfoData(profile, 1, EnumWrappers.NativeGameMode.CREATIVE, WrappedChatComponent.fromText(this.name));
List<PlayerInfoData> dataList = new ArrayList<PlayerInfoData>();
dataList.add(data);
infoPacket.setData(dataList);
return infoPacket;
}
use of com.comphenix.packetwrapper.WrapperPlayServerPlayerInfo in project AdvancedReplay by Jumper251.
the class PacketNPCOld method getInfoAddPacket.
private WrapperPlayServerPlayerInfo getInfoAddPacket() {
WrapperPlayServerPlayerInfo infoPacket = new WrapperPlayServerPlayerInfo();
infoPacket.setAction(EnumWrappers.PlayerInfoAction.ADD_PLAYER);
WrappedGameProfile profile = this.profile != null ? this.profile : new WrappedGameProfile(this.uuid, this.name);
PlayerInfoData data = new PlayerInfoData(profile, 1, EnumWrappers.NativeGameMode.CREATIVE, WrappedChatComponent.fromText(this.name));
List<PlayerInfoData> dataList = new ArrayList<PlayerInfoData>();
dataList.add(data);
infoPacket.setData(dataList);
return infoPacket;
}
Aggregations