Initial Brigadier overriden tab completion
This commit is contained in:
@@ -146,11 +146,11 @@ public class BaritoneChatControl implements Helper, AbstractGameEventListener {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPreTabComplete(TabCompleteEvent.Pre event) {
|
||||
public void onPreTabComplete(TabCompleteEvent event) {
|
||||
if (!settings.prefixControl.value) {
|
||||
return;
|
||||
}
|
||||
String prefix = event.prefix.get();
|
||||
String prefix = event.prefix;
|
||||
String commandPrefix = settings.prefix.value;
|
||||
if (!prefix.startsWith(commandPrefix)) {
|
||||
return;
|
||||
@@ -161,7 +161,7 @@ public class BaritoneChatControl implements Helper, AbstractGameEventListener {
|
||||
if (args.size() == 1) {
|
||||
stream = stream.map(x -> commandPrefix + x);
|
||||
}
|
||||
event.completions.set(stream.toArray(String[]::new));
|
||||
event.completions = stream.toArray(String[]::new);
|
||||
}
|
||||
|
||||
public Stream<String> tabComplete(String msg) {
|
||||
|
||||
@@ -70,15 +70,10 @@ public final class GameEventHandler implements IEventBus, Helper {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPreTabComplete(TabCompleteEvent.Pre event) {
|
||||
public void onPreTabComplete(TabCompleteEvent event) {
|
||||
listeners.forEach(l -> l.onPreTabComplete(event));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPostTabComplete(TabCompleteEvent.Post event) {
|
||||
listeners.forEach(l -> l.onPostTabComplete(event));
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void onChunkEvent(ChunkEvent event) {
|
||||
EventState state = event.getState();
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
package baritone.utils.accessor;
|
||||
|
||||
public interface ITabCompleter {
|
||||
|
||||
String getPrefix();
|
||||
|
||||
void setPrefix(String prefix);
|
||||
|
||||
boolean onGuiChatSetCompletions(String[] newCompl);
|
||||
}
|
||||
Reference in New Issue
Block a user