xp globes: add option to show virtual level in tooltip

Co-authored-by: Adam <Adam@sigterm.info>
This commit is contained in:
wrightmalone
2020-12-19 20:21:52 -05:00
committed by Adam
parent d0bf05ddd9
commit 49138527f8
3 changed files with 190 additions and 9 deletions

View File

@@ -89,11 +89,22 @@ public interface XpGlobesConfig extends Config
return false;
}
@ConfigItem(
keyName = "showVirtualLevel",
name = "Show virtual level",
description = "Shows virtual level if over 99 in a skill and Hide maxed skill is not checked",
position = 5
)
default boolean showVirtualLevel()
{
return false;
}
@ConfigItem(
keyName = "enableCustomArcColor",
name = "Enable custom arc color",
description = "Enables the custom coloring of the globe's arc instead of using the skill's default color.",
position = 5
position = 6
)
default boolean enableCustomArcColor()
{
@@ -105,7 +116,7 @@ public interface XpGlobesConfig extends Config
keyName = "Progress arc color",
name = "Progress arc color",
description = "Change the color of the progress arc in the xp orb",
position = 6
position = 7
)
default Color progressArcColor()
{
@@ -117,7 +128,7 @@ public interface XpGlobesConfig extends Config
keyName = "Progress orb outline color",
name = "Progress orb outline color",
description = "Change the color of the progress orb outline",
position = 7
position = 8
)
default Color progressOrbOutLineColor()
{
@@ -129,7 +140,7 @@ public interface XpGlobesConfig extends Config
keyName = "Progress orb background color",
name = "Progress orb background color",
description = "Change the color of the progress orb background",
position = 8
position = 9
)
default Color progressOrbBackgroundColor()
{
@@ -140,7 +151,7 @@ public interface XpGlobesConfig extends Config
keyName = "Progress arc width",
name = "Progress arc width",
description = "Change the stroke width of the progress arc",
position = 9
position = 10
)
@Units(Units.PIXELS)
default int progressArcStrokeWidth()
@@ -152,7 +163,7 @@ public interface XpGlobesConfig extends Config
keyName = "Orb size",
name = "Size of orbs",
description = "Change the size of the xp orbs",
position = 10
position = 11
)
@Units(Units.PIXELS)
default int xpOrbSize()
@@ -164,7 +175,7 @@ public interface XpGlobesConfig extends Config
keyName = "Orb duration",
name = "Duration of orbs",
description = "Change the duration the xp orbs are visible",
position = 11
position = 12
)
@Units(Units.SECONDS)
default int xpOrbDuration()

View File

@@ -106,9 +106,17 @@ public class XpGlobesPlugin extends Plugin
return;
}
if (config.hideMaxed() && currentLevel >= Experience.MAX_REAL_LEVEL)
if (currentLevel >= Experience.MAX_REAL_LEVEL)
{
return;
if (config.hideMaxed())
{
return;
}
if (config.showVirtualLevel())
{
currentLevel = Experience.getLevelForXp(currentXp);
}
}
if (cachedGlobe != null)