T
- - The player type for the platform, used for API related methodspublic interface ViaPlatform<T>
Modifier and Type | Method and Description |
---|---|
void |
cancelTask(TaskId taskId)
Cancel a task
|
default boolean |
disconnect(UserConnection connection,
String message)
Disconnects an UserConnection for a reason
|
ViaAPI<T> |
getApi()
Get the API for this platform
|
ViaVersionConfig |
getConf()
Get the config API for this platform
|
ConfigurationProvider |
getConfigurationProvider()
Get the backend configuration provider for this platform.
|
ViaConnectionManager |
getConnectionManager() |
File |
getDataFolder()
Get ViaVersions's data folder.
|
com.google.gson.JsonObject |
getDump()
Get the JSON data required for /viaversion dump
|
Logger |
getLogger()
Get the logger for this platform
|
ViaCommandSender[] |
getOnlinePlayers()
Get the online players
|
String |
getPlatformName()
Get the platform name
|
String |
getPlatformVersion()
Get the platform version
|
String |
getPluginVersion()
Get the plugin version
|
boolean |
isOldClientsAllowed()
Get if older clients are allowed to be used using ViaVersion.
|
boolean |
isPluginEnabled()
Check if the plugin is enabled.
|
default boolean |
isProxy()
Returns true if the server Via is running on is a proxy server.
|
boolean |
kickPlayer(UUID uuid,
String message)
Kick a player for a reason
|
void |
onReload()
Called when a reload happens
|
TaskId |
runAsync(Runnable runnable)
Run a task Async
|
TaskId |
runRepeatingSync(Runnable runnable,
Long ticks)
Run a task at a repeating interval.
|
TaskId |
runSync(Runnable runnable)
Run a task Sync
|
TaskId |
runSync(Runnable runnable,
Long ticks)
Run a task Sync after a interval
This must be only used after plugin enable.
|
void |
sendMessage(UUID uuid,
String message)
Send a message to a player
|
Logger getLogger()
String getPlatformName()
String getPlatformVersion()
default boolean isProxy()
String getPluginVersion()
TaskId runAsync(Runnable runnable)
runnable
- The task to runTaskId runSync(Runnable runnable)
runnable
- The task to runTaskId runSync(Runnable runnable, Long ticks)
runnable
- The task to runticks
- The interval to run it afterTaskId runRepeatingSync(Runnable runnable, Long ticks)
runnable
- The task to runticks
- The interval to run it atvoid cancelTask(TaskId taskId)
taskId
- The task ID to cancelViaCommandSender[] getOnlinePlayers()
void sendMessage(UUID uuid, String message)
uuid
- The player's UUIDmessage
- The message to sendboolean kickPlayer(UUID uuid, String message)
uuid
- The player's UUIDmessage
- The message to kick them withdefault boolean disconnect(UserConnection connection, String message)
connection
- The UserConnectionmessage
- The message to kick them withboolean isPluginEnabled()
ViaVersionConfig getConf()
ConfigurationProvider getConfigurationProvider()
File getDataFolder()
void onReload()
com.google.gson.JsonObject getDump()
boolean isOldClientsAllowed()
ViaConnectionManager getConnectionManager()
Copyright © 2016–2021. All rights reserved.