public abstract class ProxyAdapter extends Adapter
Constructor and Description |
---|
ProxyAdapter() |
Modifier and Type | Method and Description |
---|---|
FakePlayer |
createFakePlayer(Location loc,
String name)
Create a fake player
WARN: Not supported yet with all platform
|
Inventory |
createInventory(String inventoryName,
int size,
NegativityHolder holder)
Create a new inventory
|
ItemBuilder |
createItemBuilder(ItemStack item)
Create a new item builder with the given item
|
ItemBuilder |
createItemBuilder(Material type)
Create a new item builder with the given type
|
ItemBuilder |
createItemBuilder(String type)
Create a new item builder with the given type name
|
ItemBuilder |
createSkullItemBuilder(OfflinePlayer owner)
Create a new item builder of skull with the current owner
|
ItemBuilder |
createSkullItemBuilder(Player owner)
Create a new item builder of skull with the current owner
|
ItemRegistrar |
getItemRegistrar()
Get the registrar of all items
|
double |
getLastTPS()
Get last TPS value
|
@Nullable OfflinePlayer |
getOfflinePlayer(String name)
Get offline player with the given name
Prefer use
Adapter.getOfflinePlayer(UUID) because this method isn't supported on all platform, and a name can be changed |
@Nullable OfflinePlayer |
getOfflinePlayer(UUID uuid)
Get offline player with the given UUID
|
Version |
getServerVersion()
The Minecraft version the server is running
|
double[] |
getTPS()
Get all available TPS
This array is not empty, at least, it contains the
Adapter.getLastTPS() value in [0] place |
@Nullable UUID |
getUUID(String name)
Get the UUID with the name
|
VersionAdapter<?> |
getVersionAdapter()
Get the version adapter for the actual platform version
|
broadcastMessage, canSendStats, debug, getAccountManager, getAdapter, getAllPlugins, getConfig, getDataFolder, getDependentPlugins, getLogger, getName, getOnlinePlayers, getOnlinePlayersUUID, getPlatformID, getPlatformTranslationProviderFactory, getPlayer, getPlayer, getPlugin, getPluginVersion, getScheduler, getVersion, hasPlugin, isUsingMcLeaks, registerNewIncomingChannel, reload, reloadConfig, runConsoleCommand, runSync, sendMessageRunnableHover, setAdapter
public Version getServerVersion()
Adapter
getServerVersion
in class Adapter
public ItemRegistrar getItemRegistrar()
Adapter
getItemRegistrar
in class Adapter
public ItemBuilder createItemBuilder(Material type)
Adapter
createItemBuilder
in class Adapter
type
- the item typepublic ItemBuilder createItemBuilder(ItemStack item)
Adapter
createItemBuilder
in class Adapter
item
- the beginning itempublic ItemBuilder createItemBuilder(String type)
Adapter
createItemBuilder
in class Adapter
type
- the item type namepublic ItemBuilder createSkullItemBuilder(Player owner)
Adapter
createSkullItemBuilder
in class Adapter
owner
- the player owner of the skullpublic ItemBuilder createSkullItemBuilder(OfflinePlayer owner)
Adapter
createSkullItemBuilder
in class Adapter
owner
- the player owner of the skullpublic Inventory createInventory(String inventoryName, int size, NegativityHolder holder)
Adapter
createInventory
in class Adapter
inventoryName
- the inventory namesize
- the inventory sizeholder
- the inventory holderpublic FakePlayer createFakePlayer(Location loc, String name)
Adapter
createFakePlayer
in class Adapter
loc
- the location of the fake playername
- the name of the fake playerpublic double[] getTPS()
Adapter
Adapter.getLastTPS()
value in [0] placepublic double getLastTPS()
Adapter
getLastTPS
in class Adapter
public @Nullable UUID getUUID(String name)
Adapter
public @Nullable OfflinePlayer getOfflinePlayer(String name)
Adapter
Adapter.getOfflinePlayer(UUID)
because this method isn't supported on all platform, and a name can be changedgetOfflinePlayer
in class Adapter
name
- the offline player namenull
if no player matching this name has played on this serverpublic @Nullable OfflinePlayer getOfflinePlayer(UUID uuid)
Adapter
getOfflinePlayer
in class Adapter
uuid
- the offline player UUIDnull
if no player with this UUID has played on this serverpublic VersionAdapter<?> getVersionAdapter()
Adapter
getVersionAdapter
in class Adapter