Try detect more reloads
This commit is contained in:
parent
25f6ac8b1e
commit
ccff8bc6dc
@ -59,14 +59,14 @@ public class LibsDisguises extends JavaPlugin {
|
||||
|
||||
@Override
|
||||
public void onLoad() {
|
||||
instance = this;
|
||||
|
||||
if (!Bukkit.getServer().getWorlds().isEmpty()) {
|
||||
if (instance != null || !Bukkit.getServer().getWorlds().isEmpty() || !Bukkit.getOnlinePlayers().isEmpty()) {
|
||||
reloaded = true;
|
||||
getLogger().severe("Server was reloaded! Please do not report any bugs! This plugin can't handle " + "reloads gracefully!");
|
||||
return;
|
||||
}
|
||||
|
||||
instance = this;
|
||||
|
||||
Plugin plugin = Bukkit.getPluginManager().getPlugin("ProtocolLib");
|
||||
|
||||
if (plugin == null || DisguiseUtilities.isOlderThan(DisguiseUtilities.getProtocolLibRequiredVersion(), plugin.getDescription().getVersion())) {
|
||||
@ -286,6 +286,8 @@ public class LibsDisguises extends JavaPlugin {
|
||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||
DisguiseUtilities.removeSelfDisguiseScoreboard(player);
|
||||
}
|
||||
|
||||
reloaded = true;
|
||||
}
|
||||
|
||||
public boolean isReleaseBuild() {
|
||||
|
Loading…
Reference in New Issue
Block a user