mirror of
https://github.com/aikar/commands.git
synced 2026-06-04 16:12:17 +00:00
Big Break: Change the Command Completion Handler signature to match Context
For consistency, make Completion Handlers be implemented the same way Context Handlers are. Previously when we added the Context parameter, we left the original signature in place and simply tacked , c on the end. This made migration easier than changing all completion handlers bodies. But since 0.5.0 is a big migration already, let's just get it over with. See changes to Bukkit default completions and the example plugin for migration example.
This commit is contained in:
@@ -23,10 +23,8 @@
|
||||
|
||||
package co.aikar.commands;
|
||||
|
||||
import org.spongepowered.api.command.CommandSource;
|
||||
|
||||
@SuppressWarnings("WeakerAccess")
|
||||
public class SpongeCommandCompletions extends CommandCompletions<CommandSource, SpongeCommandCompletionContext> {
|
||||
public class SpongeCommandCompletions extends CommandCompletions<SpongeCommandCompletionContext> {
|
||||
|
||||
public SpongeCommandCompletions(final SpongeCommandManager manager) {
|
||||
super(manager);
|
||||
|
||||
@@ -62,7 +62,7 @@ public class SpongeCommandManager extends CommandManager {
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized CommandCompletions<CommandSource, SpongeCommandCompletionContext> getCommandCompletions() {
|
||||
public synchronized CommandCompletions<SpongeCommandCompletionContext> getCommandCompletions() {
|
||||
if (this.completions == null) {
|
||||
this.completions = new SpongeCommandCompletions(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user