forked from TuxCoding/FastLogin
Clean up methods names and documentation
This commit is contained in:
@@ -66,8 +66,4 @@ public class VelocityLoginSource implements LoginSource {
|
||||
public InetSocketAddress getAddress() {
|
||||
return connection.getRemoteAddress();
|
||||
}
|
||||
|
||||
public InboundConnection getConnection() {
|
||||
return connection;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -82,7 +82,7 @@ public class AsyncPremiumCheck extends JoinManagement<Player, CommandSource, Vel
|
||||
String username, boolean registered) {
|
||||
source.enableOnlinemode();
|
||||
VelocityLoginSession session = new VelocityLoginSession(username, registered, profile);
|
||||
plugin.getSession().put(source.getConnection().getRemoteAddress(), session);
|
||||
plugin.getSession().put(source.getAddress(), session);
|
||||
|
||||
String ip = source.getAddress().getAddress().getHostAddress();
|
||||
plugin.getCore().addLoginAttempt(ip, username);
|
||||
@@ -91,6 +91,6 @@ public class AsyncPremiumCheck extends JoinManagement<Player, CommandSource, Vel
|
||||
@Override
|
||||
public void startCrackedSession(VelocityLoginSource source, StoredProfile profile, String username) {
|
||||
VelocityLoginSession session = new VelocityLoginSession(username, false, profile);
|
||||
plugin.getSession().put(source.getConnection().getRemoteAddress(), session);
|
||||
plugin.getSession().put(source.getAddress(), session);
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -51,8 +51,8 @@ public class AsyncToggleMessage implements Runnable {
|
||||
this.targetPlayer = playerName;
|
||||
this.toPremium = toPremium;
|
||||
this.isPlayerSender = playerSender;
|
||||
if (sender instanceof Player) {
|
||||
senderName = ((Player) sender).getUsername();
|
||||
if (sender instanceof Player playSender) {
|
||||
senderName = playSender.getUsername();
|
||||
} else {
|
||||
senderName = "";
|
||||
}
|
||||
@@ -70,7 +70,7 @@ public class AsyncToggleMessage implements Runnable {
|
||||
private void turnOffPremium() {
|
||||
StoredProfile playerProfile = core.getStorage().loadProfile(targetPlayer);
|
||||
//existing player is already cracked
|
||||
if (playerProfile.isSaved() && !playerProfile.isOnlinemodePreferred()) {
|
||||
if (playerProfile.isExistingPlayer() && !playerProfile.isOnlinemodePreferred()) {
|
||||
sendMessage("not-premium");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user