This repository has been archived on 2024-10-31. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
LibZontreck/src/main/java/dev/zontreck/ariaslib/args/BooleanArgument.java
2024-10-09 22:21:30 -07:00

35 lines
675 B
Java

package dev.zontreck.ariaslib.args;
public class BooleanArgument extends Argument<Boolean> {
private boolean value;
/**
* Initializes a boolean only command line toggle
*
* @param name The option name
*/
public BooleanArgument(String name) {
super(name);
this.hasValue = true;
this.value = true;
}
@Override
public Boolean getValue() {
return value;
}
@Override
public ArgumentType getType() {
return ArgumentType.BOOLEAN;
}
@Override
public String toString() {
return "BooleanArgument{" +
name + "=true" +
'}';
}
}