Skip to content

Commit

Permalink
Updated GitHub repository. HOT FIX! Removed unnecessary offline mode …
Browse files Browse the repository at this point in the history
…disable of GUI. Fixed default startup behaviour bug. Changed plugin version to `1.0.7`.
  • Loading branch information
Loving11ish committed Dec 5, 2023
1 parent 95bbaed commit 8f05d23
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 21 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>me.loving11ish</groupId>
<artifactId>EpicHomes</artifactId>
<version>1.0.6</version>
<version>1.0.7</version>
<packaging>jar</packaging>

<name>EpicHomes</name>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/me/loving11ish/epichomes/EpicHomes.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public final class EpicHomes extends JavaPlugin {
private static EpicHomes plugin;
private static FoliaLib foliaLib;
private static VersionCheckerUtils versionCheckerUtils;
private static boolean GUIEnabled = false;
private static boolean onlineMode = false;
private static boolean GUIEnabled = true;
private static boolean onlineMode = true;

private boolean updateAvailable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,36 +31,29 @@ public void onPlayerPreConnect(AsyncPlayerPreLoginEvent event) {
if (EpicHomes.getVersionCheckerUtils().getVersion() >= 14){
EpicHomes.setGUIEnabled(config.getBoolean("gui-system.use-global-gui.enabled"));
if (EpicHomes.isGUIEnabled()){
console.sendMessage(ColorUtils.translateColorCodes("&6ClansLite: &3Global GUI system enabled!"));
console.sendMessage(ColorUtils.translateColorCodes("&6EpicHomes: &3Global GUI system enabled!"));
}else {
console.sendMessage(ColorUtils.translateColorCodes("&6ClansLite: &c&lGlobal GUI system disabled!"));
console.sendMessage(ColorUtils.translateColorCodes("&6EpicHomes: &c&lGlobal GUI system disabled!"));
}
}else {
EpicHomes.setGUIEnabled(false);
console.sendMessage(ColorUtils.translateColorCodes("&6ClansLite: &cYour current server version does not support PersistentDataContainers!"));
console.sendMessage(ColorUtils.translateColorCodes("&6ClansLite: &c&lGlobal GUI system disabled!"));
console.sendMessage(ColorUtils.translateColorCodes("&6EpicHomes: &cYour current server version does not support PersistentDataContainers!"));
console.sendMessage(ColorUtils.translateColorCodes("&6EpicHomes: &c&lGlobal GUI system disabled!"));
}
}else if (!MojangAPIRequestUtils.canGetOfflinePlayerData(uuid.toString(), event.getName())){
EpicHomes.setOnlineMode(false);
if (EpicHomes.getVersionCheckerUtils().getVersion() >= 14){
EpicHomes.setGUIEnabled(false);
console.sendMessage(ColorUtils.translateColorCodes("&6ClansLite: &c&lGlobal GUI system disabled!"));
}else {
EpicHomes.setGUIEnabled(false);
console.sendMessage(ColorUtils.translateColorCodes("&6ClansLite: &cYour current server version does not support PersistentDataContainers!"));
console.sendMessage(ColorUtils.translateColorCodes("&6ClansLite: &c&lGlobal GUI system disabled!"));
}
console.sendMessage(ColorUtils.translateColorCodes("&4-------------------------------------------"));
console.sendMessage(ColorUtils.translateColorCodes("&6ClansLite: &4This plugin is only supported on online servers or servers running in an online network situation!"));
console.sendMessage(ColorUtils.translateColorCodes("&6ClansLite: &4Some features may behave incorrectly or may be broken completely!"));
console.sendMessage(ColorUtils.translateColorCodes("&6ClansLite: &4Please set &e'online-mode=true' &4in &e'server.properties'"));
console.sendMessage(ColorUtils.translateColorCodes("&6ClansLite: &4Or ensure your proxy setup is correct and your proxy is set to online mode!"));
console.sendMessage(ColorUtils.translateColorCodes("&6EpicHomes: &4This plugin is only officially supported on online servers"));
console.sendMessage(ColorUtils.translateColorCodes("&6EpicHomes: &4or servers running in an online network situation!"));
console.sendMessage(ColorUtils.translateColorCodes("&6EpicHomes: &4Some features may behave incorrectly or may be broken completely!"));
console.sendMessage(ColorUtils.translateColorCodes("&6EpicHomes: &4Please set &e'online-mode=true' &4in &e'server.properties'"));
console.sendMessage(ColorUtils.translateColorCodes("&6EpicHomes: &4Or ensure your proxy setup is correct and your proxy is set to online mode!"));
console.sendMessage(ColorUtils.translateColorCodes("&4-------------------------------------------"));
}
}catch (IOException e){
console.sendMessage(ColorUtils.translateColorCodes("&4-------------------------------------------"));
console.sendMessage(ColorUtils.translateColorCodes("&6ClansLite: &4Unable to reach Mojang player databaseutils!"));
console.sendMessage(ColorUtils.translateColorCodes("&6ClansLite: &4See stacktrace below for more details."));
console.sendMessage(ColorUtils.translateColorCodes("&6EpicHomes: &4Unable to reach Mojang player databaseutils!"));
console.sendMessage(ColorUtils.translateColorCodes("&6EpicHomes: &4See stacktrace below for more details."));
e.printStackTrace();
console.sendMessage(ColorUtils.translateColorCodes("&4-------------------------------------------"));
}
Expand Down

0 comments on commit 8f05d23

Please sign in to comment.