Comply with checkstyle again

This commit is contained in:
Frank van der Heijden 2020-07-05 16:59:07 +02:00
parent e67b20dee0
commit af4c7ba214
No known key found for this signature in database
GPG key ID: 26DA56488D314D11
36 changed files with 329 additions and 74 deletions

View file

@ -2,11 +2,28 @@ package net.frankheijden.serverutils.common.providers;
import net.frankheijden.serverutils.common.entities.ServerCommandSender;
/**
* A basic chat provider class.
*/
public abstract class ChatProvider {
/**
* Retrieves the console sender of a server instance.
* @return The console sender.
*/
public abstract ServerCommandSender getConsoleSender();
/**
* Colorizes the given string.
* @param str The string to color.
* @return The colored string.
*/
public abstract String color(String str);
/**
* Broadcasts a message over a server instance.
* @param permission The permission the receivers need to have.
* @param message The message to broadcast.
*/
public abstract void broadcast(String permission, String message);
}

View file

@ -16,12 +16,20 @@ public abstract class PluginProvider<T> {
public abstract File getPluginFile(T plugin);
/**
* Retrieves a list of plugins, sorted by name.
* @return The list of plugins.
*/
public List<T> getPluginsSorted() {
List<T> plugins = getPlugins();
plugins.sort(Comparator.comparing(this::getPluginName));
return plugins;
}
/**
* Retrieves a list of plugin names.
* @return The plugin names.
*/
public List<String> getPluginNames() {
return getPlugins().stream()
.map(this::getPluginName)

View file

@ -1,10 +1,10 @@
package net.frankheijden.serverutils.common.providers;
import net.frankheijden.serverutils.common.config.YamlConfig;
import java.io.File;
import java.io.InputStream;
import net.frankheijden.serverutils.common.config.YamlConfig;
public interface ResourceProvider {
InputStream getResource(String resource);