Merge common configs in Timers plugin
Merge all similar config options in Timers plugin to common groups. Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
@@ -43,74 +43,14 @@ public interface TimersConfig extends Config
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showAntipoison",
|
||||
name = "Antipoison timer",
|
||||
description = "Configures whether Antipoison timer is displayed"
|
||||
name = "Antipoison/Venom timers",
|
||||
description = "Configures whether timers for Antipoision, Antidoe, Antivenom are is displayed"
|
||||
)
|
||||
default boolean showAntiPoison()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showSuperantipoison",
|
||||
name = "Superantipoison timer",
|
||||
description = "Configures whether Superantipoison timer is displayed"
|
||||
)
|
||||
default boolean showSuperantipoison()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showAntidotePlus",
|
||||
name = "Antidote+ timer",
|
||||
description = "Configures whether antidote+ timer is displayed"
|
||||
)
|
||||
default boolean showAntidotePlus()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showAntidotePlusPlus",
|
||||
name = "Antidote++ timer",
|
||||
description = "Configures whether antidote++ timer is displayed"
|
||||
)
|
||||
default boolean showAntidotePlusPlus()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showSanfew",
|
||||
name = "Sanfew serum timer",
|
||||
description = "Configures whether sanfew serum timer is displayed"
|
||||
)
|
||||
default boolean showSanfew()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showAntiVenom",
|
||||
name = "Anti-venom timer",
|
||||
description = "Configures whether antivenom timer is displayed"
|
||||
)
|
||||
default boolean showAntiVenom()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showAntiVenomPlus",
|
||||
name = "Anti-venom+ timer",
|
||||
description = "Configures whether anti venom+ timer is displayed"
|
||||
)
|
||||
default boolean showAntiVenomPlus()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showAntiFire",
|
||||
name = "Antifire timer",
|
||||
@@ -121,36 +61,6 @@ public interface TimersConfig extends Config
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showExAntiFire",
|
||||
name = "Extended antifire timer",
|
||||
description = "Configures whether extended antifire timer is displayed"
|
||||
)
|
||||
default boolean showExAntiFire()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showSuperAntiFire",
|
||||
name = "Super antifire timer",
|
||||
description = "Configures whether super antifire timer is displayed"
|
||||
)
|
||||
default boolean showSuperAntiFire()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showExSuperAntifire",
|
||||
name = "Extended super antifire timer",
|
||||
description = "Configures whether extended super antifire timer is displayed"
|
||||
)
|
||||
default boolean showExSuperAntifire()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showStamina",
|
||||
name = "Stamina timer",
|
||||
@@ -224,23 +134,13 @@ public interface TimersConfig extends Config
|
||||
@ConfigItem(
|
||||
keyName = "showVengeance",
|
||||
name = "Vengeance timer",
|
||||
description = "Configures whether vengeance timer is displayed"
|
||||
description = "Configures whether vengeance and vengeance other timer is displayed"
|
||||
)
|
||||
default boolean showVengeance()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showVengeanceOther",
|
||||
name = "Vengeance Other timer",
|
||||
description = "Configures whether vengeance other timer is displayed"
|
||||
)
|
||||
default boolean showVengeanceOther()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showTeleblock",
|
||||
name = "Teleblock timer",
|
||||
@@ -283,7 +183,7 @@ public interface TimersConfig extends Config
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showAbyssalSireStun",
|
||||
name = "Abyssal Sire Stun Timer",
|
||||
name = "Abyssal Sire stun Timer",
|
||||
description = "Configures whether Abyssal Sire stun timer is displayed"
|
||||
)
|
||||
default boolean showAbyssalSireStun()
|
||||
|
||||
@@ -198,43 +198,19 @@ public class TimersPlugin extends Plugin
|
||||
removeGameTimer(MINIGAME_TELEPORT);
|
||||
}
|
||||
|
||||
if (!config.showAntidotePlus())
|
||||
if (!config.showAntiPoison())
|
||||
{
|
||||
removeGameTimer(ANTIDOTEPLUS);
|
||||
}
|
||||
|
||||
if (!config.showAntidotePlusPlus())
|
||||
{
|
||||
removeGameTimer(ANTIDOTEPLUSPLUS);
|
||||
}
|
||||
|
||||
if (!config.showSanfew())
|
||||
{
|
||||
removeGameTimer(SANFEW);
|
||||
}
|
||||
|
||||
if (!config.showAntiVenom())
|
||||
{
|
||||
removeGameTimer(ANTIVENOM);
|
||||
}
|
||||
|
||||
if (!config.showAntiVenomPlus())
|
||||
{
|
||||
removeGameTimer(ANTIVENOMPLUS);
|
||||
}
|
||||
|
||||
if (!config.showAntiFire())
|
||||
{
|
||||
removeGameTimer(ANTIFIRE);
|
||||
}
|
||||
|
||||
if (!config.showExAntiFire())
|
||||
{
|
||||
removeGameTimer(EXANTIFIRE);
|
||||
}
|
||||
|
||||
if (!config.showSuperAntiFire())
|
||||
{
|
||||
removeGameTimer(SUPERANTIFIRE);
|
||||
}
|
||||
|
||||
@@ -282,10 +258,6 @@ public class TimersPlugin extends Plugin
|
||||
if (!config.showVengeance())
|
||||
{
|
||||
removeGameTimer(VENGEANCE);
|
||||
}
|
||||
|
||||
if (!config.showVengeanceOther())
|
||||
{
|
||||
removeGameTimer(VENGEANCEOTHER);
|
||||
}
|
||||
|
||||
@@ -312,7 +284,7 @@ public class TimersPlugin extends Plugin
|
||||
@Subscribe
|
||||
public void onMenuOptionClicked(MenuOptionClicked event)
|
||||
{
|
||||
if (config.showAntidotePlusPlus()
|
||||
if (config.showAntiPoison()
|
||||
&& event.getMenuOption().contains("Drink")
|
||||
&& (event.getId() == ItemID.ANTIDOTE1_5958
|
||||
|| event.getId() == ItemID.ANTIDOTE2_5956
|
||||
@@ -324,7 +296,7 @@ public class TimersPlugin extends Plugin
|
||||
return;
|
||||
}
|
||||
|
||||
if (config.showAntidotePlus()
|
||||
if (config.showAntiPoison()
|
||||
&& event.getMenuOption().contains("Drink")
|
||||
&& (event.getId() == ItemID.ANTIDOTE1
|
||||
|| event.getId() == ItemID.ANTIDOTE2
|
||||
@@ -347,7 +319,7 @@ public class TimersPlugin extends Plugin
|
||||
return;
|
||||
}
|
||||
|
||||
if (config.showSuperantipoison()
|
||||
if (config.showAntiPoison()
|
||||
&& event.getMenuOption().contains("Drink")
|
||||
&& (event.getId() == ItemID.SUPERANTIPOISON1
|
||||
|| event.getId() == ItemID.SUPERANTIPOISON2
|
||||
@@ -389,7 +361,7 @@ public class TimersPlugin extends Plugin
|
||||
createGameTimer(STAMINA);
|
||||
}
|
||||
|
||||
if (event.getMessage().equals(STAMINA_EXPIRED_MESSAGE))
|
||||
if (config.showStamina() && event.getMessage().equals(STAMINA_EXPIRED_MESSAGE))
|
||||
{
|
||||
removeGameTimer(STAMINA);
|
||||
}
|
||||
@@ -399,7 +371,7 @@ public class TimersPlugin extends Plugin
|
||||
createGameTimer(ANTIFIRE);
|
||||
}
|
||||
|
||||
if (config.showExAntiFire() && event.getMessage().equals(EXTENDED_ANTIFIRE_DRINK_MESSAGE))
|
||||
if (config.showAntiFire() && event.getMessage().equals(EXTENDED_ANTIFIRE_DRINK_MESSAGE))
|
||||
{
|
||||
createGameTimer(EXANTIFIRE);
|
||||
}
|
||||
@@ -409,12 +381,12 @@ public class TimersPlugin extends Plugin
|
||||
createGameTimer(GOD_WARS_ALTAR);
|
||||
}
|
||||
|
||||
if (config.showExSuperAntifire() && event.getMessage().equals(EXTENDED_SUPER_ANTIFIRE_DRINK_MESSAGE))
|
||||
if (config.showAntiFire() && event.getMessage().equals(EXTENDED_SUPER_ANTIFIRE_DRINK_MESSAGE))
|
||||
{
|
||||
createGameTimer(EXSUPERANTIFIRE);
|
||||
}
|
||||
|
||||
if (event.getMessage().equals(ANTIFIRE_EXPIRED_MESSAGE))
|
||||
if (config.showAntiFire() && event.getMessage().equals(ANTIFIRE_EXPIRED_MESSAGE))
|
||||
{
|
||||
//they have the same expired message
|
||||
removeGameTimer(ANTIFIRE);
|
||||
@@ -439,12 +411,12 @@ public class TimersPlugin extends Plugin
|
||||
createGameTimer(CANNON);
|
||||
}
|
||||
|
||||
if (event.getMessage().equals(CANNON_PICKUP_MESSAGE))
|
||||
if (config.showCannon() && event.getMessage().equals(CANNON_PICKUP_MESSAGE))
|
||||
{
|
||||
removeGameTimer(CANNON);
|
||||
}
|
||||
|
||||
if (config.showAntiVenomPlus() && event.getMessage().contains(SUPER_ANTIVENOM_DRINK_MESSAGE))
|
||||
if (config.showAntiPoison() && event.getMessage().contains(SUPER_ANTIVENOM_DRINK_MESSAGE))
|
||||
{
|
||||
createGameTimer(ANTIVENOMPLUS);
|
||||
}
|
||||
@@ -481,27 +453,27 @@ public class TimersPlugin extends Plugin
|
||||
createGameTimer(DMM_HALFTB);
|
||||
}
|
||||
|
||||
if (config.showSuperAntiFire() && event.getMessage().contains(SUPER_ANTIFIRE_DRINK_MESSAGE))
|
||||
if (config.showAntiFire() && event.getMessage().contains(SUPER_ANTIFIRE_DRINK_MESSAGE))
|
||||
{
|
||||
createGameTimer(SUPERANTIFIRE);
|
||||
}
|
||||
|
||||
if (event.getMessage().equals(SUPER_ANTIFIRE_EXPIRED_MESSAGE))
|
||||
if (config.showAntiFire() && event.getMessage().equals(SUPER_ANTIFIRE_EXPIRED_MESSAGE))
|
||||
{
|
||||
removeGameTimer(SUPERANTIFIRE);
|
||||
}
|
||||
|
||||
if (event.getMessage().equals(IMBUED_HEART_READY_MESSAGE))
|
||||
if (config.showImbuedHeart() && event.getMessage().equals(IMBUED_HEART_READY_MESSAGE))
|
||||
{
|
||||
removeGameTimer(IMBUEDHEART);
|
||||
}
|
||||
|
||||
if (config.showAntiVenom() && event.getMessage().contains(ANTIVENOM_DRINK_MESSAGE))
|
||||
if (config.showAntiPoison() && event.getMessage().contains(ANTIVENOM_DRINK_MESSAGE))
|
||||
{
|
||||
createGameTimer(ANTIVENOM);
|
||||
}
|
||||
|
||||
if (config.showSanfew() && event.getMessage().contains(SANFEW_SERUM_DRINK_MESSAGE))
|
||||
if (config.showAntiPoison() && event.getMessage().contains(SANFEW_SERUM_DRINK_MESSAGE))
|
||||
{
|
||||
createGameTimer(SANFEW);
|
||||
}
|
||||
@@ -625,7 +597,7 @@ public class TimersPlugin extends Plugin
|
||||
return;
|
||||
}
|
||||
|
||||
if (config.showVengeanceOther()
|
||||
if (config.showVengeance()
|
||||
&& actor.getAnimation() == AnimationID.ENERGY_TRANSFER_VENGEANCE_OTHER
|
||||
&& actor.getInteracting().getGraphic() == VENGEANCEOTHER.getGraphicId())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user