Add config option to always show Discord party

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
Tomas Slusny
2019-02-11 21:26:12 +01:00
parent 1dfc4b535a
commit 80535fad61
3 changed files with 15 additions and 3 deletions

View File

@@ -35,7 +35,7 @@ public interface DiscordConfig extends Config
keyName = "actionTimeout",
name = "Action timeout (minutes)",
description = "Configures after how long of not updating status will be reset (in minutes)",
position = 1
position = 0
)
default int actionTimeout()
{
@@ -46,13 +46,24 @@ public interface DiscordConfig extends Config
keyName = "hideElapsedTime",
name = "Hide elapsed time",
description = "Configures if the elapsed time of your activity should be hidden.",
position = 2
position = 1
)
default boolean hideElapsedTime()
{
return false;
}
@ConfigItem(
keyName = "alwaysShowParty",
name = "Always show party",
description = "Configures if the party counter should be always shown (this also makes party invites always work).",
position = 1
)
default boolean alwaysShowParty()
{
return false;
}
@ConfigItem(
keyName = "showSkillActivity",
name = "Show activity while skilling",

View File

@@ -179,6 +179,7 @@ public class DiscordPlugin extends Plugin
{
checkForGameStateUpdate();
checkForAreaUpdate();
updatePresence();
}
}

View File

@@ -93,7 +93,7 @@ class DiscordState
.startTimestamp(lastPresence.getStartTimestamp())
.smallImageKey(lastPresence.getSmallImageKey())
.partyMax(lastPresence.getPartyMax())
.partySize(party.getMembers().size());
.partySize(Math.max(config.alwaysShowParty() ? 1 : 0, party.getMembers().size()));
if (party.isOwner())
{