Skip to content

Commit 6504d4f

Browse files
author
Pikachu920
committed
use stringPort instead of grabbing regex again
1 parent c1995da commit 6504d4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/pikachu/webaddon/skript/scopes/http/ScopeHTTPServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public boolean init(Literal<?>[] args, int matchedPattern, SkriptParser.ParseRes
6565
stringRep = sectionNode.getKey();
6666
String stringPort = parseResult.regexes.get(0).group();
6767
if (stringPort.matches("\\d{1,5}")) {
68-
port = Integer.parseInt(parseResult.regexes.get(0).group());
68+
port = Integer.parseInt(stringPort);
6969
} else {
7070
Skript.error("'" + stringPort + "' is not a valid port");
7171
return false;

0 commit comments

Comments
 (0)