Makes the player count overlay only show up in PvP areas (#691)

* Makes the player counter overlay only show up in wilderness, pvp worlds,
or clan wars

Signed-off-by: PKLite <stonewall@pklite.xyz>

* Include deadman mode worlds

Signed-off-by: PKLite <stonewall@pklite.xyz>
This commit is contained in:
pklite
2019-06-21 23:24:00 -04:00
committed by Kyleeld
parent d0a43f0a98
commit b33852f28a
2 changed files with 35 additions and 11 deletions

View File

@@ -113,4 +113,14 @@ public enum WorldType
{
return worldTypes.stream().anyMatch(PVP_WORLD_TYPES::contains);
}
/**
* Checks to see if a collection of WorlTypes is a Deadman Mode World
* @param worldTypes The List of world types for a world
* @return true if it is deadman, false otherwise
*/
public static boolean isDeadmanWorld(final Collection<WorldType> worldTypes)
{
return worldTypes.stream().anyMatch(EnumSet.of(DEADMAN, DEADMAN_TOURNAMENT, SEASONAL_DEADMAN)::contains);
}
}