Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public void onEnable() {
getConfig().options().copyDefaults(true);
saveConfig();

CLUpdate clUpdate = new CLUpdate(this);
boolean enableUpdates = getConfig().getBoolean("updates");

Server server = getServer();
ConsoleCommandSender console = server.getConsoleSender();
Expand All @@ -37,7 +37,10 @@ public void onEnable() {
}

console.sendMessage(ChatColor.AQUA + getDescription().getName() + " V" + getDescription().getVersion() + " has been enabled!");
Bukkit.getPluginManager().registerEvents(clUpdate, this);
if(enableUpdates) {
CLUpdate clUpdate = new CLUpdate(this);
Bukkit.getPluginManager().registerEvents(clUpdate, this);
}
}

public static void sendActionBar(Player player, String message) {
Expand Down Expand Up @@ -127,4 +130,4 @@ public static void sendActionBarToAllPlayers(String message, int duration) {
sendActionBar(p, message, duration);
}
}
}
}
1 change: 1 addition & 0 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
updates: true