mirror of
https://github.com/TotalFreedomMC/TF-LibsDisguises.git
synced 2025-02-11 11:40:29 +00:00
Catch reloads
This commit is contained in:
parent
765b07a46a
commit
2bc4209a6c
1 changed files with 18 additions and 0 deletions
|
@ -36,9 +36,27 @@ public class LibsDisguises extends JavaPlugin {
|
|||
private static LibsDisguises instance;
|
||||
private DisguiseListener listener;
|
||||
private String buildNumber;
|
||||
private boolean reloaded;
|
||||
|
||||
@Override
|
||||
public void onLoad() {
|
||||
if (Bukkit.getServer().getWorlds().isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
reloaded = true;
|
||||
getLogger().severe("Lib's Disguises was reloaded! Please do not report any bugs! This plugin can't handle " +
|
||||
"reloads gracefully!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
if (reloaded) {
|
||||
getLogger()
|
||||
.severe("Lib's Disguises was reloaded! Please do not report any bugs! This plugin can't handle " +
|
||||
"reloads gracefully!");
|
||||
}
|
||||
|
||||
instance = this;
|
||||
|
||||
if (!new File(getDataFolder(), "disguises.yml").exists()) {
|
||||
|
|
Loading…
Reference in a new issue