initialize chat control only once ever
This commit is contained in:
parent
1bb4e44b71
commit
fc63c16ee0
@ -135,9 +135,6 @@ public class Baritone implements IBaritone {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.initialized = true;
|
this.initialized = true;
|
||||||
|
|
||||||
DefaultCommands.COMMANDS.forEach(CommandManager.REGISTRY::register);
|
|
||||||
new BaritoneChatControl(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -20,7 +20,10 @@ package baritone;
|
|||||||
import baritone.api.IBaritone;
|
import baritone.api.IBaritone;
|
||||||
import baritone.api.IBaritoneProvider;
|
import baritone.api.IBaritoneProvider;
|
||||||
import baritone.api.cache.IWorldScanner;
|
import baritone.api.cache.IWorldScanner;
|
||||||
|
import baritone.api.utils.command.BaritoneChatControl;
|
||||||
|
import baritone.api.utils.command.manager.CommandManager;
|
||||||
import baritone.cache.WorldScanner;
|
import baritone.cache.WorldScanner;
|
||||||
|
import baritone.utils.command.defaults.DefaultCommands;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -34,6 +37,11 @@ public final class BaritoneProvider implements IBaritoneProvider {
|
|||||||
private final Baritone primary = new Baritone();
|
private final Baritone primary = new Baritone();
|
||||||
private final List<IBaritone> all = Collections.singletonList(primary);
|
private final List<IBaritone> all = Collections.singletonList(primary);
|
||||||
|
|
||||||
|
{
|
||||||
|
DefaultCommands.COMMANDS.forEach(CommandManager.REGISTRY::register);
|
||||||
|
new BaritoneChatControl(primary);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IBaritone getPrimaryBaritone() {
|
public IBaritone getPrimaryBaritone() {
|
||||||
return primary;
|
return primary;
|
||||||
|
Loading…
Reference in New Issue
Block a user