|
|
@ -191,9 +191,14 @@ public class PlayerSetter {
|
|
|
|
player.setGameMode(GameMode.valueOf(data.getGameMode()));
|
|
|
|
player.setGameMode(GameMode.valueOf(data.getGameMode()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (Settings.syncLocation) {
|
|
|
|
if (Settings.syncLocation) {
|
|
|
|
player.setFlying(player.getAllowFlight() && data.isFlying());
|
|
|
|
|
|
|
|
setPlayerLocation(player, DataSerializer.deserializePlayerLocationData(data.getSerializedLocation()));
|
|
|
|
setPlayerLocation(player, DataSerializer.deserializePlayerLocationData(data.getSerializedLocation()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (Settings.syncFlight) {
|
|
|
|
|
|
|
|
if (data.isFlying()) {
|
|
|
|
|
|
|
|
player.setAllowFlight(true);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
player.setFlying(player.getAllowFlight() && data.isFlying());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Handle the SyncCompleteEvent
|
|
|
|
// Handle the SyncCompleteEvent
|
|
|
|
Bukkit.getPluginManager().callEvent(new SyncCompleteEvent(player, data));
|
|
|
|
Bukkit.getPluginManager().callEvent(new SyncCompleteEvent(player, data));
|
|
|
|