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