test_class.declarator: CHECK = "Your dodgy necklace has 10 charges left."
test_class.modifier: private static final
test_class.original_string: private static final String CHECK = "Your dodgy necklace has 10 charges left.";
test_class.type: String
test_class.var_name: CHECK
test_class.declarator: PROTECT = "Your dodgy necklace protects you. It has 9 charges left."
test_class.modifier: private static final
test_class.original_string: private static final String PROTECT = "Your dodgy necklace protects you. It has 9 charges left.";
test_class.type: String
test_class.var_name: PROTECT
test_class.declarator: PROTECT_1 = "Your dodgy necklace protects you. <col=ff0000>It has 1 charge left.</col>"
test_class.modifier: private static final
test_class.original_string: private static final String PROTECT_1 = "Your dodgy necklace protects you. <col=ff0000>It has 1 charge left.</col>";
test_class.type: String
test_class.var_name: PROTECT_1
test_class.declarator: BREAK = "Your dodgy necklace protects you. <col=ff0000>It then crumbles to dust.</col>"
test_class.modifier: private static final
test_class.original_string: private static final String BREAK = "Your dodgy necklace protects you. <col=ff0000>It then crumbles to dust.</col>";
test_class.type: String
test_class.var_name: BREAK
test_class.declarator: CHECK_RING_OF_FORGING_FULL = "You can smelt 140 more pieces of iron ore before a ring melts."
test_class.modifier: private static final
test_class.original_string: private static final String CHECK_RING_OF_FORGING_FULL = "You can smelt 140 more pieces of iron ore before a ring melts.";
test_class.type: String
test_class.var_name: CHECK_RING_OF_FORGING_FULL
test_class.declarator: CHECK_RING_OF_FORGING_ONE = "You can smelt one more piece of iron ore before a ring melts."
test_class.modifier: private static final
test_class.original_string: private static final String CHECK_RING_OF_FORGING_ONE = "You can smelt one more piece of iron ore before a ring melts.";
test_class.type: String
test_class.var_name: CHECK_RING_OF_FORGING_ONE
test_class.declarator: USED_RING_OF_FORGING = "You retrieve a bar of iron."
test_class.modifier: private static final
test_class.original_string: private static final String USED_RING_OF_FORGING = "You retrieve a bar of iron.";
test_class.type: String
test_class.var_name: USED_RING_OF_FORGING
test_class.declarator: BREAK_RING_OF_FORGING = "<col=7f007f>Your Ring of Forging has melted.</col>"
test_class.modifier: private static final
test_class.original_string: private static final String BREAK_RING_OF_FORGING = "<col=7f007f>Your Ring of Forging has melted.</col>";
test_class.type: String
test_class.var_name: BREAK_RING_OF_FORGING
test_class.declarator: CHECK_AMULET_OF_CHEMISTRY = "Your amulet of chemistry has 5 charges left."
test_class.modifier: private static final
test_class.original_string: private static final String CHECK_AMULET_OF_CHEMISTRY = "Your amulet of chemistry has 5 charges left.";
test_class.type: String
test_class.var_name: CHECK_AMULET_OF_CHEMISTRY
test_class.declarator: CHECK_AMULET_OF_CHEMISTRY_1 = "Your amulet of chemistry has 1 charge left."
test_class.modifier: private static final
test_class.original_string: private static final String CHECK_AMULET_OF_CHEMISTRY_1 = "Your amulet of chemistry has 1 charge left.";
test_class.type: String
test_class.var_name: CHECK_AMULET_OF_CHEMISTRY_1
test_class.declarator: USED_AMULET_OF_CHEMISTRY = "Your amulet of chemistry helps you create a 4-dose potion. It has 4 charges left."
test_class.modifier: private static final
test_class.original_string: private static final String USED_AMULET_OF_CHEMISTRY = "Your amulet of chemistry helps you create a 4-dose potion. It has 4 charges left.";
test_class.type: String
test_class.var_name: USED_AMULET_OF_CHEMISTRY
test_class.declarator: USED_AMULET_OF_CHEMISTRY_3_DOSES = "Your amulet of chemistry helps you create a 3-dose potion. It has 2 charges left."
test_class.modifier: private static final
test_class.original_string: private static final String USED_AMULET_OF_CHEMISTRY_3_DOSES = "Your amulet of chemistry helps you create a 3-dose potion. It has 2 charges left.";
test_class.type: String
test_class.var_name: USED_AMULET_OF_CHEMISTRY_3_DOSES
test_class.declarator: USED_AMULET_OF_CHEMISTRY_2_DOSES = "Your amulet of chemistry helps you create a 2-dose potion. It has one charge left."
test_class.modifier: private static final
test_class.original_string: private static final String USED_AMULET_OF_CHEMISTRY_2_DOSES = "Your amulet of chemistry helps you create a 2-dose potion. It has one charge left.";
test_class.type: String
test_class.var_name: USED_AMULET_OF_CHEMISTRY_2_DOSES
test_class.declarator: BREAK_AMULET_OF_CHEMISTRY = "Your amulet of chemistry helps you create a 4-dose potion. It then crumbles to dust."
test_class.modifier: private static final
test_class.original_string: private static final String BREAK_AMULET_OF_CHEMISTRY = "Your amulet of chemistry helps you create a 4-dose potion. It then crumbles to dust.";
test_class.type: String
test_class.var_name: BREAK_AMULET_OF_CHEMISTRY
test_class.declarator: BREAK_AMULET_OF_CHEMISTRY_3_DOSES = "Your amulet of chemistry helps you create a 3-dose potion. It then crumbles to dust."
test_class.modifier: private static final
test_class.original_string: private static final String BREAK_AMULET_OF_CHEMISTRY_3_DOSES = "Your amulet of chemistry helps you create a 3-dose potion. It then crumbles to dust.";
test_class.type: String
test_class.var_name: BREAK_AMULET_OF_CHEMISTRY_3_DOSES
test_class.declarator: BREAK_AMULET_OF_CHEMISTRY_2_DOSES = "Your amulet of chemistry helps you create a 2-dose potion. It then crumbles to dust."
test_class.modifier: private static final
test_class.original_string: private static final String BREAK_AMULET_OF_CHEMISTRY_2_DOSES = "Your amulet of chemistry helps you create a 2-dose potion. It then crumbles to dust.";
test_class.type: String
test_class.var_name: BREAK_AMULET_OF_CHEMISTRY_2_DOSES
test_class.declarator: client
test_class.modifier: @Mock
  	@Bind
  	private
test_class.original_string: @Mock
  	@Bind
  	private Client client;
test_class.type: Client
test_class.var_name: client
test_class.declarator: scheduledExecutorService
test_class.modifier: @Mock
  	@Bind
  	private
test_class.original_string: @Mock
  	@Bind
  	private ScheduledExecutorService scheduledExecutorService;
test_class.type: ScheduledExecutorService
test_class.var_name: scheduledExecutorService
test_class.declarator: runeLiteConfig
test_class.modifier: @Mock
  	@Bind
  	private
test_class.original_string: @Mock
  	@Bind
  	private RuneLiteConfig runeLiteConfig;
test_class.type: RuneLiteConfig
test_class.var_name: runeLiteConfig
test_class.declarator: overlayManager
test_class.modifier: @Mock
  	@Bind
  	private
test_class.original_string: @Mock
  	@Bind
  	private OverlayManager overlayManager;
test_class.type: OverlayManager
test_class.var_name: overlayManager
test_class.declarator: notifier
test_class.modifier: @Mock
  	@Bind
  	private
test_class.original_string: @Mock
  	@Bind
  	private Notifier notifier;
test_class.type: Notifier
test_class.var_name: notifier
test_class.declarator: infoBoxManager
test_class.modifier: @Mock
  	@Bind
  	private
test_class.original_string: @Mock
  	@Bind
  	private InfoBoxManager infoBoxManager;
test_class.type: InfoBoxManager
test_class.var_name: infoBoxManager
test_class.declarator: config
test_class.modifier: @Mock
  	@Bind
  	private
test_class.original_string: @Mock
  	@Bind
  	private ItemChargeConfig config;
test_class.type: ItemChargeConfig
test_class.var_name: config
test_class.declarator: itemChargePlugin
test_class.modifier: @Inject
  	private
test_class.original_string: @Inject
  	private ItemChargePlugin itemChargePlugin;
test_class.type: ItemChargePlugin
test_class.var_name: itemChargePlugin
test_class.file: runelite-client/src/test/java/net/runelite/client/plugins/itemcharges/ItemChargePluginTest.java
test_class.identifier: ItemChargePluginTest
test_case.body: @Test
  	public void testOnChatMessage()
  	{
  		ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", CHECK, "", 0);
  		itemChargePlugin.onChatMessage(chatMessage);
  		verify(config).dodgyNecklace(eq(10));
  		reset(config);
  
  		chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", PROTECT, "", 0);
  		itemChargePlugin.onChatMessage(chatMessage);
  		verify(config).dodgyNecklace(eq(9));
  		reset(config);
  
  		chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", PROTECT_1, "", 0);
  		itemChargePlugin.onChatMessage(chatMessage);
  		verify(config).dodgyNecklace(eq(1));
  		reset(config);
  
  		chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", BREAK, "", 0);
  		itemChargePlugin.onChatMessage(chatMessage);
  		verify(config).dodgyNecklace(eq(10));
  		reset(config);
  
  		chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", CHECK_RING_OF_FORGING_ONE, "", 0);
  		itemChargePlugin.onChatMessage(chatMessage);
  		verify(config).ringOfForging(eq(1));
  		reset(config);
  
  		chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", CHECK_RING_OF_FORGING_FULL, "", 0);
  		itemChargePlugin.onChatMessage(chatMessage);
  		verify(config).ringOfForging(eq(140));
  		reset(config);
  
  		when(config.ringOfForging()).thenReturn(90);
  		// Create equipment inventory with ring of forging
  		ItemContainer equipmentItemContainer = mock(ItemContainer.class);
  		when(client.getItemContainer(eq(InventoryID.EQUIPMENT))).thenReturn(equipmentItemContainer);
  		when(equipmentItemContainer.contains(ItemID.RING_OF_FORGING)).thenReturn(true);
  		// Run message
  		chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", USED_RING_OF_FORGING, "", 0);
  		itemChargePlugin.onChatMessage(chatMessage);
  		verify(config).ringOfForging(eq(89));
  		reset(config);
  
  		chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", BREAK_RING_OF_FORGING, "", 0);
  		itemChargePlugin.onChatMessage(chatMessage);
  		verify(config).ringOfForging(eq(140));
  		reset(config);
  
  		chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", CHECK_AMULET_OF_CHEMISTRY, "", 0);
  		itemChargePlugin.onChatMessage(chatMessage);
  		verify(config).amuletOfChemistry(eq(5));
  		reset(config);
  
  		chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", CHECK_AMULET_OF_CHEMISTRY_1, "", 0);
  		itemChargePlugin.onChatMessage(chatMessage);
  		verify(config).amuletOfChemistry(eq(1));
  		reset(config);
  
  		chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", USED_AMULET_OF_CHEMISTRY, "", 0);
  		itemChargePlugin.onChatMessage(chatMessage);
  		verify(config).amuletOfChemistry(eq(4));
  		reset(config);
  
  		chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", USED_AMULET_OF_CHEMISTRY_3_DOSES, "", 0);
  		itemChargePlugin.onChatMessage(chatMessage);
  		verify(config).amuletOfChemistry(eq(2));
  		reset(config);
  
  		chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", USED_AMULET_OF_CHEMISTRY_2_DOSES, "", 0);
  		itemChargePlugin.onChatMessage(chatMessage);
  		verify(config).amuletOfChemistry(eq(1));
  		reset(config);
  
  		chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", BREAK_AMULET_OF_CHEMISTRY, "", 0);
  		itemChargePlugin.onChatMessage(chatMessage);
  		verify(config).amuletOfChemistry(eq(5));
  		reset(config);
  
  		chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", BREAK_AMULET_OF_CHEMISTRY_3_DOSES, "", 0);
  		itemChargePlugin.onChatMessage(chatMessage);
  		verify(config).amuletOfChemistry(eq(5));
  		reset(config);
  
  		chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", BREAK_AMULET_OF_CHEMISTRY_2_DOSES, "", 0);
  		itemChargePlugin.onChatMessage(chatMessage);
  		verify(config).amuletOfChemistry(eq(5));
  		reset(config);
  
  	}
test_case.class_method_signature: ItemChargePluginTest.testOnChatMessage()
test_case.full_signature: @Test public void testOnChatMessage()
test_case.identifier: testOnChatMessage
test_case.invocations: onChatMessage dodgyNecklace verify eq reset onChatMessage dodgyNecklace verify eq reset onChatMessage dodgyNecklace verify eq reset onChatMessage dodgyNecklace verify eq reset onChatMessage ringOfForging verify eq reset onChatMessage ringOfForging verify eq reset thenReturn when ringOfForging mock thenReturn when getItemContainer eq thenReturn when contains onChatMessage ringOfForging verify eq reset onChatMessage ringOfForging verify eq reset onChatMessage amuletOfChemistry verify eq reset onChatMessage amuletOfChemistry verify eq reset onChatMessage amuletOfChemistry verify eq reset onChatMessage amuletOfChemistry verify eq reset onChatMessage amuletOfChemistry verify eq reset onChatMessage amuletOfChemistry verify eq reset onChatMessage amuletOfChemistry verify eq reset onChatMessage amuletOfChemistry verify eq reset
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testOnChatMessage()
focal_class.declarator: DODGY_CHECK_PATTERN = Pattern.compile(
  		"Your dodgy necklace has (\\d+) charges? left\\.")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern DODGY_CHECK_PATTERN = Pattern.compile(
  		"Your dodgy necklace has (\\d+) charges? left\\.");
focal_class.type: Pattern
focal_class.var_name: DODGY_CHECK_PATTERN
focal_class.declarator: DODGY_PROTECT_PATTERN = Pattern.compile(
  		"Your dodgy necklace protects you\\..*It has (\\d+) charges? left\\.")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern DODGY_PROTECT_PATTERN = Pattern.compile(
  		"Your dodgy necklace protects you\\..*It has (\\d+) charges? left\\.");
focal_class.type: Pattern
focal_class.var_name: DODGY_PROTECT_PATTERN
focal_class.declarator: DODGY_BREAK_PATTERN = Pattern.compile(
  		"Your dodgy necklace protects you\\..*It then crumbles to dust\\.")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern DODGY_BREAK_PATTERN = Pattern.compile(
  		"Your dodgy necklace protects you\\..*It then crumbles to dust\\.");
focal_class.type: Pattern
focal_class.var_name: DODGY_BREAK_PATTERN
focal_class.declarator: RING_OF_RECOIL_BREAK_MESSAGE = "<col=7f007f>Your Ring of Recoil has shattered.</col>"
focal_class.modifier: private static final
focal_class.original_string: private static final String RING_OF_RECOIL_BREAK_MESSAGE = "<col=7f007f>Your Ring of Recoil has shattered.</col>";
focal_class.type: String
focal_class.var_name: RING_OF_RECOIL_BREAK_MESSAGE
focal_class.declarator: BINDING_CHECK_PATTERN = Pattern.compile(
  		"You have ([0-9]+|one) charges? left before your Binding necklace disintegrates\\.")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern BINDING_CHECK_PATTERN = Pattern.compile(
  		"You have ([0-9]+|one) charges? left before your Binding necklace disintegrates\\.");
focal_class.type: Pattern
focal_class.var_name: BINDING_CHECK_PATTERN
focal_class.declarator: BINDING_USED_PATTERN = Pattern.compile(
  		"You bind the temple's power into (mud|lava|steam|dust|smoke|mist) runes\\.")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern BINDING_USED_PATTERN = Pattern.compile(
  		"You bind the temple's power into (mud|lava|steam|dust|smoke|mist) runes\\.");
focal_class.type: Pattern
focal_class.var_name: BINDING_USED_PATTERN
focal_class.declarator: BINDING_BREAK_TEXT = "Your Binding necklace has disintegrated."
focal_class.modifier: private static final
focal_class.original_string: private static final String BINDING_BREAK_TEXT = "Your Binding necklace has disintegrated.";
focal_class.type: String
focal_class.var_name: BINDING_BREAK_TEXT
focal_class.declarator: RING_OF_FORGING_CHECK_PATTERN = Pattern.compile(
  		"You can smelt ([0-9]+|one) more pieces? of iron ore before a ring melts\\.")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern RING_OF_FORGING_CHECK_PATTERN = Pattern.compile(
  		"You can smelt ([0-9]+|one) more pieces? of iron ore before a ring melts\\.");
focal_class.type: Pattern
focal_class.var_name: RING_OF_FORGING_CHECK_PATTERN
focal_class.declarator: RING_OF_FORGING_USED_TEXT = "You retrieve a bar of iron."
focal_class.modifier: private static final
focal_class.original_string: private static final String RING_OF_FORGING_USED_TEXT = "You retrieve a bar of iron.";
focal_class.type: String
focal_class.var_name: RING_OF_FORGING_USED_TEXT
focal_class.declarator: RING_OF_FORGING_BREAK_TEXT = "<col=7f007f>Your Ring of Forging has melted.</col>"
focal_class.modifier: private static final
focal_class.original_string: private static final String RING_OF_FORGING_BREAK_TEXT = "<col=7f007f>Your Ring of Forging has melted.</col>";
focal_class.type: String
focal_class.var_name: RING_OF_FORGING_BREAK_TEXT
focal_class.declarator: AMULET_OF_CHEMISTRY_CHECK_PATTERN = Pattern.compile(
  		"Your amulet of chemistry has (\\d) charges? left\\."
  	)
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern AMULET_OF_CHEMISTRY_CHECK_PATTERN = Pattern.compile(
  		"Your amulet of chemistry has (\\d) charges? left\\."
  	);
focal_class.type: Pattern
focal_class.var_name: AMULET_OF_CHEMISTRY_CHECK_PATTERN
focal_class.declarator: AMULET_OF_CHEMISTRY_USED_PATTERN = Pattern.compile(
  		"Your amulet of chemistry helps you create a \\d-dose potion\\. (?:<col=ff0000>)?It has (\\d|one) charges? left\\."
  	)
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern AMULET_OF_CHEMISTRY_USED_PATTERN = Pattern.compile(
  		"Your amulet of chemistry helps you create a \\d-dose potion\\. (?:<col=ff0000>)?It has (\\d|one) charges? left\\."
  	);
focal_class.type: Pattern
focal_class.var_name: AMULET_OF_CHEMISTRY_USED_PATTERN
focal_class.declarator: AMULET_OF_CHEMISTRY_BREAK_PATTERN = Pattern.compile(
  		"Your amulet of chemistry helps you create a \\d-dose potion\\. (?:<col=ff0000>)?It then crumbles to dust\\."
  	)
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern AMULET_OF_CHEMISTRY_BREAK_PATTERN = Pattern.compile(
  		"Your amulet of chemistry helps you create a \\d-dose potion\\. (?:<col=ff0000>)?It then crumbles to dust\\."
  	);
focal_class.type: Pattern
focal_class.var_name: AMULET_OF_CHEMISTRY_BREAK_PATTERN
focal_class.declarator: AMULET_OF_BOUNTY_CHECK_PATTERN = Pattern.compile(
  		"Your amulet of bounty has (\\d+) charges? left\\."
  	)
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern AMULET_OF_BOUNTY_CHECK_PATTERN = Pattern.compile(
  		"Your amulet of bounty has (\\d+) charges? left\\."
  	);
focal_class.type: Pattern
focal_class.var_name: AMULET_OF_BOUNTY_CHECK_PATTERN
focal_class.declarator: AMULET_OF_BOUNTY_USED_PATTERN = Pattern.compile(
  		"Your amulet of bounty saves some seeds for you\\. (?:<col=ff0000>)?It has (\\d) charges? left\\."
  	)
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern AMULET_OF_BOUNTY_USED_PATTERN = Pattern.compile(
  		"Your amulet of bounty saves some seeds for you\\. (?:<col=ff0000>)?It has (\\d) charges? left\\."
  	);
focal_class.type: Pattern
focal_class.var_name: AMULET_OF_BOUNTY_USED_PATTERN
focal_class.declarator: AMULET_OF_BOUNTY_BREAK_TEXT = "Your amulet of bounty saves some seeds for you. <col=ff0000>It then crumbles to dust.</col>"
focal_class.modifier: private static final
focal_class.original_string: private static final String AMULET_OF_BOUNTY_BREAK_TEXT = "Your amulet of bounty saves some seeds for you. <col=ff0000>It then crumbles to dust.</col>";
focal_class.type: String
focal_class.var_name: AMULET_OF_BOUNTY_BREAK_TEXT
focal_class.declarator: MAX_DODGY_CHARGES = 10
focal_class.modifier: private static final
focal_class.original_string: private static final int MAX_DODGY_CHARGES = 10;
focal_class.type: int
focal_class.var_name: MAX_DODGY_CHARGES
focal_class.declarator: MAX_BINDING_CHARGES = 16
focal_class.modifier: private static final
focal_class.original_string: private static final int MAX_BINDING_CHARGES = 16;
focal_class.type: int
focal_class.var_name: MAX_BINDING_CHARGES
focal_class.declarator: MAX_EXPLORER_RING_CHARGES = 30
focal_class.modifier: private static final
focal_class.original_string: private static final int MAX_EXPLORER_RING_CHARGES = 30;
focal_class.type: int
focal_class.var_name: MAX_EXPLORER_RING_CHARGES
focal_class.declarator: MAX_RING_OF_FORGING_CHARGES = 140
focal_class.modifier: private static final
focal_class.original_string: private static final int MAX_RING_OF_FORGING_CHARGES = 140;
focal_class.type: int
focal_class.var_name: MAX_RING_OF_FORGING_CHARGES
focal_class.declarator: MAX_AMULET_OF_CHEMISTRY_CHARGES = 5
focal_class.modifier: private static final
focal_class.original_string: private static final int MAX_AMULET_OF_CHEMISTRY_CHARGES = 5;
focal_class.type: int
focal_class.var_name: MAX_AMULET_OF_CHEMISTRY_CHARGES
focal_class.declarator: MAX_AMULET_OF_BOUNTY_CHARGES = 10
focal_class.modifier: private static final
focal_class.original_string: private static final int MAX_AMULET_OF_BOUNTY_CHARGES = 10;
focal_class.type: int
focal_class.var_name: MAX_AMULET_OF_BOUNTY_CHARGES
focal_class.declarator: lastExplorerRingCharge = -1
focal_class.modifier: private
focal_class.original_string: private int lastExplorerRingCharge = -1;
focal_class.type: int
focal_class.var_name: lastExplorerRingCharge
focal_class.declarator: client
focal_class.modifier: @Inject
  	private
focal_class.original_string: @Inject
  	private Client client;
focal_class.type: Client
focal_class.var_name: client
focal_class.declarator: clientThread
focal_class.modifier: @Inject
  	private
focal_class.original_string: @Inject
  	private ClientThread clientThread;
focal_class.type: ClientThread
focal_class.var_name: clientThread
focal_class.declarator: overlayManager
focal_class.modifier: @Inject
  	private
focal_class.original_string: @Inject
  	private OverlayManager overlayManager;
focal_class.type: OverlayManager
focal_class.var_name: overlayManager
focal_class.declarator: overlay
focal_class.modifier: @Inject
  	private
focal_class.original_string: @Inject
  	private ItemChargeOverlay overlay;
focal_class.type: ItemChargeOverlay
focal_class.var_name: overlay
focal_class.declarator: itemManager
focal_class.modifier: @Inject
  	private
focal_class.original_string: @Inject
  	private ItemManager itemManager;
focal_class.type: ItemManager
focal_class.var_name: itemManager
focal_class.declarator: infoBoxManager
focal_class.modifier: @Inject
  	private
focal_class.original_string: @Inject
  	private InfoBoxManager infoBoxManager;
focal_class.type: InfoBoxManager
focal_class.var_name: infoBoxManager
focal_class.declarator: notifier
focal_class.modifier: @Inject
  	private
focal_class.original_string: @Inject
  	private Notifier notifier;
focal_class.type: Notifier
focal_class.var_name: notifier
focal_class.declarator: config
focal_class.modifier: @Inject
  	private
focal_class.original_string: @Inject
  	private ItemChargeConfig config;
focal_class.type: ItemChargeConfig
focal_class.var_name: config
focal_class.declarator: lastCheckTick
focal_class.modifier: private
focal_class.original_string: private int lastCheckTick;
focal_class.type: int
focal_class.var_name: lastCheckTick
focal_class.file: runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemChargePlugin.java
focal_class.identifier: ItemChargePlugin
focal_class.class_method_signature: ItemChargePlugin.getConfig(ConfigManager configManager)
focal_class.full_signature: @Provides ItemChargeConfig getConfig(ConfigManager configManager)
focal_class.identifier: getConfig
focal_class.modifiers: @Provides
focal_class.parameters: (ConfigManager configManager)
focal_class.return: ItemChargeConfig
focal_class.signature: ItemChargeConfig getConfig(ConfigManager configManager)
focal_class.class_method_signature: ItemChargePlugin.startUp()
focal_class.full_signature: @Override protected void startUp()
focal_class.identifier: startUp
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void startUp()
focal_class.class_method_signature: ItemChargePlugin.shutDown()
focal_class.full_signature: @Override protected void shutDown()
focal_class.identifier: shutDown
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void shutDown()
focal_class.class_method_signature: ItemChargePlugin.onConfigChanged(ConfigChanged event)
focal_class.full_signature: @Subscribe public void onConfigChanged(ConfigChanged event)
focal_class.identifier: onConfigChanged
focal_class.modifiers: @Subscribe public
focal_class.parameters: (ConfigChanged event)
focal_class.return: void
focal_class.signature: void onConfigChanged(ConfigChanged event)
focal_class.class_method_signature: ItemChargePlugin.onChatMessage(ChatMessage event)
focal_class.full_signature: @Subscribe public void onChatMessage(ChatMessage event)
focal_class.identifier: onChatMessage
focal_class.modifiers: @Subscribe public
focal_class.parameters: (ChatMessage event)
focal_class.return: void
focal_class.signature: void onChatMessage(ChatMessage event)
focal_class.class_method_signature: ItemChargePlugin.onItemContainerChanged(ItemContainerChanged event)
focal_class.full_signature: @Subscribe public void onItemContainerChanged(ItemContainerChanged event)
focal_class.identifier: onItemContainerChanged
focal_class.modifiers: @Subscribe public
focal_class.parameters: (ItemContainerChanged event)
focal_class.return: void
focal_class.signature: void onItemContainerChanged(ItemContainerChanged event)
focal_class.class_method_signature: ItemChargePlugin.onScriptCallbackEvent(ScriptCallbackEvent event)
focal_class.full_signature: @Subscribe private void onScriptCallbackEvent(ScriptCallbackEvent event)
focal_class.identifier: onScriptCallbackEvent
focal_class.modifiers: @Subscribe private
focal_class.parameters: (ScriptCallbackEvent event)
focal_class.return: void
focal_class.signature: void onScriptCallbackEvent(ScriptCallbackEvent event)
focal_class.class_method_signature: ItemChargePlugin.onVarbitChanged(VarbitChanged event)
focal_class.full_signature: @Subscribe private void onVarbitChanged(VarbitChanged event)
focal_class.identifier: onVarbitChanged
focal_class.modifiers: @Subscribe private
focal_class.parameters: (VarbitChanged event)
focal_class.return: void
focal_class.signature: void onVarbitChanged(VarbitChanged event)
focal_class.class_method_signature: ItemChargePlugin.onWidgetLoaded(WidgetLoaded widgetLoaded)
focal_class.full_signature: @Subscribe public void onWidgetLoaded(WidgetLoaded widgetLoaded)
focal_class.identifier: onWidgetLoaded
focal_class.modifiers: @Subscribe public
focal_class.parameters: (WidgetLoaded widgetLoaded)
focal_class.return: void
focal_class.signature: void onWidgetLoaded(WidgetLoaded widgetLoaded)
focal_class.class_method_signature: ItemChargePlugin.updateDodgyNecklaceCharges(final int value)
focal_class.full_signature: private void updateDodgyNecklaceCharges(final int value)
focal_class.identifier: updateDodgyNecklaceCharges
focal_class.modifiers: private
focal_class.parameters: (final int value)
focal_class.return: void
focal_class.signature: void updateDodgyNecklaceCharges(final int value)
focal_class.class_method_signature: ItemChargePlugin.updateAmuletOfChemistryCharges(final int value)
focal_class.full_signature: private void updateAmuletOfChemistryCharges(final int value)
focal_class.identifier: updateAmuletOfChemistryCharges
focal_class.modifiers: private
focal_class.parameters: (final int value)
focal_class.return: void
focal_class.signature: void updateAmuletOfChemistryCharges(final int value)
focal_class.class_method_signature: ItemChargePlugin.updateAmuletOfBountyCharges(final int value)
focal_class.full_signature: private void updateAmuletOfBountyCharges(final int value)
focal_class.identifier: updateAmuletOfBountyCharges
focal_class.modifiers: private
focal_class.parameters: (final int value)
focal_class.return: void
focal_class.signature: void updateAmuletOfBountyCharges(final int value)
focal_class.class_method_signature: ItemChargePlugin.updateBindingNecklaceCharges(final int value)
focal_class.full_signature: private void updateBindingNecklaceCharges(final int value)
focal_class.identifier: updateBindingNecklaceCharges
focal_class.modifiers: private
focal_class.parameters: (final int value)
focal_class.return: void
focal_class.signature: void updateBindingNecklaceCharges(final int value)
focal_class.class_method_signature: ItemChargePlugin.updateExplorerRingCharges(final int value)
focal_class.full_signature: private void updateExplorerRingCharges(final int value)
focal_class.identifier: updateExplorerRingCharges
focal_class.modifiers: private
focal_class.parameters: (final int value)
focal_class.return: void
focal_class.signature: void updateExplorerRingCharges(final int value)
focal_class.class_method_signature: ItemChargePlugin.updateRingOfForgingCharges(final int value)
focal_class.full_signature: private void updateRingOfForgingCharges(final int value)
focal_class.identifier: updateRingOfForgingCharges
focal_class.modifiers: private
focal_class.parameters: (final int value)
focal_class.return: void
focal_class.signature: void updateRingOfForgingCharges(final int value)
focal_class.class_method_signature: ItemChargePlugin.checkDestroyWidget()
focal_class.full_signature: private void checkDestroyWidget()
focal_class.identifier: checkDestroyWidget
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void checkDestroyWidget()
focal_class.class_method_signature: ItemChargePlugin.updateJewelleryInfobox(ItemWithSlot item, Item[] items)
focal_class.full_signature: private void updateJewelleryInfobox(ItemWithSlot item, Item[] items)
focal_class.identifier: updateJewelleryInfobox
focal_class.modifiers: private
focal_class.parameters: (ItemWithSlot item, Item[] items)
focal_class.return: void
focal_class.signature: void updateJewelleryInfobox(ItemWithSlot item, Item[] items)
focal_class.class_method_signature: ItemChargePlugin.updateJewelleryInfobox(ItemWithSlot type, Item[] items, EquipmentInventorySlot slot)
focal_class.full_signature: private void updateJewelleryInfobox(ItemWithSlot type, Item[] items, EquipmentInventorySlot slot)
focal_class.identifier: updateJewelleryInfobox
focal_class.modifiers: private
focal_class.parameters: (ItemWithSlot type, Item[] items, EquipmentInventorySlot slot)
focal_class.return: void
focal_class.signature: void updateJewelleryInfobox(ItemWithSlot type, Item[] items, EquipmentInventorySlot slot)
focal_class.class_method_signature: ItemChargePlugin.removeInfobox(final ItemWithSlot item)
focal_class.full_signature: private void removeInfobox(final ItemWithSlot item)
focal_class.identifier: removeInfobox
focal_class.modifiers: private
focal_class.parameters: (final ItemWithSlot item)
focal_class.return: void
focal_class.signature: void removeInfobox(final ItemWithSlot item)
focal_class.class_method_signature: ItemChargePlugin.removeInfobox(final ItemWithSlot item, final EquipmentInventorySlot slot)
focal_class.full_signature: private void removeInfobox(final ItemWithSlot item, final EquipmentInventorySlot slot)
focal_class.identifier: removeInfobox
focal_class.modifiers: private
focal_class.parameters: (final ItemWithSlot item, final EquipmentInventorySlot slot)
focal_class.return: void
focal_class.signature: void removeInfobox(final ItemWithSlot item, final EquipmentInventorySlot slot)
focal_class.class_method_signature: ItemChargePlugin.getColor(int charges)
focal_class.full_signature:  Color getColor(int charges)
focal_class.identifier: getColor
focal_class.parameters: (int charges)
focal_class.return: Color
focal_class.signature: Color getColor(int charges)
focal_class.superclass: extends Plugin
focal_method.body: @Subscribe
  	public void onChatMessage(ChatMessage event)
  	{
  		if (event.getType() == ChatMessageType.GAMEMESSAGE || event.getType() == ChatMessageType.SPAM)
  		{
  			String message = event.getMessage();
  			Matcher dodgyCheckMatcher = DODGY_CHECK_PATTERN.matcher(message);
  			Matcher dodgyProtectMatcher = DODGY_PROTECT_PATTERN.matcher(message);
  			Matcher dodgyBreakMatcher = DODGY_BREAK_PATTERN.matcher(message);
  			Matcher bindingNecklaceCheckMatcher = BINDING_CHECK_PATTERN.matcher(message);
  			Matcher bindingNecklaceUsedMatcher = BINDING_USED_PATTERN.matcher(message);
  			Matcher ringOfForgingCheckMatcher = RING_OF_FORGING_CHECK_PATTERN.matcher(message);
  			Matcher amuletOfChemistryCheckMatcher = AMULET_OF_CHEMISTRY_CHECK_PATTERN.matcher(message);
  			Matcher amuletOfChemistryUsedMatcher = AMULET_OF_CHEMISTRY_USED_PATTERN.matcher(message);
  			Matcher amuletOfChemistryBreakMatcher = AMULET_OF_CHEMISTRY_BREAK_PATTERN.matcher(message);
  			Matcher amuletOfBountyCheckMatcher = AMULET_OF_BOUNTY_CHECK_PATTERN.matcher(message);
  			Matcher amuletOfBountyUsedMatcher = AMULET_OF_BOUNTY_USED_PATTERN.matcher(message);
  
  			if (config.recoilNotification() && message.contains(RING_OF_RECOIL_BREAK_MESSAGE))
  			{
  				notifier.notify("Your Ring of Recoil has shattered");
  			}
  			else if (dodgyBreakMatcher.find())
  			{
  				if (config.dodgyNotification())
  				{
  					notifier.notify("Your dodgy necklace has crumbled to dust.");
  				}
  
  				updateDodgyNecklaceCharges(MAX_DODGY_CHARGES);
  			}
  			else if (dodgyCheckMatcher.find())
  			{
  				updateDodgyNecklaceCharges(Integer.parseInt(dodgyCheckMatcher.group(1)));
  			}
  			else if (dodgyProtectMatcher.find())
  			{
  				updateDodgyNecklaceCharges(Integer.parseInt(dodgyProtectMatcher.group(1)));
  			}
  			else if (amuletOfChemistryCheckMatcher.find())
  			{
  				updateAmuletOfChemistryCharges(Integer.parseInt(amuletOfChemistryCheckMatcher.group(1)));
  			}
  			else if (amuletOfChemistryUsedMatcher.find())
  			{
  				final String match = amuletOfChemistryUsedMatcher.group(1);
  
  				int charges = 1;
  				if (!match.equals("one"))
  				{
  					charges = Integer.parseInt(match);
  				}
  
  				updateAmuletOfChemistryCharges(charges);
  			}
  			else if (amuletOfChemistryBreakMatcher.find())
  			{
  				updateAmuletOfChemistryCharges(MAX_AMULET_OF_CHEMISTRY_CHARGES);
  			}
  			else if (amuletOfBountyCheckMatcher.find())
  			{
  				updateAmuletOfBountyCharges(Integer.parseInt(amuletOfBountyCheckMatcher.group(1)));
  			}
  			else if (amuletOfBountyUsedMatcher.find())
  			{
  				updateAmuletOfBountyCharges(Integer.parseInt(amuletOfBountyUsedMatcher.group(1)));
  			}
  			else if (message.equals(AMULET_OF_BOUNTY_BREAK_TEXT))
  			{
  				updateAmuletOfBountyCharges(MAX_AMULET_OF_BOUNTY_CHARGES);
  			}
  			else if (message.contains(BINDING_BREAK_TEXT))
  			{
  				if (config.bindingNotification())
  				{
  					notifier.notify(BINDING_BREAK_TEXT);
  				}
  
  				// This chat message triggers before the used message so add 1 to the max charges to ensure proper sync
  				updateBindingNecklaceCharges(MAX_BINDING_CHARGES + 1);
  			}
  			else if (bindingNecklaceUsedMatcher.find())
  			{
  				updateBindingNecklaceCharges(config.bindingNecklace() - 1);
  			}
  			else if (bindingNecklaceCheckMatcher.find())
  			{
  				final String match = bindingNecklaceCheckMatcher.group(1);
  
  				int charges = 1;
  				if (!match.equals("one"))
  				{
  					charges = Integer.parseInt(match);
  				}
  
  				updateBindingNecklaceCharges(charges);
  			}
  			else if (ringOfForgingCheckMatcher.find())
  			{
  				final String match = ringOfForgingCheckMatcher.group(1);
  
  				int charges = 1;
  				if (!match.equals("one"))
  				{
  					charges = Integer.parseInt(match);
  				}
  				updateRingOfForgingCharges(charges);
  			}
  			else if (message.equals(RING_OF_FORGING_USED_TEXT))
  			{
  				final ItemContainer equipment = client.getItemContainer(InventoryID.EQUIPMENT);
  
  				// Determine if the player smelted with a Ring of Forging equipped.
  				if (equipment == null)
  				{
  					return;
  				}
  
  				if (equipment.contains(ItemID.RING_OF_FORGING))
  				{
  					int charges = Ints.constrainToRange(config.ringOfForging() - 1, 0, MAX_RING_OF_FORGING_CHARGES);
  					updateRingOfForgingCharges(charges);
  				}
  			}
  			else if (message.equals(RING_OF_FORGING_BREAK_TEXT))
  			{
  				if (config.ringOfForgingNotification())
  				{
  					notifier.notify("Your ring of forging has melted.");
  				}
  
  				updateRingOfForgingCharges(MAX_RING_OF_FORGING_CHARGES);
  			}
  		}
  	}
focal_method.class_method_signature: ItemChargePlugin.onChatMessage(ChatMessage event)
focal_method.full_signature: @Subscribe public void onChatMessage(ChatMessage event)
focal_method.identifier: onChatMessage
focal_method.invocations: getType getType getMessage matcher matcher matcher matcher matcher matcher matcher matcher matcher matcher matcher recoilNotification contains notify find dodgyNotification notify updateDodgyNecklaceCharges find updateDodgyNecklaceCharges parseInt group find updateDodgyNecklaceCharges parseInt group find updateAmuletOfChemistryCharges parseInt group find group equals parseInt updateAmuletOfChemistryCharges find updateAmuletOfChemistryCharges find updateAmuletOfBountyCharges parseInt group find updateAmuletOfBountyCharges parseInt group equals updateAmuletOfBountyCharges contains bindingNotification notify updateBindingNecklaceCharges find updateBindingNecklaceCharges bindingNecklace find group equals parseInt updateBindingNecklaceCharges find group equals parseInt updateRingOfForgingCharges equals getItemContainer contains constrainToRange ringOfForging updateRingOfForgingCharges equals ringOfForgingNotification notify updateRingOfForgingCharges
focal_method.modifiers: @Subscribe public
focal_method.parameters: (ChatMessage event)
focal_method.return: void
focal_method.signature: void onChatMessage(ChatMessage event)