Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-4758

Force setting server-port as launch parameter prevents server from launching

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • Linux, Windows

      Java 8, 9, 10, 11

    • git-Spigot-0c02b0c-e879c44 (MC: 1.14) (Implementing API version 1.14-R0.1-SNAPSHOT)
    • Yes

      When force setting parameter -server-port when launching the server file (e.g.: java -Xms512M -Xmx1G -jar server.jar nogui --server-port 27602 ) the server doesn't start because of this error:

      [22:37:21] [main/FATAL]: Failed to start the minecraft server
      java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.String (java.lang.Integer and java.lang.String are in module java.base of loader 'bootstrap')
       at net.minecraft.server.v1_14_R1.PropertyManager.c(PropertyManager.java:132) ~[minecraft_server.jar:git-Spigot-0c02b0c-e879c44]
       at net.minecraft.server.v1_14_R1.PropertyManager.a(PropertyManager.java:148) ~[minecraft_server.jar:git-Spigot-0c02b0c-e879c44]
       at net.minecraft.server.v1_14_R1.PropertyManager.a(PropertyManager.java:172) ~[minecraft_server.jar:git-Spigot-0c02b0c-e879c44]
       at net.minecraft.server.v1_14_R1.PropertyManager.getInt(PropertyManager.java:189) ~[minecraft_server.jar:git-Spigot-0c02b0c-e879c44]
       at net.minecraft.server.v1_14_R1.DedicatedServerProperties.<init>(DedicatedServerProperties.java:66) ~[minecraft_server.jar:git-Spigot-0c02b0c-e879c44]
       at net.minecraft.server.v1_14_R1.DedicatedServerProperties.load(DedicatedServerProperties.java:105) ~[minecraft_server.jar:git-Spigot-0c02b0c-e879c44]
       at net.minecraft.server.v1_14_R1.DedicatedServerSettings.<init>(DedicatedServerSettings.java:17) ~[minecraft_server.jar:git-Spigot-0c02b0c-e879c44]
       at net.minecraft.server.v1_14_R1.MinecraftServer.main(MinecraftServer.java:1130) [minecraft_server.jar:git-Spigot-0c02b0c-e879c44]
       at org.bukkit.craftbukkit.Main.main(Main.java:201) [minecraft_server.jar:git-Spigot-0c02b0c-e879c44]

      Other parameters like -log-limit 262144000 or -server-ip 82.208.17.29 work properly

       

      This error prevents server hostings in proper setting where they're required to use specific ports on servers and not let users to change this setting.

            Unassigned Unassigned
            nejento Nejento
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: