mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-24 11:37:05 +01:00
Don't TP players when plugin is unloading
This commit is contained in:
parent
ebaa89a732
commit
d3662918c2
@ -243,12 +243,12 @@ public class DungeonsXL extends DREPlugin implements DungeonsAPI {
|
||||
if (!loaded) {
|
||||
return;
|
||||
}
|
||||
loaded = false;
|
||||
saveData();
|
||||
deleteAllInstances();
|
||||
HandlerList.unregisterAll(this);
|
||||
getServer().getScheduler().cancelTasks(this);
|
||||
DPermission.unregister();
|
||||
loaded = false;
|
||||
}
|
||||
|
||||
public void initFolders() {
|
||||
@ -560,6 +560,15 @@ public class DungeonsXL extends DREPlugin implements DungeonsAPI {
|
||||
return groupAdapters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the plugin is not currently in the process of enabling or disabling or entirely disabled, otherwise false.
|
||||
*
|
||||
* @return true if the plugin is not currently in the process of enabling or disabling or entirely disabled, otherwise false
|
||||
*/
|
||||
public boolean isLoaded() {
|
||||
return loaded;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the plugin is currently loading a world, false if not.
|
||||
* <p>
|
||||
|
@ -38,7 +38,7 @@ public class StatusCommand extends DCommand {
|
||||
public static final String TRUE = ChatColor.GREEN + "\u2714";
|
||||
public static final String FALSE = ChatColor.DARK_RED + "\u2718";
|
||||
|
||||
public static final String LATEST_IXL = "0.6.2";
|
||||
public static final String LATEST_IXL = "0.6.3";
|
||||
|
||||
public StatusCommand(DungeonsXL plugin) {
|
||||
super(plugin);
|
||||
|
@ -169,7 +169,7 @@ public abstract class DInstanceWorld implements InstanceWorld {
|
||||
public void kickAllPlayers() {
|
||||
getPlayers().forEach(p -> p.leave());
|
||||
// Players who shouldn't be in the dungeon but still are for some reason
|
||||
if (world != null) {
|
||||
if (plugin.isLoaded() && world != null) {
|
||||
getWorld().getPlayers().forEach(p -> p.teleport(Bukkit.getWorlds().get(0).getSpawnLocation()));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user