Add option to hide players on map that have invisibility potion effects
This commit is contained in:
parent
3c01aff411
commit
bd12420edd
2 changed files with 11 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue