mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2025-02-16 12:21:30 +01:00
Better implementation of isWorldFinished() check
This commit is contained in:
parent
49f65fcf2e
commit
4e7ccef5be
@ -42,6 +42,7 @@ public abstract class AbstractDSign implements DungeonSign {
|
||||
private Sign sign;
|
||||
private String[] lines;
|
||||
private InstanceWorld instance;
|
||||
String worldName;
|
||||
private Set<Trigger> triggers = new HashSet<>();
|
||||
private boolean initialized;
|
||||
private boolean erroneous;
|
||||
@ -51,6 +52,7 @@ public abstract class AbstractDSign implements DungeonSign {
|
||||
this.sign = sign;
|
||||
this.lines = lines;
|
||||
this.instance = instance;
|
||||
worldName = instance.getWorld().getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -190,7 +190,7 @@ public abstract class Windup extends Deactivatable {
|
||||
* @return if the world is already finished
|
||||
*/
|
||||
public boolean isWorldFinished() {
|
||||
return api.getGameWorld(getSign().getWorld()) != null;
|
||||
return Bukkit.getWorld(worldName) == null;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user