Add option to hide players on map that have invisibility potion effects

This commit is contained in:
Mike Primm 2013-01-03 21:58:58 -06:00
parent 3c01aff411
commit bd12420edd
2 changed files with 11 additions and 0 deletions

View File

@ -63,6 +63,7 @@ import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.PluginDescriptionFile;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.potion.PotionEffectType;
import org.dynmap.DynmapAPI;
import org.dynmap.DynmapChunk;
import org.dynmap.DynmapCore;
@ -608,6 +609,13 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
public long getFirstLoginTime() {
return offplayer.getFirstPlayed();
}
@Override
public boolean isInvisible() {
if(player != null) {
return player.hasPotionEffect(PotionEffectType.INVISIBILITY);
}
return false;
}
}
/* Handler for generic console command sender */
public class BukkitCommandSender implements DynmapCommandSender {

View File

@ -42,6 +42,8 @@ components:
hideifsneaking: false
# If true, player positions/status is protected (login with ID with dynmap.playermarkers.seeall permission required for info other than self)
protected-player-info: false
@ If true, hide players with invisibility potion effects active
hide-if-invisiblity-potion: true
#- class: org.dynmap.JsonFileClientUpdateComponent
# writeinterval: 1
# sendhealth: true
@ -62,6 +64,7 @@ components:
# webchat-permissions: false
# # Limit length of single chat messages
# chatlengthlimit: 256
# hide-if-invisiblity-potion: true
- class: org.dynmap.SimpleWebChatComponent
allowchat: true