mirror of
https://github.com/songoda/EpicVouchers.git
synced 2025-01-09 09:27:39 +01:00
If empty integer make it 0
This commit is contained in:
parent
51200ddb07
commit
cb815445e1
@ -9,6 +9,6 @@ import java.util.function.BiConsumer;
|
||||
|
||||
public class IntegerIcon extends StringIcon {
|
||||
public IntegerIcon(EpicVouchers instance, String string, int current, BiConsumer<Player, Integer> consumer) {
|
||||
super(instance, Material.IRON_INGOT, string, "" + current, (player, edited) -> consumer.accept(player, Integer.parseInt(edited)), StringUtils::isNumeric);
|
||||
super(instance, Material.IRON_INGOT, string, String.valueOf(current), (player, edited) -> consumer.accept(player, edited.equals("") ? 0 : Integer.parseInt(edited)), StringUtils::isNumeric);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user