diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSLimitCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSLimitCommand.java index 7a56e37f..c7316bd1 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSLimitCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSLimitCommand.java @@ -30,8 +30,11 @@ import de.steamwar.command.SWCommandUtils; import de.steamwar.command.TypeMapper; import net.md_5.bungee.api.ChatMessageType; import net.md_5.bungee.api.chat.TextComponent; +import net.minecraft.server.v1_15_R1.WorldServer; import org.bukkit.Bukkit; +import org.bukkit.craftbukkit.v1_15_R1.CraftWorld; import org.bukkit.entity.Player; +import yapion.utils.ReflectionsUtils; import java.util.ArrayList; import java.util.Arrays; @@ -86,10 +89,11 @@ public class TPSLimitCommand extends SWCommand implements Enable { @ClassMapper(value = double.class, local = true) public TypeMapper doubleTypeMapper() { return SWCommandUtils.createMapper(s -> { + if (s.equalsIgnoreCase("nan")) return -1D; try { return Double.parseDouble(s.replace(',', '.')); } catch (NumberFormatException e) { - return 0D; + return -1D; } }, s -> tabCompletions); }