mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2024-11-23 04:28:01 +00:00
Analysis performed by IntelliJ IDEA prior to new release on SpigotMC.org
This commit is contained in:
parent
f7a530025a
commit
5fc82400a9
@ -51,11 +51,11 @@ public final class RedisBungee extends Plugin implements Listener {
|
||||
return api;
|
||||
}
|
||||
|
||||
protected static Configuration getConfiguration() {
|
||||
static Configuration getConfiguration() {
|
||||
return configuration;
|
||||
}
|
||||
|
||||
protected final int getCount() {
|
||||
final int getCount() {
|
||||
int c = plugin.getProxy().getOnlineCount();
|
||||
if (pool != null) {
|
||||
Jedis rsc = pool.getResource();
|
||||
@ -72,7 +72,7 @@ public final class RedisBungee extends Plugin implements Listener {
|
||||
return c;
|
||||
}
|
||||
|
||||
protected final Set<String> getPlayers() {
|
||||
final Set<String> getPlayers() {
|
||||
Set<String> players = new HashSet<>();
|
||||
for (ProxiedPlayer pp : plugin.getProxy().getPlayers()) {
|
||||
players.add(pp.getName());
|
||||
@ -91,7 +91,7 @@ public final class RedisBungee extends Plugin implements Listener {
|
||||
return ImmutableSet.copyOf(players);
|
||||
}
|
||||
|
||||
protected final ServerInfo getServerFor(String name) {
|
||||
final ServerInfo getServerFor(String name) {
|
||||
ServerInfo server = null;
|
||||
if (plugin.getProxy().getPlayer(name) != null) return plugin.getProxy().getPlayer(name).getServer().getInfo();
|
||||
if (pool != null) {
|
||||
@ -110,7 +110,7 @@ public final class RedisBungee extends Plugin implements Listener {
|
||||
return TimeUnit.SECONDS.convert(System.currentTimeMillis(), TimeUnit.MILLISECONDS);
|
||||
}
|
||||
|
||||
protected final long getLastOnline(String name) {
|
||||
final long getLastOnline(String name) {
|
||||
long time = -1L;
|
||||
if (plugin.getProxy().getPlayer(name) != null) return 0;
|
||||
if (pool != null) {
|
||||
@ -125,7 +125,7 @@ public final class RedisBungee extends Plugin implements Listener {
|
||||
return time;
|
||||
}
|
||||
|
||||
protected final InetAddress getIpAddress(String name) {
|
||||
final InetAddress getIpAddress(String name) {
|
||||
if (plugin.getProxy().getPlayer(name) != null)
|
||||
return plugin.getProxy().getPlayer(name).getAddress().getAddress();
|
||||
InetAddress ia = null;
|
||||
|
@ -20,9 +20,9 @@ import lombok.NonNull;
|
||||
* @since 0.2.3
|
||||
*/
|
||||
public class RedisBungeeAPI {
|
||||
private RedisBungee plugin;
|
||||
private final RedisBungee plugin;
|
||||
|
||||
protected RedisBungeeAPI(RedisBungee plugin) {
|
||||
RedisBungeeAPI(RedisBungee plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ import java.util.Collections;
|
||||
*/
|
||||
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
public class RedisBungeeCommandSender implements CommandSender {
|
||||
protected static RedisBungeeCommandSender instance = new RedisBungeeCommandSender();
|
||||
static final RedisBungeeCommandSender instance = new RedisBungeeCommandSender();
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
|
@ -30,14 +30,14 @@ import java.util.concurrent.TimeUnit;
|
||||
* @author tuxed
|
||||
* @since 0.2.3
|
||||
*/
|
||||
public class RedisBungeeCommands {
|
||||
class RedisBungeeCommands {
|
||||
private static final BaseComponent[] NO_PLAYER_SPECIFIED =
|
||||
new ComponentBuilder("").color(ChatColor.RED).append("You must specify a player name.").create();
|
||||
private static final BaseComponent[] PLAYER_NOT_FOUND =
|
||||
new ComponentBuilder("").color(ChatColor.RED).append("No such player found.").create();
|
||||
|
||||
public static class GlistCommand extends Command {
|
||||
protected GlistCommand() {
|
||||
GlistCommand() {
|
||||
super("glist", "bungeecord.command.list", "redisbungee");
|
||||
}
|
||||
|
||||
@ -79,7 +79,7 @@ public class RedisBungeeCommands {
|
||||
}
|
||||
|
||||
public static class FindCommand extends Command {
|
||||
protected FindCommand() {
|
||||
FindCommand() {
|
||||
super("find", "bungeecord.command.find");
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ public class RedisBungeeCommands {
|
||||
}
|
||||
|
||||
public static class LastSeenCommand extends Command {
|
||||
protected LastSeenCommand() {
|
||||
LastSeenCommand() {
|
||||
super("lastseen", "redisbungee.command.lastseen");
|
||||
}
|
||||
|
||||
@ -131,7 +131,7 @@ public class RedisBungeeCommands {
|
||||
}
|
||||
|
||||
public static class IpCommand extends Command {
|
||||
protected IpCommand() {
|
||||
IpCommand() {
|
||||
super("ip", "redisbungee.command.ip", "playerip");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user