]> git.lizzy.rs Git - BoundingBoxOutlineReloaded.git/blob - src/main/java/com/irtimaled/bbor/client/config/Setting.java
Rework settings/config command
[BoundingBoxOutlineReloaded.git] / src / main / java / com / irtimaled / bbor / client / config / Setting.java
1 package com.irtimaled.bbor.client.config;
2
3 public class Setting<T> {
4     private final char type;
5     String comment;
6     String category;
7     String name;
8     private T value;
9     T defaultValue;
10
11     Setting(char type, T value) {
12         this.type = type;
13         this.value = value;
14     }
15
16     public T get() {
17         return value;
18     }
19
20     public void set(T value) {
21         this.value = value;
22     }
23
24     public void reset() {
25         this.value = this.defaultValue;
26     }
27
28     public char getType() {
29         return type;
30     }
31
32     public String getName() { return name; }
33 }