ok
This commit is contained in:
+2
-2
@@ -44,9 +44,9 @@ public class PlatformMethodsImpl implements PlatformMethods {
|
|||||||
@Override
|
@Override
|
||||||
public String getPluginVersion() {
|
public String getPluginVersion() {
|
||||||
Optional<PluginContainer> plugin = proxyServer.getPluginManager().getPlugin("ajqueue");
|
Optional<PluginContainer> plugin = proxyServer.getPluginManager().getPlugin("ajqueue");
|
||||||
if(plugin.isEmpty()) return "?E";
|
if(!plugin.isPresent()) return "?E";
|
||||||
Optional<String> version = plugin.get().getDescription().getVersion();
|
Optional<String> version = plugin.get().getDescription().getVersion();
|
||||||
if(version.isEmpty()) return "?V";
|
if(!version.isPresent()) return "?V";
|
||||||
return version.get();
|
return version.get();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -50,7 +50,7 @@ public class VelocityPlayer implements AdaptedPlayer, Audience {
|
|||||||
@Override
|
@Override
|
||||||
public String getServerName() {
|
public String getServerName() {
|
||||||
Optional<ServerConnection> serverConnection = handle.getCurrentServer();
|
Optional<ServerConnection> serverConnection = handle.getCurrentServer();
|
||||||
if(serverConnection.isEmpty()) return "none";
|
if(!serverConnection.isPresent()) return "none";
|
||||||
ServerConnection connection = serverConnection.get();
|
ServerConnection connection = serverConnection.get();
|
||||||
return connection.getServerInfo().getName();
|
return connection.getServerInfo().getName();
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -38,7 +38,7 @@ public class ServerBuilderImpl implements ServerBuilder {
|
|||||||
@Override
|
@Override
|
||||||
public AdaptedServer getServer(String name) {
|
public AdaptedServer getServer(String name) {
|
||||||
Optional<RegisteredServer> serverOptional = proxyServer.getServer(name);
|
Optional<RegisteredServer> serverOptional = proxyServer.getServer(name);
|
||||||
if(serverOptional.isEmpty()) return null;
|
if(!serverOptional.isPresent()) return null;
|
||||||
return new VelocityServer(serverOptional.get());
|
return new VelocityServer(serverOptional.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user