Rename getByValueType to getAllValuesByType
This commit is contained in:
parent
3bb1c1a972
commit
3bf4b997b0
@ -323,7 +323,7 @@ public class Settings {
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> List<Setting<T>> getByValueType(Class<T> klass) {
|
||||
public <T> List<Setting<T>> getAllValuesByType(Class<T> klass) {
|
||||
List<Setting<T>> result = new ArrayList<>();
|
||||
for (Setting<?> setting : allSettings) {
|
||||
if (setting.klass.equals(klass)) {
|
||||
|
@ -286,7 +286,7 @@ public class ExampleBaritoneControl extends Behavior {
|
||||
event.cancel();
|
||||
return;
|
||||
}
|
||||
List<Settings.Setting<Boolean>> toggleable = Baritone.settings().getByValueType(Boolean.class);
|
||||
List<Settings.Setting<Boolean>> toggleable = Baritone.settings().getAllValuesByType(Boolean.class);
|
||||
for (Settings.Setting<Boolean> setting : toggleable) {
|
||||
if (msg.equalsIgnoreCase(setting.getName())) {
|
||||
setting.value ^= true;
|
||||
|
Loading…
Reference in New Issue
Block a user