mirror of
https://github.com/TotalFreedomMC/TF-LibsDisguises.git
synced 2024-11-11 01:17:16 +00:00
Try detect more reloads
This commit is contained in:
parent
25f6ac8b1e
commit
ccff8bc6dc
1 changed files with 5 additions and 3 deletions
|
@ -59,14 +59,14 @@ public class LibsDisguises extends JavaPlugin {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLoad() {
|
public void onLoad() {
|
||||||
instance = this;
|
if (instance != null || !Bukkit.getServer().getWorlds().isEmpty() || !Bukkit.getOnlinePlayers().isEmpty()) {
|
||||||
|
|
||||||
if (!Bukkit.getServer().getWorlds().isEmpty()) {
|
|
||||||
reloaded = true;
|
reloaded = true;
|
||||||
getLogger().severe("Server was reloaded! Please do not report any bugs! This plugin can't handle " + "reloads gracefully!");
|
getLogger().severe("Server was reloaded! Please do not report any bugs! This plugin can't handle " + "reloads gracefully!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
instance = this;
|
||||||
|
|
||||||
Plugin plugin = Bukkit.getPluginManager().getPlugin("ProtocolLib");
|
Plugin plugin = Bukkit.getPluginManager().getPlugin("ProtocolLib");
|
||||||
|
|
||||||
if (plugin == null || DisguiseUtilities.isOlderThan(DisguiseUtilities.getProtocolLibRequiredVersion(), plugin.getDescription().getVersion())) {
|
if (plugin == null || DisguiseUtilities.isOlderThan(DisguiseUtilities.getProtocolLibRequiredVersion(), plugin.getDescription().getVersion())) {
|
||||||
|
@ -286,6 +286,8 @@ public class LibsDisguises extends JavaPlugin {
|
||||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||||
DisguiseUtilities.removeSelfDisguiseScoreboard(player);
|
DisguiseUtilities.removeSelfDisguiseScoreboard(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reloaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isReleaseBuild() {
|
public boolean isReleaseBuild() {
|
||||||
|
|
Loading…
Reference in a new issue