Feature - plugin watcher, detect file changes & reload
This commit is contained in:
parent
719163c579
commit
07719cc1cc
24 changed files with 387 additions and 15 deletions
|
|
@ -176,6 +176,7 @@ public class BungeePluginManager extends AbstractPluginManager<Plugin> {
|
|||
* @param pluginName The plugin name to search for.
|
||||
* @return The File if the plugin exists with that name.
|
||||
*/
|
||||
@Override
|
||||
public File getPluginFile(String pluginName) {
|
||||
for (File file : getPluginJars()) {
|
||||
PluginDescription desc;
|
||||
|
|
@ -195,6 +196,11 @@ public class BungeePluginManager extends AbstractPluginManager<Plugin> {
|
|||
return plugin.getFile();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Plugin getPlugin(String pluginName) {
|
||||
return proxy.getPluginManager().getPlugin(pluginName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> getCommands() {
|
||||
return proxy.getPluginManager().getCommands().stream()
|
||||
|
|
|
|||
|
|
@ -3,8 +3,13 @@ package net.frankheijden.serverutils.bungee.managers;
|
|||
import net.frankheijden.serverutils.bungee.ServerUtils;
|
||||
import net.frankheijden.serverutils.common.managers.AbstractTaskManager;
|
||||
import net.md_5.bungee.api.ProxyServer;
|
||||
import net.md_5.bungee.api.scheduler.ScheduledTask;
|
||||
|
||||
public class BungeeTaskManager extends AbstractTaskManager {
|
||||
public class BungeeTaskManager extends AbstractTaskManager<ScheduledTask> {
|
||||
|
||||
public BungeeTaskManager() {
|
||||
super(ScheduledTask::cancel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void runTask(Runnable runnable) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue