Skip to content

Commit

Permalink
forgot to add: /usr/people/kamey/IdeaProjects/KPManager/target/KPMana…
Browse files Browse the repository at this point in the history
…ger-1.7-SNAPSHOT.jar

in the main class so it never messaged player about updates being available.
  • Loading branch information
Kame03 committed Jan 17, 2023
1 parent bdc01a3 commit 1deaf49
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/java/in/rs/milivojevic/KPManager/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,14 @@ public void onEnable() {
Scoreboard scoreboard = Bukkit.getScoreboardManager().getMainScoreboard();
TabCustomizer tabCustomizer = new TabCustomizer(scoreboard,this);
getServer().getPluginManager().registerEvents(tabCustomizer, this);
getServer().getPluginManager().registerEvents(this, this);

new UpdateChecker(this, 107412).getVersion(version -> {
updateAvailable = !(this.getDescription().getVersion().equals(version));
if (!this.getDescription().getVersion().equals(version)) {
updateAvailable = true;
} else {
updateAvailable = false;
}
if(updateAvailable) {
if (getConfig().getString("updateAvailable") !=null) {
getLogger().info(getConfig().getString("updateAvailable"));
Expand All @@ -42,6 +47,8 @@ public void onPlayerJoin (PlayerJoinEvent event) {
Player player = event.getPlayer();
if(updateAvailable && (player.hasPermission("KPManager.update") || player.isOp())) {
player.sendMessage(getConfig().getString("updateAvailablePlayer").replace('&',ChatColor.COLOR_CHAR));
} else {
getLogger().severe("Error couldn't read config value updateAvailablePlayer, please check your config.yml file");
}
}

Expand Down

0 comments on commit 1deaf49

Please sign in to comment.