ModAdapter

Provides an adapter for converting Mod/NMS objects to BetterModel platform objects.

This class implements PlatformAdapter and offers static utility methods for adapting entities, players, items, and worlds.

Since

2.0.0

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
@NotNull
open fun adapt(@NotNull profile: @NotNull GameProfile): @NotNull PlatformOfflinePlayer
Adapts a GameProfile to a PlatformOfflinePlayer.
@NotNull
open fun adapt(@NotNull uuid: @NotNull UUID): @NotNull PlatformOfflinePlayer
Adapts a UUID to a PlatformOfflinePlayer.
@NotNull
open fun adapt(@NotNull player: @NotNull ServerPlayer): @NotNull PlatformPlayer
Adapts an NMS server player to a PlatformPlayer.
@NotNull
open fun adapt(@NotNull connection: @NotNull ServerPlayerConnection): @NotNull PlatformPlayer
Adapts an NMS player connection to a PlatformPlayer.
@NotNull
open fun adapt(@NotNull entity: @NotNull Entity): @NotNull PlatformEntity
Adapts an NMS entity to a PlatformEntity.
@NotNull
open fun adapt(@NotNull livingEntity: @NotNull LivingEntity): @NotNull PlatformLivingEntity
Adapts an NMS living entity to a PlatformLivingEntity.
@NotNull
open fun adapt(@NotNull itemStack: @NotNull ItemStack): @NotNull PlatformItemStack
Adapts an NMS item stack to a PlatformItemStack.
@NotNull
open fun adapt(@NotNull world: @NotNull Level): @NotNull PlatformWorld
Adapts an NMS level to a PlatformWorld.
Link copied to clipboard
@NotNull
open fun air(): @NotNull PlatformItemStack
Link copied to clipboard
open fun isRegionSafe(): Boolean
Link copied to clipboard
open fun isTickThread(): Boolean
Link copied to clipboard
@NotNull
open fun offlinePlayer(@NotNull uuid: @NotNull UUID): @NotNull PlatformOfflinePlayer
Link copied to clipboard
@Nullable
open fun player(@NotNull uuid: @NotNull UUID): @Nullable PlatformPlayer
Link copied to clipboard
Link copied to clipboard
@NotNull
open fun zero(): @NotNull PlatformLocation