Fix code formatting according to checkstyle config
This commit is contained in:
44 files changed
+274
-203
No files matched your search
@@ -59,10 +59,10 @@ public class BungeeLoginSession extends LoginSession {
|
||||
|
||||
@Override
|
||||
public synchronized String toString() {
|
||||
return this.getClass().getSimpleName() + '{' +
|
||||
"alreadySaved=" + alreadySaved +
|
||||
", alreadyLogged=" + alreadyLogged +
|
||||
", registered=" + registered +
|
||||
"} " + super.toString();
|
||||
return this.getClass().getSimpleName() + '{'
|
||||
+ "alreadySaved=" + alreadySaved
|
||||
+ ", alreadyLogged=" + alreadyLogged
|
||||
+ ", registered=" + registered
|
||||
+ "} " + super.toString();
|
||||
}
|
||||
}
|
||||
@@ -72,8 +72,8 @@ public class BungeeLoginSource implements LoginSource {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.getClass().getSimpleName() + '{' +
|
||||
"connection=" + connection +
|
||||
'}';
|
||||
return this.getClass().getSimpleName() + '{'
|
||||
+ "connection=" + connection
|
||||
+ '}';
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -71,7 +71,7 @@ import org.slf4j.LoggerFactory;
|
||||
public class ConnectListener implements Listener {
|
||||
|
||||
private static final String UUID_FIELD_NAME = "uniqueId";
|
||||
private static final MethodHandle uniqueIdSetter;
|
||||
private static final MethodHandle UNIQUE_ID_SETTER;
|
||||
|
||||
static {
|
||||
MethodHandle setHandle = null;
|
||||
@@ -91,7 +91,7 @@ public class ConnectListener implements Listener {
|
||||
);
|
||||
}
|
||||
|
||||
uniqueIdSetter = setHandle;
|
||||
UNIQUE_ID_SETTER = setHandle;
|
||||
}
|
||||
|
||||
private final FastLoginBungee plugin;
|
||||
@@ -155,7 +155,7 @@ public class ConnectListener implements Listener {
|
||||
playerProfile.setId(verifiedUUID);
|
||||
|
||||
// BungeeCord will do this automatically so override it on disabled option
|
||||
if (uniqueIdSetter != null) {
|
||||
if (UNIQUE_ID_SETTER != null) {
|
||||
InitialHandler initialHandler = (InitialHandler) connection;
|
||||
|
||||
if (!plugin.getCore().getConfig().get("premiumUuid", true)) {
|
||||
@@ -179,7 +179,7 @@ public class ConnectListener implements Listener {
|
||||
// BungeeCord only allows setting the UUID in PreLogin events and before requesting online mode
|
||||
// However if online mode is requested, it will override previous values
|
||||
// So we have to do it with reflection
|
||||
uniqueIdSetter.invokeExact(connection, offlineUUID);
|
||||
UNIQUE_ID_SETTER.invokeExact(connection, offlineUUID);
|
||||
|
||||
String format = "Overridden UUID from {} to {} (based of {}) on {}";
|
||||
plugin.getLog().info(format, oldPremiumId, offlineUUID, username, connection);
|
||||
|
||||
+4
-4
@@ -73,8 +73,8 @@ public class AsyncToggleMessage implements Runnable {
|
||||
playerProfile.setPremium(false);
|
||||
playerProfile.setId(null);
|
||||
core.getStorage().save(playerProfile);
|
||||
PremiumToggleReason reason = (!isPlayerSender || !sender.getName().equalsIgnoreCase(playerProfile.getName())) ?
|
||||
PremiumToggleReason.COMMAND_OTHER : PremiumToggleReason.COMMAND_SELF;
|
||||
PremiumToggleReason reason = (!isPlayerSender || !sender.getName().equalsIgnoreCase(playerProfile.getName()))
|
||||
? PremiumToggleReason.COMMAND_OTHER : PremiumToggleReason.COMMAND_SELF;
|
||||
core.getPlugin().getProxy().getPluginManager().callEvent(
|
||||
new BungeeFastLoginPremiumToggleEvent(playerProfile, reason));
|
||||
sendMessage("remove-premium");
|
||||
@@ -89,8 +89,8 @@ public class AsyncToggleMessage implements Runnable {
|
||||
|
||||
playerProfile.setPremium(true);
|
||||
core.getStorage().save(playerProfile);
|
||||
PremiumToggleReason reason = (!isPlayerSender || !sender.getName().equalsIgnoreCase(playerProfile.getName())) ?
|
||||
PremiumToggleReason.COMMAND_OTHER : PremiumToggleReason.COMMAND_SELF;
|
||||
PremiumToggleReason reason = (!isPlayerSender || !sender.getName().equalsIgnoreCase(playerProfile.getName()))
|
||||
? PremiumToggleReason.COMMAND_OTHER : PremiumToggleReason.COMMAND_SELF;
|
||||
core.getPlugin().getProxy().getPluginManager().callEvent(
|
||||
new BungeeFastLoginPremiumToggleEvent(playerProfile, reason));
|
||||
sendMessage("add-premium");
|
||||
|
||||
Reference in new issue
Block a user