Catch reloads
This commit is contained in:
parent
765b07a46a
commit
2bc4209a6c
@ -36,9 +36,27 @@ public class LibsDisguises extends JavaPlugin {
|
|||||||
private static LibsDisguises instance;
|
private static LibsDisguises instance;
|
||||||
private DisguiseListener listener;
|
private DisguiseListener listener;
|
||||||
private String buildNumber;
|
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
|
@Override
|
||||||
public void onEnable() {
|
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;
|
instance = this;
|
||||||
|
|
||||||
if (!new File(getDataFolder(), "disguises.yml").exists()) {
|
if (!new File(getDataFolder(), "disguises.yml").exists()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user