Improves some variable names and adds some comments

This commit is contained in:
2021-09-20 18:22:20 +02:00
parent d24f35375a
commit 1e29db58b9
15 changed files with 310 additions and 210 deletions

View File

@ -48,7 +48,7 @@ public final class BungeeHelper {
dataOutputStream.writeBytes(message);
player.sendPluginMessage(Stargate.stargate, bungeeChannel, byteArrayOutputStream.toByteArray());
} catch (IOException ex) {
Stargate.log.severe(Stargate.getString("prefix") + "Error sending BungeeCord teleport packet");
Stargate.logger.severe(Stargate.getString("prefix") + "Error sending BungeeCord teleport packet");
ex.printStackTrace();
return false;
}
@ -72,7 +72,7 @@ public final class BungeeHelper {
player.sendPluginMessage(Stargate.stargate, bungeeChannel, byteArrayOutputStream.toByteArray());
byteArrayOutputStream.reset();
} catch (IOException ex) {
Stargate.log.severe(Stargate.getString("prefix") + "Error sending BungeeCord connect packet");
Stargate.logger.severe(Stargate.getString("prefix") + "Error sending BungeeCord connect packet");
ex.printStackTrace();
return false;
}
@ -99,7 +99,7 @@ public final class BungeeHelper {
data = new byte[dataLength];
dataInputStream.readFully(data);
} catch (IOException ex) {
Stargate.log.severe(Stargate.getString("prefix") + "Error receiving BungeeCord message");
Stargate.logger.severe(Stargate.getString("prefix") + "Error receiving BungeeCord message");
ex.printStackTrace();
return null;
}
@ -127,7 +127,7 @@ public final class BungeeHelper {
Portal destinationPortal = PortalHandler.getBungeeGate(destination);
// Specified an invalid gate. For now we'll just let them connect at their current location
if (destinationPortal == null) {
Stargate.log.info(Stargate.getString("prefix") + "Bungee gate " + destination + " does not exist");
Stargate.logger.info(Stargate.getString("prefix") + "Bungee gate " + destination + " does not exist");
return;
}
destinationPortal.teleport(player, destinationPortal, null);