Correct getServerInfo() on Waterfall

This commit is contained in:
ME1312 2020-01-25 13:30:16 -05:00
parent 7a4d28b113
commit 11f92f2559
No known key found for this signature in database
GPG Key ID: FEFFE2F698E88FA8
8 changed files with 48 additions and 10 deletions

View File

@ -30,14 +30,14 @@
<dependency>
<groupId>net.ME1312.Galaxi</groupId>
<artifactId>GalaxiUtil</artifactId>
<version>19w51a</version>
<version>20w04c</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>net.ME1312.Galaxi</groupId>
<artifactId>GalaxiEngine</artifactId>
<version>19w51a</version>
<version>20w04c</version>
<scope>provided</scope>
</dependency>
<dependency>

View File

@ -72,7 +72,7 @@ public final class SubProxy extends BungeeCord implements Listener {
public SubProtocol subprotocol;
public SubDataServer subdata = null;
public SubServer sudo = null;
public static final Version version = Version.fromString("2.15a/rv2");
public static final Version version = Version.fromString("2.15a/rv3");
public Proxy redis = null;
public boolean canSudo = false;
@ -797,6 +797,25 @@ public final class SubProxy extends BungeeCord implements Listener {
return servers;
}
/**
* Emulate Waterfall's getServersCopy()
*
* @return Server Map Copy (which is the default, by the way)
*/
public Map<String, ServerInfo> getServersCopy() {
return getServers();
}
/**
* Force BungeeCord's implementation of getServerInfo()
*
* @return ServerInfo
*/
@Override
public ServerInfo getServerInfo(String name) {
return getServers().get(name);
}
@EventHandler(priority = Byte.MAX_VALUE)
public void ping(ProxyPingEvent e) {
int offline = 0;

View File

@ -48,7 +48,7 @@
<dependency>
<groupId>net.ME1312.Galaxi</groupId>
<artifactId>GalaxiUtil</artifactId>
<version>19w51a</version>
<version>20w04c</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>

View File

@ -30,7 +30,7 @@
<dependency>
<groupId>net.ME1312.Galaxi</groupId>
<artifactId>GalaxiUtil</artifactId>
<version>19w51a</version>
<version>20w04c</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>

View File

@ -8,4 +8,4 @@ Template:
Can-Update: true
Executable: 'bash build.sh'
Settings:
Executable: 'java -Xmx1024M -Dorg.bukkit.craftbukkit.libs.jline.terminal=unix -Djansi.passthrough=true -jar Spigot.jar'
Executable: 'java -Xmx1024M -Dorg.bukkit.craftbukkit.libs.jline.terminal=unix -Djansi.passthrough=true -jar Spigot.jar nogui'

View File

@ -20,7 +20,7 @@
<dependency>
<groupId>net.ME1312.Galaxi</groupId>
<artifactId>GalaxiEngine</artifactId>
<version>19w51a</version>
<version>20w04c</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>

View File

@ -30,14 +30,14 @@
<dependency>
<groupId>net.ME1312.Galaxi</groupId>
<artifactId>GalaxiUtil</artifactId>
<version>19w51a</version>
<version>20w04c</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>net.ME1312.Galaxi</groupId>
<artifactId>GalaxiEngine</artifactId>
<version>19w51a</version>
<version>20w04c</version>
<scope>provided</scope>
</dependency>
<dependency>

View File

@ -57,7 +57,7 @@ public final class ExProxy extends BungeeCord implements Listener {
public boolean redis = false;
public final SubAPI api = new SubAPI(this);
public SubProtocol subprotocol;
public static final Version version = Version.fromString("2.15a/rv2");
public static final Version version = Version.fromString("2.15a/rv3");
public final boolean isPatched;
public final boolean isGalaxi;
@ -275,6 +275,25 @@ public final class ExProxy extends BungeeCord implements Listener {
}
}
/**
* Emulate Waterfall's getServersCopy()
*
* @return Server Map Copy (which is the default, by the way)
*/
public Map<String, ServerInfo> getServersCopy() {
return getServers();
}
/**
* Force BungeeCord's implementation of getServerInfo()
*
* @return ServerInfo
*/
@Override
public ServerInfo getServerInfo(String name) {
return getServers().get(name);
}
/**
* Reset all changes made by startListeners
*