public class BungeePlugin extends net.md_5.bungee.api.plugin.Plugin implements ViaPlatform<net.md_5.bungee.api.connection.ProxiedPlayer>, net.md_5.bungee.api.plugin.Listener
Constructor and Description |
---|
BungeePlugin() |
Modifier and Type | Method and Description |
---|---|
void |
cancelTask(TaskId taskId)
Cancel a task
|
ViaAPI<net.md_5.bungee.api.connection.ProxiedPlayer> |
getApi()
Get the API for this platform
|
BungeeViaConfig |
getConf()
Get the config API for this platform
|
ConfigurationProvider |
getConfigurationProvider()
Get the backend configuration provider for this platform.
|
ViaConnectionManager |
getConnectionManager() |
com.google.gson.JsonObject |
getDump()
Get the JSON data required for /viaversion dump
|
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.
|
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 |
onEnable() |
void |
onLoad() |
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
|
getDataFolder, getDescription, getExecutorService, getFile, getLogger, getProxy, getResourceAsStream, onDisable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
disconnect, getDataFolder, getLogger
public void onLoad()
onLoad
in class net.md_5.bungee.api.plugin.Plugin
public void onEnable()
onEnable
in class net.md_5.bungee.api.plugin.Plugin
public String getPlatformName()
ViaPlatform
getPlatformName
in interface ViaPlatform<net.md_5.bungee.api.connection.ProxiedPlayer>
public String getPlatformVersion()
ViaPlatform
getPlatformVersion
in interface ViaPlatform<net.md_5.bungee.api.connection.ProxiedPlayer>
public boolean isProxy()
ViaPlatform
isProxy
in interface ViaPlatform<net.md_5.bungee.api.connection.ProxiedPlayer>
public String getPluginVersion()
ViaPlatform
getPluginVersion
in interface ViaPlatform<net.md_5.bungee.api.connection.ProxiedPlayer>
public TaskId runAsync(Runnable runnable)
ViaPlatform
runAsync
in interface ViaPlatform<net.md_5.bungee.api.connection.ProxiedPlayer>
runnable
- The task to runpublic TaskId runSync(Runnable runnable)
ViaPlatform
runSync
in interface ViaPlatform<net.md_5.bungee.api.connection.ProxiedPlayer>
runnable
- The task to runpublic TaskId runSync(Runnable runnable, Long ticks)
ViaPlatform
runSync
in interface ViaPlatform<net.md_5.bungee.api.connection.ProxiedPlayer>
runnable
- The task to runticks
- The interval to run it afterpublic TaskId runRepeatingSync(Runnable runnable, Long ticks)
ViaPlatform
runRepeatingSync
in interface ViaPlatform<net.md_5.bungee.api.connection.ProxiedPlayer>
runnable
- The task to runticks
- The interval to run it atpublic void cancelTask(TaskId taskId)
ViaPlatform
cancelTask
in interface ViaPlatform<net.md_5.bungee.api.connection.ProxiedPlayer>
taskId
- The task ID to cancelpublic ViaCommandSender[] getOnlinePlayers()
ViaPlatform
getOnlinePlayers
in interface ViaPlatform<net.md_5.bungee.api.connection.ProxiedPlayer>
public void sendMessage(UUID uuid, String message)
ViaPlatform
sendMessage
in interface ViaPlatform<net.md_5.bungee.api.connection.ProxiedPlayer>
uuid
- The player's UUIDmessage
- The message to sendpublic boolean kickPlayer(UUID uuid, String message)
ViaPlatform
kickPlayer
in interface ViaPlatform<net.md_5.bungee.api.connection.ProxiedPlayer>
uuid
- The player's UUIDmessage
- The message to kick them withpublic boolean isPluginEnabled()
ViaPlatform
isPluginEnabled
in interface ViaPlatform<net.md_5.bungee.api.connection.ProxiedPlayer>
public ViaAPI<net.md_5.bungee.api.connection.ProxiedPlayer> getApi()
ViaPlatform
getApi
in interface ViaPlatform<net.md_5.bungee.api.connection.ProxiedPlayer>
public BungeeViaConfig getConf()
ViaPlatform
getConf
in interface ViaPlatform<net.md_5.bungee.api.connection.ProxiedPlayer>
public ConfigurationProvider getConfigurationProvider()
ViaPlatform
getConfigurationProvider
in interface ViaPlatform<net.md_5.bungee.api.connection.ProxiedPlayer>
public void onReload()
ViaPlatform
onReload
in interface ViaPlatform<net.md_5.bungee.api.connection.ProxiedPlayer>
public com.google.gson.JsonObject getDump()
ViaPlatform
getDump
in interface ViaPlatform<net.md_5.bungee.api.connection.ProxiedPlayer>
public boolean isOldClientsAllowed()
ViaPlatform
isOldClientsAllowed
in interface ViaPlatform<net.md_5.bungee.api.connection.ProxiedPlayer>
public ViaConnectionManager getConnectionManager()
getConnectionManager
in interface ViaPlatform<net.md_5.bungee.api.connection.ProxiedPlayer>
Copyright © 2016–2021. All rights reserved.