use of com.irtimaled.bbor.common.models.ServerPlayer in project BoundingBoxOutlineReloaded by irtimaled.
the class CommonProxy method playerLoggedIn.
private void playerLoggedIn(PlayerLoggedIn event) {
if (seed == null || spawnX == null || spawnZ == null) {
return;
}
ServerPlayer player = event.getPlayer();
player.sendPacket(InitializeClient.getPayload(seed, spawnX, spawnZ));
}
use of com.irtimaled.bbor.common.models.ServerPlayer in project BoundingBoxOutlineReloaded by irtimaled.
the class CommonProxy method serverTick.
private void serverTick() {
for (Map.Entry<Integer, ServerPlayer> playerEntry : players.entrySet()) {
int playerId = playerEntry.getKey();
ServerPlayer player = playerEntry.getValue();
sendToPlayer(playerId, player);
}
}
use of com.irtimaled.bbor.common.models.ServerPlayer in project BoundingBoxOutlineReloaded by irtimaled.
the class CommonProxy method onPlayerSubscribed.
private void onPlayerSubscribed(PlayerSubscribed event) {
int playerId = event.getPlayerId();
ServerPlayer player = event.getPlayer();
players.put(playerId, player);
sendToPlayer(playerId, player);
}
use of com.irtimaled.bbor.common.models.ServerPlayer in project BoundingBoxOutlineReloaded by irtimaled.
the class CommonInterop method playerLoggedIn.
public static void playerLoggedIn(ServerPlayerEntity player) {
ServerPlayNetHandler connection = player.connection;
if (connection == null)
return;
NetworkManager networkManager = connection.netManager;
if (networkManager.isLocalChannel())
return;
EventBus.publish(new PlayerLoggedIn(new ServerPlayer(player)));
}
Aggregations