Skip to content

Commit 7173c29

Browse files
committed
fix: toml parser broke on port with just zeros, dependency hell, velocity needed a .json to load, missing forward-slash in ConfigImpl
1 parent fe3e369 commit 7173c29

5 files changed

Lines changed: 13 additions & 10 deletions

File tree

pom.xml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.github.justadeni</groupId>
88
<artifactId>multiproxyplayercount</artifactId>
9-
<version>0.1.5</version>
9+
<version>0.1.6</version>
1010
<packaging>jar</packaging>
1111

1212
<name>MultiProxyPlayerCount</name>
@@ -47,7 +47,7 @@
4747
</goals>
4848
<configuration>
4949
<createDependencyReducedPom>false</createDependencyReducedPom>
50-
<relocations>
50+
<!--relocations>
5151
<relocation>
5252
<pattern>redis.clients.jedis</pattern>
5353
<shadedPattern>multi-proxy-player-count.shaded.redis.clients.jedis</shadedPattern>
@@ -68,15 +68,11 @@
6868
<pattern>org.apache.commons</pattern>
6969
<shadedPattern>multi-proxy-player-count.shaded.org.apache.commons</shadedPattern>
7070
</relocation>
71-
<relocation>
72-
<pattern>org.slf4j</pattern>
73-
<shadedPattern>multi-proxy-player-count.shaded.org.slf4j</shadedPattern>
74-
</relocation>
7571
<relocation>
7672
<pattern>redis.clients</pattern>
7773
<shadedPattern>multi-proxy-player-count.shaded.redis.clients</shadedPattern>
7874
</relocation>
79-
</relocations>
75+
</relocations-->
8076
<transformers>
8177
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
8278
<mainClass>com.github.justadeni.multiProxyPlayerCount.MultiProxyPlayerCount</mainClass>

src/main/java/com/github/justadeni/multiProxyPlayerCount/MultiProxyPlayerCount.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
@Plugin(
2424
id = "multiproxyplayercount",
2525
name = "MultiProxyPlayerCount",
26-
version = "0.0.1",
26+
version = "0.1.6",
2727
description = "Plugin that allows multiple proxy networks to share a player list between them.",
2828
url = "https://github.com/justADeni/MultiProxyPlayerCount",
2929
authors = {"justADeni"}

src/main/java/com/github/justadeni/multiProxyPlayerCount/config/ConfigImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.github.justadeni.multiProxyPlayerCount.config;
22

3+
import com.github.justadeni.multiProxyPlayerCount.MultiProxyPlayerCount;
34
import io.github.wasabithumb.jtoml.JToml;
45
import io.github.wasabithumb.jtoml.document.TomlDocument;
56
import io.github.wasabithumb.jtoml.except.TomlException;
@@ -24,7 +25,7 @@ public ConfigImpl(Path path, Logger logger) {
2425
this.path = path.resolve("config.toml");
2526
this.logger = logger;
2627
if (Files.notExists(this.path)) {
27-
try (InputStream in = ConfigImpl.class.getResourceAsStream("config.toml")) {
28+
try (InputStream in = ConfigImpl.class.getResourceAsStream("/config.toml")) {
2829
Files.createDirectories(this.path.getParent());
2930
Files.copy(in, this.path, StandardCopyOption.REPLACE_EXISTING);
3031
} catch (IOException e) {

src/main/resources/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Changes will be applied only after server restart
33
[connection]
44
host = "url-here"
5-
port = 0000
5+
port = 1111
66
user = "username"
77
password = "password123"
88

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"id": "multiproxyplayercount",
3+
"name": "MultiProxyPlayerCount",
4+
"version": "0.1.6",
5+
"main": "com.github.justadeni.multiProxyPlayerCount.MultiProxyPlayerCount"
6+
}

0 commit comments

Comments
 (0)