net.minestom.server.command.builder.arguments.number.ArgumentFloat Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of minestom-snapshots Show documentation
Show all versions of minestom-snapshots Show documentation
1.20.4 Lightweight Minecraft server
package net.minestom.server.command.builder.arguments.number;
import net.minestom.server.utils.binary.BinaryWriter;
public class ArgumentFloat extends ArgumentNumber {
public ArgumentFloat(String id) {
super(id, "brigadier:float", Float::parseFloat, (s, radix) -> (float) Integer.parseInt(s, radix), BinaryWriter::writeFloat, Float::compare);
}
@Override
public String toString() {
return String.format("Float<%s>", getId());
}
}