T
- - The player type for the platform, used for API related methodspublic interface ViaPlatform<T>
Modifier and Type | Method and Description |
---|---|
default boolean |
disconnect(UserConnection connection,
java.lang.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.
|
java.io.File |
getDataFolder()
Get ViaVersions's data folder.
|
com.google.gson.JsonObject |
getDump()
Get the JSON data required for /viaversion dump
|
java.util.logging.Logger |
getLogger()
Get the logger for this platform
|
ViaCommandSender[] |
getOnlinePlayers()
Get the online players
|
java.lang.String |
getPlatformName()
Get the platform name
|
java.lang.String |
getPlatformVersion()
Get the platform version
|
java.lang.String |
getPluginVersion()
Get the plugin version
|
default java.util.Collection<UnsupportedSoftware> |
getUnsupportedSoftwareClasses()
Returns an immutable collection of classes to be checked as unsupported software with their software name.
|
boolean |
hasPlugin(java.lang.String name)
Returns whether the platform has a plugin/mod with the given name (even if disabled).
|
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(java.util.UUID uuid,
java.lang.String message)
Kick a player for a reason
|
void |
onReload()
Called when a reload happens
|
PlatformTask |
runAsync(java.lang.Runnable runnable)
Run a task Async
|
PlatformTask |
runRepeatingAsync(java.lang.Runnable runnable,
long ticks)
Run a task async at a repeating interval.
|
PlatformTask |
runRepeatingSync(java.lang.Runnable runnable,
long period)
Runs a synchronous task at a repeating interval.
|
PlatformTask |
runSync(java.lang.Runnable runnable)
Run a task Sync
|
PlatformTask |
runSync(java.lang.Runnable runnable,
long delay)
Runs a synchronous task after a delay in ticks.
|
void |
sendMessage(java.util.UUID uuid,
java.lang.String message)
Send a message to a player
|
java.util.logging.Logger getLogger()
java.lang.String getPlatformName()
java.lang.String getPlatformVersion()
default boolean isProxy()
java.lang.String getPluginVersion()
PlatformTask runAsync(java.lang.Runnable runnable)
runnable
- The task to runPlatformTask runRepeatingAsync(java.lang.Runnable runnable, long ticks)
runnable
- The task to runticks
- The interval to run it atPlatformTask runSync(java.lang.Runnable runnable)
runnable
- The task to runPlatformTask runSync(java.lang.Runnable runnable, long delay)
runnable
- task to rundelay
- delay in ticks to run it afterPlatformTask runRepeatingSync(java.lang.Runnable runnable, long period)
runnable
- task to runperiod
- period in ticks to run atViaCommandSender[] getOnlinePlayers()
void sendMessage(java.util.UUID uuid, java.lang.String message)
uuid
- The player's UUIDmessage
- The message to sendboolean kickPlayer(java.util.UUID uuid, java.lang.String message)
uuid
- The player's UUIDmessage
- The message to kick them withdefault boolean disconnect(UserConnection connection, java.lang.String message)
connection
- The UserConnectionmessage
- The message to kick them withboolean isPluginEnabled()
ViaVersionConfig getConf()
ConfigurationProvider getConfigurationProvider()
java.io.File getDataFolder()
void onReload()
com.google.gson.JsonObject getDump()
boolean isOldClientsAllowed()
default java.util.Collection<UnsupportedSoftware> getUnsupportedSoftwareClasses()
boolean hasPlugin(java.lang.String name)
name
- plugin or identifier