PlayerIndicators: Added extra Minimap options.
This commit is contained in:
committed by
Ian W. ONeill
parent
3f9e902564
commit
07efe09994
@@ -165,17 +165,57 @@ public interface PlayerIndicatorsConfig extends Config
|
||||
return PlayerNameLocation.ABOVE_HEAD;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* HERE
|
||||
*/
|
||||
|
||||
@ConfigItem(
|
||||
position = 12,
|
||||
keyName = "drawMinimapNames",
|
||||
name = "Draw names on minimap",
|
||||
description = "Configures whether or not minimap names for players with rendered names should be drawn"
|
||||
description = "Configures whether or not minimap names for players with rendered names should be drawn",
|
||||
group = "Minimap"
|
||||
)
|
||||
default boolean drawMinimapNames()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 13,
|
||||
keyName = "drawFriendMinimapNames",
|
||||
name = "Draw Friendnames on minimap",
|
||||
description = "Configures whether or not minimap names for Friends with rendered names should be drawn",
|
||||
group = "Minimap",
|
||||
hidden = true,
|
||||
unhide = "drawMinimapNames"
|
||||
)
|
||||
default boolean drawFriendMinimapNames()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 14,
|
||||
keyName = "drawClanMinimapNames",
|
||||
name = "Draw clan Friend names on minimap",
|
||||
description = "Configures whether or not minimap names for Clan Members with rendered names should be drawn",
|
||||
group = "Minimap",
|
||||
hidden = true,
|
||||
unhide = "drawMinimapNames"
|
||||
)
|
||||
default boolean drawClanMinimapNames()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* To Here
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@ConfigItem(
|
||||
position = 13,
|
||||
keyName = "colorPlayerMenu",
|
||||
|
||||
@@ -62,7 +62,17 @@ public class PlayerIndicatorsMinimapOverlay extends Overlay
|
||||
@Override
|
||||
public Dimension render(Graphics2D graphics)
|
||||
{
|
||||
playerIndicatorsService.forEachPlayer((player, color) -> renderPlayerOverlay(graphics, player, color));
|
||||
playerIndicatorsService.forEachPlayer((player, color) -> {
|
||||
if (plugin.isDrawFriendMinimapNames() && !player.isFriend())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (plugin.isDrawClanMinimapNames() && !player.isClanMember())
|
||||
{
|
||||
return;
|
||||
}
|
||||
renderPlayerOverlay(graphics, player, color);
|
||||
});
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -90,6 +100,7 @@ public class PlayerIndicatorsMinimapOverlay extends Overlay
|
||||
}
|
||||
if (plugin.isDrawMinimapNames())
|
||||
{
|
||||
|
||||
if (actor.getSkullIcon() != null && plugin.isPlayerSkull() && actor.getSkullIcon() == SkullIcon.SKULL)
|
||||
{
|
||||
int width = graphics.getFontMetrics().stringWidth(name);
|
||||
|
||||
@@ -120,6 +120,10 @@ public class PlayerIndicatorsPlugin extends Plugin
|
||||
private PlayerNameLocation playerNamePosition;
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private boolean drawMinimapNames;
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private boolean drawFriendMinimapNames;
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private boolean drawClanMinimapNames;
|
||||
private boolean colorPlayerMenu;
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private boolean showClanRanks;
|
||||
@@ -407,6 +411,8 @@ public class PlayerIndicatorsPlugin extends Plugin
|
||||
this.drawTiles = config.drawTiles();
|
||||
this.playerNamePosition = config.playerNamePosition();
|
||||
this.drawMinimapNames = config.drawMinimapNames();
|
||||
this.drawFriendMinimapNames = config.drawFriendMinimapNames();
|
||||
this.drawClanMinimapNames = config.drawClanMinimapNames();
|
||||
this.colorPlayerMenu = config.colorPlayerMenu();
|
||||
this.showClanRanks = config.showClanRanks();
|
||||
this.highlightTargets = config.highlightTargets();
|
||||
|
||||
Reference in New Issue
Block a user