player indicators: add config for recoloring menu and showing clan rank
This commit is contained in:
@@ -167,4 +167,26 @@ public interface PlayerIndicatorsConfig extends Config
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
position = 12,
|
||||||
|
keyName = "colorPlayerMenu",
|
||||||
|
name = "Color player menu",
|
||||||
|
description = "Color right click menu for players"
|
||||||
|
)
|
||||||
|
default boolean colorPlayerMenu()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
position = 13,
|
||||||
|
keyName = "clanMenuIcons",
|
||||||
|
name = "Show clan rank in menu",
|
||||||
|
description = "Add clan rank to right click menu for players"
|
||||||
|
)
|
||||||
|
default boolean clanMenuIcons()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ public class PlayerIndicatorsPlugin extends Plugin
|
|||||||
MenuEntry[] menuEntries = client.getMenuEntries();
|
MenuEntry[] menuEntries = client.getMenuEntries();
|
||||||
MenuEntry lastEntry = menuEntries[menuEntries.length - 1];
|
MenuEntry lastEntry = menuEntries[menuEntries.length - 1];
|
||||||
|
|
||||||
if (color != null)
|
if (color != null && config.colorPlayerMenu())
|
||||||
{
|
{
|
||||||
// strip out existing <col...
|
// strip out existing <col...
|
||||||
String target = lastEntry.getTarget();
|
String target = lastEntry.getTarget();
|
||||||
@@ -160,7 +160,7 @@ public class PlayerIndicatorsPlugin extends Plugin
|
|||||||
lastEntry.setTarget("<col=" + Integer.toHexString(color.getRGB() & 0xFFFFFF) + ">" + target);
|
lastEntry.setTarget("<col=" + Integer.toHexString(color.getRGB() & 0xFFFFFF) + ">" + target);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (image != -1)
|
if (image != -1 && config.clanMenuIcons())
|
||||||
{
|
{
|
||||||
lastEntry.setTarget("<img=" + image + ">" + lastEntry.getTarget());
|
lastEntry.setTarget("<img=" + image + ">" + lastEntry.getTarget());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user