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