hollow-cube/entity-get-instance-unknown-nullability

Signed-off-by: mworzala <mattheworzala@gmail.com>

Entity#getInstance to @UnknownNullability

(cherry picked from commit 35fc7a1127b2189515991bfdf0f7fd0dc92af09e)
This commit is contained in:
mworzala 2022-11-27 15:47:59 +02:00
parent 72a456eea8
commit bc73a6cbf8
No known key found for this signature in database
GPG Key ID: B148F922E64797C7
2 changed files with 10 additions and 1 deletions

8
CHANGELOG.md Normal file
View File

@ -0,0 +1,8 @@
## Changelog
Not a "proper" versioned changelog, just a list of the changes from Minestom master.
Some of these are pending, some deserve PRs, others are just minor tweaks
* Delete extensions (`mworzala/Minestom` @ `no_more_extensions`)
* Block face in digging events (`mworzala/Minestom` @ `block_break_face`)
* Add cursor position to block place and neighbor updates (`Moulberry/Minestom` @ `block_placement_rewrite_2`)
* Change `Entity#getInstance` to @UnknownNullability

View File

@ -64,6 +64,7 @@ import net.minestom.server.utils.validate.Check;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.UnknownNullability;
import space.vectrix.flare.fastutil.Int2ObjectSyncMap;
import java.time.Duration;
@ -838,7 +839,7 @@ public class Entity implements Viewable, Tickable, Schedulable, Snapshotable, Ev
*
* @return the entity instance, can be null if the entity doesn't have an instance yet
*/
public @Nullable Instance getInstance() {
public @UnknownNullability Instance getInstance() {
return instance;
}