mirror of https://github.com/cabaletta/baritone
add settings reset command
This commit is contained in:
parent
6f7729e34e
commit
5daaaf5282
|
@ -553,6 +553,12 @@ public class Settings {
|
|||
*/
|
||||
public final List<Setting<?>> allSettings;
|
||||
|
||||
public void reset() {
|
||||
for (Setting setting : allSettings) {
|
||||
setting.value = setting.defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
public class Setting<T> {
|
||||
public T value;
|
||||
public final T defaultValue;
|
||||
|
|
|
@ -277,6 +277,11 @@ public class ExampleBaritoneControl extends Behavior implements Helper {
|
|||
});
|
||||
return true;
|
||||
}
|
||||
if (msg.equals("reset")) {
|
||||
Baritone.settings().reset();
|
||||
logDirect("Baritone settings reset");
|
||||
return true;
|
||||
}
|
||||
if (msg.startsWith("followplayers")) {
|
||||
baritone.getFollowProcess().follow(EntityPlayer.class::isInstance); // O P P A
|
||||
logDirect("Following any players");
|
||||
|
|
Loading…
Reference in New Issue