mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-22 12:05:39 +00:00
Simple sanity check when changing scenes
This commit is contained in:
parent
a5a420da9d
commit
be89a6099e
@ -183,6 +183,10 @@ public class World implements Iterable<GenshinPlayer> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void transferPlayerToScene(GenshinPlayer player, int sceneId, Position pos) {
|
public void transferPlayerToScene(GenshinPlayer player, int sceneId, Position pos) {
|
||||||
|
if (player.getScene().getId() == sceneId) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (player.getScene() != null) {
|
if (player.getScene() != null) {
|
||||||
player.getScene().removePlayer(player);
|
player.getScene().removePlayer(player);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user