mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-29 04:28:21 +01:00
Position in Player#setInstance can be null
This commit is contained in:
parent
ab73b0fa3e
commit
049e3b8495
@ -685,8 +685,10 @@ public class Player extends LivingEntity implements CommandSender {
|
|||||||
* it is possible for this method to be non-blocking when retrieving chunks is required.
|
* it is possible for this method to be non-blocking when retrieving chunks is required.
|
||||||
*
|
*
|
||||||
* @param instance the new player instance
|
* @param instance the new player instance
|
||||||
|
* @param spawnPosition the new position of the player,
|
||||||
|
* can be null or {@link #getPosition()} if you do not want to teleport the player
|
||||||
*/
|
*/
|
||||||
public void setInstance(@NotNull Instance instance, @NotNull Position spawnPosition) {
|
public void setInstance(@NotNull Instance instance, @Nullable Position spawnPosition) {
|
||||||
Check.notNull(instance, "instance cannot be null!");
|
Check.notNull(instance, "instance cannot be null!");
|
||||||
Check.argCondition(this.instance == instance, "Instance should be different than the current one");
|
Check.argCondition(this.instance == instance, "Instance should be different than the current one");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user