mirror of
https://github.com/webbukkit/dynmap.git
synced 2025-02-17 20:31:37 +01:00
Fix hideifundercover on The End
This commit is contained in:
parent
4f5063155e
commit
d95213e7dd
@ -16,16 +16,20 @@ import org.dynmap.utils.MapChunkCache;
|
|||||||
public class BukkitWorld extends DynmapWorld {
|
public class BukkitWorld extends DynmapWorld {
|
||||||
private World world;
|
private World world;
|
||||||
private Permission perm;
|
private Permission perm;
|
||||||
|
private World.Environment env;
|
||||||
|
private boolean skylight;
|
||||||
|
|
||||||
public BukkitWorld(World w) {
|
public BukkitWorld(World w) {
|
||||||
super(w.getName(), w.getMaxHeight(), w.getSeaLevel());
|
super(w.getName(), w.getMaxHeight(), w.getSeaLevel());
|
||||||
world = w;
|
world = w;
|
||||||
|
env = world.getEnvironment();
|
||||||
|
skylight = (env == World.Environment.NORMAL);
|
||||||
perm = new Permission("dynmap.world." + getName(), "Dynmap access for world " + getName(), PermissionDefault.OP);
|
perm = new Permission("dynmap.world." + getName(), "Dynmap access for world " + getName(), PermissionDefault.OP);
|
||||||
}
|
}
|
||||||
/* Test if world is nether */
|
/* Test if world is nether */
|
||||||
@Override
|
@Override
|
||||||
public boolean isNether() {
|
public boolean isNether() {
|
||||||
return world.getEnvironment() == World.Environment.NETHER;
|
return env == World.Environment.NETHER;
|
||||||
}
|
}
|
||||||
/* Get world spawn location */
|
/* Get world spawn location */
|
||||||
@Override
|
@Override
|
||||||
@ -69,7 +73,7 @@ public class BukkitWorld extends DynmapWorld {
|
|||||||
/* Test if sky light level is requestable */
|
/* Test if sky light level is requestable */
|
||||||
@Override
|
@Override
|
||||||
public boolean canGetSkyLightLevel() {
|
public boolean canGetSkyLightLevel() {
|
||||||
return true;
|
return skylight;
|
||||||
}
|
}
|
||||||
/* Return sky light level */
|
/* Return sky light level */
|
||||||
@Override
|
@Override
|
||||||
@ -81,7 +85,7 @@ public class BukkitWorld extends DynmapWorld {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getEnvironment() {
|
public String getEnvironment() {
|
||||||
return world.getEnvironment().name().toLowerCase();
|
return env.name().toLowerCase();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Get map chunk cache for world
|
* Get map chunk cache for world
|
||||||
|
Loading…
Reference in New Issue
Block a user