BukkitAdapter

Provides an adapter for converting Bukkit objects to BetterModel platform objects.

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

Since

2.0.0

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
@NotNull
open fun adapt(@NotNull location: @NotNull Location): @NotNull PlatformLocation
Adapts a Bukkit location to a PlatformLocation.
@NotNull
open fun adapt(@NotNull player: @NotNull OfflinePlayer): @NotNull PlatformOfflinePlayer
Adapts a Bukkit offline player to a PlatformOfflinePlayer.
@NotNull
open fun adapt(@NotNull world: @NotNull World): @NotNull PlatformWorld
Adapts a Bukkit world to a PlatformWorld.
@NotNull
open fun adapt(@NotNull entity: @NotNull Entity): @NotNull PlatformEntity
Adapts a Bukkit entity to a PlatformEntity.
@NotNull
open fun adapt(@NotNull livingEntity: @NotNull LivingEntity): @NotNull PlatformLivingEntity
Adapts a Bukkit living entity to a PlatformLivingEntity.
@NotNull
open fun adapt(@NotNull player: @NotNull Player): @NotNull PlatformPlayer
Adapts a Bukkit player to a PlatformPlayer.
@NotNull
open fun adapt(@NotNull itemStack: @NotNull ItemStack): @NotNull PlatformItemStack
Adapts a Bukkit item stack to a PlatformItemStack.
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