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;
|
return PlayerNameLocation.ABOVE_HEAD;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* HERE
|
||||||
|
*/
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 12,
|
position = 12,
|
||||||
keyName = "drawMinimapNames",
|
keyName = "drawMinimapNames",
|
||||||
name = "Draw names on minimap",
|
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()
|
default boolean drawMinimapNames()
|
||||||
{
|
{
|
||||||
return false;
|
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(
|
@ConfigItem(
|
||||||
position = 13,
|
position = 13,
|
||||||
keyName = "colorPlayerMenu",
|
keyName = "colorPlayerMenu",
|
||||||
|
|||||||
@@ -62,7 +62,17 @@ public class PlayerIndicatorsMinimapOverlay extends Overlay
|
|||||||
@Override
|
@Override
|
||||||
public Dimension render(Graphics2D graphics)
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,6 +100,7 @@ public class PlayerIndicatorsMinimapOverlay extends Overlay
|
|||||||
}
|
}
|
||||||
if (plugin.isDrawMinimapNames())
|
if (plugin.isDrawMinimapNames())
|
||||||
{
|
{
|
||||||
|
|
||||||
if (actor.getSkullIcon() != null && plugin.isPlayerSkull() && actor.getSkullIcon() == SkullIcon.SKULL)
|
if (actor.getSkullIcon() != null && plugin.isPlayerSkull() && actor.getSkullIcon() == SkullIcon.SKULL)
|
||||||
{
|
{
|
||||||
int width = graphics.getFontMetrics().stringWidth(name);
|
int width = graphics.getFontMetrics().stringWidth(name);
|
||||||
|
|||||||
@@ -120,6 +120,10 @@ public class PlayerIndicatorsPlugin extends Plugin
|
|||||||
private PlayerNameLocation playerNamePosition;
|
private PlayerNameLocation playerNamePosition;
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private boolean drawMinimapNames;
|
private boolean drawMinimapNames;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private boolean drawFriendMinimapNames;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private boolean drawClanMinimapNames;
|
||||||
private boolean colorPlayerMenu;
|
private boolean colorPlayerMenu;
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private boolean showClanRanks;
|
private boolean showClanRanks;
|
||||||
@@ -407,6 +411,8 @@ public class PlayerIndicatorsPlugin extends Plugin
|
|||||||
this.drawTiles = config.drawTiles();
|
this.drawTiles = config.drawTiles();
|
||||||
this.playerNamePosition = config.playerNamePosition();
|
this.playerNamePosition = config.playerNamePosition();
|
||||||
this.drawMinimapNames = config.drawMinimapNames();
|
this.drawMinimapNames = config.drawMinimapNames();
|
||||||
|
this.drawFriendMinimapNames = config.drawFriendMinimapNames();
|
||||||
|
this.drawClanMinimapNames = config.drawClanMinimapNames();
|
||||||
this.colorPlayerMenu = config.colorPlayerMenu();
|
this.colorPlayerMenu = config.colorPlayerMenu();
|
||||||
this.showClanRanks = config.showClanRanks();
|
this.showClanRanks = config.showClanRanks();
|
||||||
this.highlightTargets = config.highlightTargets();
|
this.highlightTargets = config.highlightTargets();
|
||||||
|
|||||||
Reference in New Issue
Block a user