Add option to hide players on map that have invisibility potion effects
This commit is contained in:
parent
33f3a5f03f
commit
247901e765
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.PluginDescriptionFile;
|
||||||
import org.bukkit.plugin.PluginManager;
|
import org.bukkit.plugin.PluginManager;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
import org.bukkit.potion.PotionEffectType;
|
||||||
import org.dynmap.DynmapAPI;
|
import org.dynmap.DynmapAPI;
|
||||||
import org.dynmap.DynmapChunk;
|
import org.dynmap.DynmapChunk;
|
||||||
import org.dynmap.DynmapCore;
|
import org.dynmap.DynmapCore;
|
||||||
|
|
@ -608,6 +609,13 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||||
public long getFirstLoginTime() {
|
public long getFirstLoginTime() {
|
||||||
return offplayer.getFirstPlayed();
|
return offplayer.getFirstPlayed();
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public boolean isInvisible() {
|
||||||
|
if(player != null) {
|
||||||
|
return player.hasPotionEffect(PotionEffectType.INVISIBILITY);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* Handler for generic console command sender */
|
/* Handler for generic console command sender */
|
||||||
public class BukkitCommandSender implements DynmapCommandSender {
|
public class BukkitCommandSender implements DynmapCommandSender {
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,8 @@ components:
|
||||||
hideifsneaking: false
|
hideifsneaking: false
|
||||||
# If true, player positions/status is protected (login with ID with dynmap.playermarkers.seeall permission required for info other than self)
|
# 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
|
protected-player-info: false
|
||||||
|
@ If true, hide players with invisibility potion effects active
|
||||||
|
hide-if-invisiblity-potion: true
|
||||||
#- class: org.dynmap.JsonFileClientUpdateComponent
|
#- class: org.dynmap.JsonFileClientUpdateComponent
|
||||||
# writeinterval: 1
|
# writeinterval: 1
|
||||||
# sendhealth: true
|
# sendhealth: true
|
||||||
|
|
@ -62,6 +64,7 @@ components:
|
||||||
# webchat-permissions: false
|
# webchat-permissions: false
|
||||||
# # Limit length of single chat messages
|
# # Limit length of single chat messages
|
||||||
# chatlengthlimit: 256
|
# chatlengthlimit: 256
|
||||||
|
# hide-if-invisiblity-potion: true
|
||||||
|
|
||||||
- class: org.dynmap.SimpleWebChatComponent
|
- class: org.dynmap.SimpleWebChatComponent
|
||||||
allowchat: true
|
allowchat: true
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue