Slow down on generic usage

This commit is contained in:
Frank van der Heijden 2021-07-24 14:31:08 +02:00
parent 6545d7ffac
commit 779f4785e0
No known key found for this signature in database
GPG key ID: B808721C2DD5B5B8
9 changed files with 14 additions and 80 deletions

View file

@ -7,13 +7,8 @@ import net.frankheijden.serverutils.common.entities.ServerUtilsPlugin;
import net.frankheijden.serverutils.common.utils.ListBuilder;
import net.frankheijden.serverutils.common.utils.ListFormat;
public abstract class CommandPlugins<
U extends ServerUtilsPlugin<P, T, C, S>,
P,
T,
C extends ServerCommandSender<S>,
S
> extends ServerUtilsCommand<U, P, T, C, S> {
public abstract class CommandPlugins<U extends ServerUtilsPlugin<P, ?, C, ?>, P, C extends ServerCommandSender<?>>
extends ServerUtilsCommand<U, C> {
protected CommandPlugins(U plugin) {
super(plugin, "plugins");

View file

@ -19,17 +19,10 @@ import net.frankheijden.serverutils.common.utils.FormatBuilder;
import net.frankheijden.serverutils.common.utils.ListBuilder;
import net.frankheijden.serverutils.common.utils.ListFormat;
public abstract class CommandServerUtils<
U extends ServerUtilsPlugin<P, T, C, S>,
P,
T,
C extends ServerCommandSender<S>,
S
> extends ServerUtilsCommand<U, P, T, C, S> {
public abstract class CommandServerUtils<U extends ServerUtilsPlugin<P, ?, C, ?>, P, C extends ServerCommandSender<?>>
extends ServerUtilsCommand<U, C> {
protected CommandServerUtils(
U plugin
) {
protected CommandServerUtils(U plugin) {
super(plugin, "serverutils");
}

View file

@ -12,22 +12,14 @@ import net.frankheijden.serverutils.common.config.ServerUtilsConfig;
import net.frankheijden.serverutils.common.entities.ServerCommandSender;
import net.frankheijden.serverutils.common.entities.ServerUtilsPlugin;
public abstract class ServerUtilsCommand<U extends ServerUtilsPlugin<P, T, C, S>,
P,
T,
C extends ServerCommandSender<S>,
S
> {
public abstract class ServerUtilsCommand<U extends ServerUtilsPlugin<?, ?, C, ?>, C extends ServerCommandSender<?>> {
protected final U plugin;
protected final String commandName;
protected final ServerUtilsConfig commandConfig;
protected final Map<String, CommandArgument<C, ?>> arguments;
protected ServerUtilsCommand(
U plugin,
String commandName
) {
protected ServerUtilsCommand(U plugin, String commandName) {
this.plugin = plugin;
this.commandName = commandName;
this.commandConfig = (ServerUtilsConfig) plugin.getCommandsResource().getConfig().get(commandName);