我有一个接受List<的参数的类类< ?扩展MiniGameArena>>,但是当我向这个列表中添加一个类时,它会抛出一个错误,说我需要更改List<类< ?将MiniGameArena>>扩展为我用作参数的确切类。
new MinigameSetupManager(this, Collections.singletonList(TestArena.class), arenaManager); //TestArena.class is the error here
public MinigameSetupManager(Main plugin, List<Class<? extends MiniGameArena>> arenaTypesSupported, MiniGameArenaManager<?> arenaManager) {
this.plugin = plugin;
this.manager = arenaManager;
this.arenaTypesSupported = ImmutableList.copyOf(arenaTypesSupported);
plugin.registeredListener(this);
plugin.registerCommand(new commands());
}
这是确切的错误“构造函数MinigameSetupManager(Main,List&lt; Class&lt; TestArena&gt;&gt;,MiniGameArenaManager&lt; TestArena&gt;)未定义”