Improve code quality
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Bea 2023-02-11 21:05:54 +01:00
parent 85cecca263
commit 21f613bbe7
3 changed files with 6 additions and 10 deletions

View File

@ -54,7 +54,10 @@ public class HubThat extends JavaPlugin
// Initialize command classes.
debugger.sendDebugMessage(Level.INFO, "Loading classes...");
FileUtils fileUtilsInstance = new FileUtils(this);
// todo: ^ this is bad, utils should not be instantiated.
HubThatCommand hubThatCommandInstance = new HubThatCommand(this);
HubCommand hubCommandInstance = new HubCommand(this);
SpawnCommand spawnCommandInstance = new SpawnCommand(this);

View File

@ -13,19 +13,14 @@ public enum ConfigEntry
MOVEMENT_DETECTION_ENABLED("movement-detection.enable"),
GAMEMODE_SET_ON_JOIN("gamemode.set-on-join"),
GAMEMODE("gamemode.mode"),
TELEPORTATION_RESPAWN_HANDLER("teleportation.respawn-handler"),
TELEPORTATION_TP_HUB_ON_JOIN("teleportation.teleport-to-hub-on-join"),
TELEPORTATION_TP_MESSAGE_ON_JOIN("teleportation.send-tp-message-on-join"),
TELEPORTATION_TP_HUB_ON_RESPAWN("teleportation.teleport-to-hub-on-respawn"),
MULTIVERSE_BYPASS("settings.multiverse-bypass"),
INVISIBILITY_FIX("settings.fix-invisible-after-tp"),
;

View File

@ -87,8 +87,7 @@ public class UpdateChecker implements Runnable
} catch (IOException e)
{
setAndSendErrorCode("null json", console);
setAndSendErrorCode(e.getMessage(), console);
return;
}
@ -97,11 +96,10 @@ public class UpdateChecker implements Runnable
JsonObject json = (JsonObject)jsonParser.parse(new InputStreamReader(jsonIS, StandardCharsets.UTF_8));
// Close the input stream...
/*try {
try {
jsonIS.close();
} catch (IOException ignored)
{
}*/
{}
// Check if the "version" String is present...
newVersion = null;