mirror of
https://github.com/shansen/EggCatcher.git
synced 2024-11-26 12:05:45 +01:00
Added a configuration option to enable/disable update checking
This commit is contained in:
parent
4f54f2f9c5
commit
9ec651ea57
@ -45,8 +45,12 @@ public class EggCatcher extends JavaPlugin {
|
||||
}
|
||||
|
||||
public void onEnable() {
|
||||
this.CheckUpdate();
|
||||
this.CheckConfigurationFile();
|
||||
|
||||
if (this.getConfig().getBoolean("CheckForUpdates")) {
|
||||
this.CheckUpdate();
|
||||
}
|
||||
|
||||
PluginManager pm = this.getServer().getPluginManager();
|
||||
|
||||
final EggCatcherPlayerListener playerListener = new EggCatcherPlayerListener();
|
||||
@ -122,6 +126,7 @@ public class EggCatcher extends JavaPlugin {
|
||||
this.getConfig().set("HealthPercentage.Bat", 100.0);
|
||||
this.getConfig().set("Messages.HealthPercentageFail", "The mob has more than %s percent health left and "
|
||||
+ "cannot be caught!");
|
||||
this.getConfig().set("CheckForUpdates", true);
|
||||
this.getConfig().set("ConfigVersion", 1.25);
|
||||
this.saveConfig();
|
||||
} else if (configVersion == 1.21) {
|
||||
|
@ -120,4 +120,5 @@ Messages:
|
||||
CatchChanceFail: "You failed to catch this mob!"
|
||||
CatchChanceSuccess: ""
|
||||
HealthPercentageFail: "The mob has more than %s percent health left and cannot be caught!"
|
||||
ConfigVersion: 1.25
|
||||
ConfigVersion: 1.25
|
||||
CheckForUpdates: true
|
Loading…
Reference in New Issue
Block a user