implemented hideifspectator switch, still need to test fabric/forge
This commit is contained in:
parent
c093a95bc0
commit
030a0e1d24
23 changed files with 178 additions and 74 deletions
|
|
@ -102,7 +102,6 @@ import org.dynmap.common.chunk.GenericMapChunkCache;
|
|||
import org.dynmap.hdmap.HDMap;
|
||||
import org.dynmap.markers.MarkerAPI;
|
||||
import org.dynmap.modsupport.ModSupportImpl;
|
||||
import org.dynmap.renderer.DynmapBlockState;
|
||||
import org.dynmap.utils.MapChunkCache;
|
||||
import org.dynmap.utils.Polygon;
|
||||
import org.dynmap.utils.VisibilityLimit;
|
||||
|
|
@ -756,13 +755,18 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
|||
@Override
|
||||
public boolean isInvisible() {
|
||||
if(player != null) {
|
||||
if (player.getGameMode() == GameMode.SPECTATOR)
|
||||
return true;
|
||||
else return player.hasPotionEffect(PotionEffectType.INVISIBILITY);
|
||||
return player.hasPotionEffect(PotionEffectType.INVISIBILITY);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isSpectator() {
|
||||
if(player != null) {
|
||||
return player.getGameMode() == GameMode.SPECTATOR;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public int getSortWeight() {
|
||||
Integer wt = sortWeights.get(getName());
|
||||
if (wt != null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue