mirror of
https://github.com/aikar/commands.git
synced 2026-05-31 06:11:55 +00:00
Use generics on manager to understand impl types
Slight risk of API breakage but risk is minimal enough that I'm not bumping versions. 0.5.0 Migration guide suggested (Platform)CommandManager, which will set the generics for you. Only if you stored the ref as the Abstract CommandManager would you now run into generic issues. Also, cleaned up the sendMessage API's to not need Object now since we know the Generic type. This is technically an API break, but considering Locales was only released last night and the likelyhood someone overrode that method, is unlikey. If you did, just fix the method signature! Sorry <3
This commit is contained in:
@@ -40,7 +40,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@SuppressWarnings("WeakerAccess")
|
||||
public class SpongeCommandManager extends CommandManager {
|
||||
public class SpongeCommandManager extends CommandManager<CommandSource, SpongeMessageFormatter> {
|
||||
|
||||
protected final PluginContainer plugin;
|
||||
protected Map<String, SpongeRootCommand> registeredCommands = new HashMap<>();
|
||||
|
||||
Reference in New Issue
Block a user