Typo fixes
This commit is contained in:
25 files changed
+76
-77
No files matched your search
@@ -69,11 +69,11 @@ public class BukkitLoginSession extends LoginSession {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the verify token the server sent to the client.
|
||||
* Gets the verify-token the server sent to the client.
|
||||
*
|
||||
* Empty if it's a BungeeCord connection
|
||||
*
|
||||
* @return the verify token from the server
|
||||
* @return verify token from the server
|
||||
*/
|
||||
public synchronized byte[] getVerifyToken() {
|
||||
return verifyToken.clone();
|
||||
|
||||
@@ -91,7 +91,7 @@ public class FastLoginBukkit extends JavaPlugin implements PlatformPlugin<Comman
|
||||
core.load();
|
||||
|
||||
if (getServer().getOnlineMode()) {
|
||||
//we need to require offline to prevent a loginSession request for a offline player
|
||||
//we need to require offline to prevent a loginSession request for an offline player
|
||||
logger.error("Server has to be in offline mode");
|
||||
setEnabled(false);
|
||||
return;
|
||||
@@ -149,7 +149,7 @@ public class FastLoginBukkit extends JavaPlugin implements PlatformPlugin<Comman
|
||||
|
||||
pluginManager.registerEvents(new ConnectionListener(this), this);
|
||||
|
||||
//if server is using paper - we need to add one more listener to correct the usercache usage
|
||||
//if server is using paper - we need to add one more listener to correct the user cache usage
|
||||
if (PaperLib.isPaper()) {
|
||||
pluginManager.registerEvents(new PaperCacheListener(this), this);
|
||||
}
|
||||
@@ -218,22 +218,22 @@ public class FastLoginBukkit extends JavaPlugin implements PlatformPlugin<Comman
|
||||
return loginSession;
|
||||
}
|
||||
|
||||
public BukkitLoginSession getSession(InetSocketAddress addr) {
|
||||
String id = getSessionId(addr);
|
||||
public BukkitLoginSession getSession(InetSocketAddress address) {
|
||||
String id = getSessionId(address);
|
||||
return loginSession.get(id);
|
||||
}
|
||||
|
||||
public String getSessionId(InetSocketAddress addr) {
|
||||
return addr.getAddress().getHostAddress() + ':' + addr.getPort();
|
||||
public String getSessionId(InetSocketAddress address) {
|
||||
return address.getAddress().getHostAddress() + ':' + address.getPort();
|
||||
}
|
||||
|
||||
public void putSession(InetSocketAddress addr, BukkitLoginSession session) {
|
||||
String id = getSessionId(addr);
|
||||
public void putSession(InetSocketAddress address, BukkitLoginSession session) {
|
||||
String id = getSessionId(address);
|
||||
loginSession.put(id, session);
|
||||
}
|
||||
|
||||
public void removeSession(InetSocketAddress addr) {
|
||||
String id = getSessionId(addr);
|
||||
public void removeSession(InetSocketAddress address) {
|
||||
String id = getSessionId(address);
|
||||
loginSession.remove(id);
|
||||
}
|
||||
|
||||
|
||||
@@ -121,11 +121,11 @@ public class CrazyLoginHook implements AuthPlugin<Player> {
|
||||
public boolean forceRegister(Player player, String password) {
|
||||
CrazyLoginDataDatabase crazyDatabase = crazyLoginPlugin.getCrazyDatabase();
|
||||
|
||||
//this executes a sql query and accesses only thread safe collections so we can run it async
|
||||
//this executes a sql query and accesses only thread safe collections, so we can run it async
|
||||
LoginPlayerData playerData = crazyLoginPlugin.getPlayerData(player.getName());
|
||||
if (playerData == null) {
|
||||
//create a fake account - this will be saved to the database with the password=FAILEDLOADING
|
||||
//user cannot login with that password unless the admin uses plain text
|
||||
//user cannot log in with that password unless the admin uses plain text
|
||||
//this automatically marks the player as logged in
|
||||
crazyDatabase.save(new LoginPlayerData(player));
|
||||
return forceLogin(player);
|
||||
|
||||
+1
-1
@@ -128,7 +128,7 @@ public class BungeeListener implements PluginMessageListener {
|
||||
session.setVerified(true);
|
||||
plugin.putSession(player.getAddress(), session);
|
||||
|
||||
// only start a new login task if the join event fired earlier. This event then didn
|
||||
// only start a new login task if the join event fired earlier. This event then didn't
|
||||
boolean result = plugin.getBungeeManager().didJoinEventFired(player);
|
||||
plugin.getLog().info("Delaying force login until join event fired?: {}", result);
|
||||
if (result) {
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.geysermc.floodgate.api.player.FloodgatePlayer;
|
||||
|
||||
/**
|
||||
* This listener tells authentication plugins if the player has a premium account and we checked it successfully. So the
|
||||
* This listener tells authentication plugins weather the player has a premium account. So the
|
||||
* plugin can skip authentication.
|
||||
*/
|
||||
public class ConnectionListener implements Listener {
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ public class EncryptionUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a RSA key pair
|
||||
* Generate an RSA key pair
|
||||
*
|
||||
* @return The RSA key pair.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -83,7 +83,7 @@ class ProtocolLibLoginSource implements LoginSource {
|
||||
|
||||
newPacket.getByteArrays().write(verifyField, verifyToken);
|
||||
|
||||
//serverId is a empty string
|
||||
//serverId is an empty string
|
||||
ProtocolLibrary.getProtocolManager().sendServerPacket(player, newPacket);
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -101,7 +101,7 @@ public class VerifyResponseTask implements Runnable {
|
||||
verifyResponse(session);
|
||||
}
|
||||
} finally {
|
||||
//this is a fake packet; it shouldn't be send to the server
|
||||
//this is a fake packet; it shouldn't be sent to the server
|
||||
synchronized (packetEvent.getAsyncMarker().getProcessingLock()) {
|
||||
packetEvent.setCancelled(true);
|
||||
}
|
||||
@@ -159,7 +159,7 @@ public class VerifyResponseTask implements Runnable {
|
||||
setPremiumUUID(session.getUuid());
|
||||
receiveFakeStartPacket(realUsername);
|
||||
} else {
|
||||
//user tried to fake a authentication
|
||||
//user tried to fake an authentication
|
||||
disconnect("invalid-session", true
|
||||
, "GameProfile {0} ({1}) tried to log in with an invalid session ServerId: {2}"
|
||||
, session.getRequestUsername(), socketAddress, serverId);
|
||||
@@ -188,7 +188,7 @@ public class VerifyResponseTask implements Runnable {
|
||||
|
||||
//https://github.com/bergerkiller/CraftSource/blob/master/net.minecraft.server/LoginListener.java#L182
|
||||
if (!Arrays.equals(requestVerify, EncryptionUtil.decrypt(serverKey.getPrivate(), responseVerify))) {
|
||||
//check if the verify token are equal to the server sent one
|
||||
//check if the verify-token are equal to the server sent one
|
||||
disconnect("invalid-verify-token", true
|
||||
, "GameProfile {0} ({1}) tried to login with an invalid verify token. Server: {2} Client: {3}"
|
||||
, session.getRequestUsername(), packetEvent.getPlayer().getAddress(), requestVerify, responseVerify);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# project data for Bukkit in order to register our plugin with all it components
|
||||
# project data for Bukkit in order to register our plugin with all it's components
|
||||
# ${-} are variables from Maven (pom.xml) which will be replaced after the build
|
||||
name: ${project.parent.name}
|
||||
version: ${project.version}-${git.commit.id.abbrev}
|
||||
@@ -11,11 +11,11 @@ description: |
|
||||
website: ${project.url}
|
||||
dev-url: ${project.url}
|
||||
|
||||
# This plugin don't have to be transformed for compatibility with Minecraft >= 1.13
|
||||
# This plugin doesn't have to be transformed for compatibility with Minecraft >= 1.13
|
||||
api-version: '1.13'
|
||||
|
||||
softdepend:
|
||||
# We depend either ProtocolLib or ProtocolSupport
|
||||
# We depend on either ProtocolLib or ProtocolSupport
|
||||
- ProtocolSupport
|
||||
- ProtocolLib
|
||||
# Premium variable
|
||||
|
||||
Reference in new issue
Block a user