More abstractions
- Abstracted UpdateCheckerTask - Merged PluginProvider into the PluginManagers
This commit is contained in:
parent
23e8e80191
commit
e67b20dee0
40 changed files with 546 additions and 347 deletions
|
|
@ -0,0 +1,12 @@
|
|||
package net.frankheijden.serverutils.common.providers;
|
||||
|
||||
import net.frankheijden.serverutils.common.entities.ServerCommandSender;
|
||||
|
||||
public abstract class ChatProvider {
|
||||
|
||||
public abstract ServerCommandSender getConsoleSender();
|
||||
|
||||
public abstract String color(String str);
|
||||
|
||||
public abstract void broadcast(String permission, String message);
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
package net.frankheijden.serverutils.common.providers;
|
||||
|
||||
public interface ColorProvider {
|
||||
|
||||
String apply(String str);
|
||||
}
|
||||
|
|
@ -14,6 +14,8 @@ public abstract class PluginProvider<T> {
|
|||
|
||||
public abstract String getPluginName(T plugin);
|
||||
|
||||
public abstract File getPluginFile(T plugin);
|
||||
|
||||
public List<T> getPluginsSorted() {
|
||||
List<T> plugins = getPlugins();
|
||||
plugins.sort(Comparator.comparing(this::getPluginName));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue