Merge pull request #2012 from oplosthee/playerindicator-toggle
Add toggle for drawing overhead player names to PlayerIndicators plugin
This commit is contained in:
@@ -159,6 +159,17 @@ public interface PlayerIndicatorsConfig extends Config
|
|||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 11,
|
position = 11,
|
||||||
|
keyName = "drawOverheadPlayerNames",
|
||||||
|
name = "Draw names above players",
|
||||||
|
description = "Configures whether or not player names should be drawn above players"
|
||||||
|
)
|
||||||
|
default boolean drawOverheadPlayerNames()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
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"
|
||||||
@@ -169,7 +180,7 @@ public interface PlayerIndicatorsConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 12,
|
position = 13,
|
||||||
keyName = "colorPlayerMenu",
|
keyName = "colorPlayerMenu",
|
||||||
name = "Color player menu",
|
name = "Color player menu",
|
||||||
description = "Color right click menu for players"
|
description = "Color right click menu for players"
|
||||||
@@ -180,7 +191,7 @@ public interface PlayerIndicatorsConfig extends Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 13,
|
position = 14,
|
||||||
keyName = "clanMenuIcons",
|
keyName = "clanMenuIcons",
|
||||||
name = "Show clan rank in menu",
|
name = "Show clan rank in menu",
|
||||||
description = "Add clan rank to right click menu for players"
|
description = "Add clan rank to right click menu for players"
|
||||||
|
|||||||
@@ -76,6 +76,11 @@ public class PlayerIndicatorsOverlay extends Overlay
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!config.drawOverheadPlayerNames())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
String name = actor.getName().replace('\u00A0', ' ');
|
String name = actor.getName().replace('\u00A0', ' ');
|
||||||
int offset = actor.getLogicalHeight() + 40;
|
int offset = actor.getLogicalHeight() + 40;
|
||||||
Point textLocation = actor.getCanvasTextLocation(graphics, name, offset);
|
Point textLocation = actor.getCanvasTextLocation(graphics, name, offset);
|
||||||
|
|||||||
Reference in New Issue
Block a user