emu.grasscutter.server.packet.send.PacketScenePlayerLocationNotify Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of grasscutter Show documentation
Show all versions of grasscutter Show documentation
A server software reimplementation for an anime game.
The newest version!
package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.player.Player;
import emu.grasscutter.game.world.Scene;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.ScenePlayerLocationNotifyOuterClass.ScenePlayerLocationNotify;
public class PacketScenePlayerLocationNotify extends BasePacket {
public PacketScenePlayerLocationNotify(Scene scene) {
super(PacketOpcodes.ScenePlayerLocationNotify);
ScenePlayerLocationNotify.Builder proto = ScenePlayerLocationNotify.newBuilder()
.setSceneId(scene.getId());
for (Player p : scene.getPlayers()) {
proto.addPlayerLocList(p.getPlayerLocationInfo());
}
this.setData(proto);
}
}