Change setModifed so it can't change modified back to false (#1805)
This commit is contained in:
@@ -240,7 +240,7 @@ public class MenuManager
|
||||
|
||||
// Need to set the event entries to prevent conflicts
|
||||
event.setMenuEntries(arrayEntries);
|
||||
event.setModified(true);
|
||||
event.setModified();
|
||||
}
|
||||
|
||||
private void onMenuEntryAdded(MenuEntryAdded event)
|
||||
@@ -889,7 +889,7 @@ public class MenuManager
|
||||
}
|
||||
|
||||
@AllArgsConstructor
|
||||
private class SortMapping implements Comparable<SortMapping>
|
||||
private static class SortMapping implements Comparable<SortMapping>
|
||||
{
|
||||
private final int priority;
|
||||
private final MenuEntry entry;
|
||||
|
||||
@@ -541,7 +541,10 @@ public class AgilityPlugin extends Plugin
|
||||
changed |= checkAndModify(entry);
|
||||
}
|
||||
|
||||
event.setModified(changed);
|
||||
if (changed)
|
||||
{
|
||||
event.setModified();
|
||||
}
|
||||
}
|
||||
|
||||
private boolean checkAndModify(MenuEntry old)
|
||||
|
||||
@@ -202,7 +202,7 @@ public class ChatTranslationPlugin extends Plugin implements KeyListener
|
||||
newEntries[i].setOpcode(MenuOpcode.RUNELITE.getId());
|
||||
|
||||
event.setMenuEntries(newEntries);
|
||||
event.setModified(true);
|
||||
event.setModified();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -258,7 +258,7 @@ public class CorpPlugin extends Plugin
|
||||
}
|
||||
|
||||
event.setOpcode(NPC_SECOND_OPTION.getId() + MENU_ACTION_DEPRIORITIZE_OFFSET);
|
||||
event.setModified(true);
|
||||
event.setModified();
|
||||
}
|
||||
|
||||
private void onConfigChanged(ConfigChanged configChanged)
|
||||
|
||||
@@ -407,7 +407,7 @@ public class DevToolsPlugin extends Plugin
|
||||
}
|
||||
|
||||
entry.setTarget(entry.getTarget() + " " + ColorUtil.prependColorTag("(" + info + ")", JagexColors.MENU_TARGET));
|
||||
entry.setModified(true);
|
||||
entry.setModified();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -448,7 +448,7 @@ public class GrandExchangePlugin extends Plugin
|
||||
case WidgetID.SHOP_INVENTORY_GROUP_ID:
|
||||
menuEntry.setOption(SEARCH_GRAND_EXCHANGE);
|
||||
menuEntry.setOpcode(MenuOpcode.RUNELITE.getId());
|
||||
menuEntry.setModified(true);
|
||||
menuEntry.setModified();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -983,7 +983,7 @@ public class GroundItemsPlugin extends Plugin
|
||||
{
|
||||
final String optionText = telegrabEntry ? "Cast" : "Take";
|
||||
lastEntry.setOption(ColorUtil.prependColorTag(optionText, color));
|
||||
lastEntry.setModified(true);
|
||||
lastEntry.setModified();
|
||||
}
|
||||
|
||||
if (mode == BOTH || mode == NAME)
|
||||
@@ -1003,14 +1003,14 @@ public class GroundItemsPlugin extends Plugin
|
||||
}
|
||||
|
||||
lastEntry.setTarget(target);
|
||||
lastEntry.setModified(true);
|
||||
lastEntry.setModified();
|
||||
}
|
||||
}
|
||||
|
||||
if (this.showMenuItemQuantities && itemComposition.isStackable() && quantity > 1)
|
||||
{
|
||||
lastEntry.setTarget(lastEntry.getTarget() + " (" + quantity + ")");
|
||||
lastEntry.setModified(true);
|
||||
lastEntry.setModified();
|
||||
}
|
||||
|
||||
if (this.removeIgnored && lastEntry.getOption().equals("Take") && hiddenItemList.contains(Text.removeTags(lastEntry.getTarget())))
|
||||
|
||||
@@ -250,7 +250,7 @@ public class InventoryTagsPlugin extends Plugin
|
||||
|
||||
// Need to set the event entries to prevent conflicts
|
||||
event.setMenuEntries(menuList);
|
||||
event.setModified(true);
|
||||
event.setModified();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -578,7 +578,7 @@ public class MenuEntrySwapperPlugin extends Plugin
|
||||
}
|
||||
|
||||
event.setMenuEntries(menu_entries.toArray(new MenuEntry[0]));
|
||||
event.setModified(true);
|
||||
event.setModified();
|
||||
}
|
||||
|
||||
public void onMenuEntryAdded(MenuEntryAdded event)
|
||||
|
||||
@@ -311,7 +311,7 @@ public class NpcIndicatorsPlugin extends Plugin
|
||||
{
|
||||
final String target = ColorUtil.prependColorTag(Text.removeTags(event.getTarget()), this.getHighlightColor);
|
||||
event.setTarget(target);
|
||||
event.setModified(true);
|
||||
event.setModified();
|
||||
}
|
||||
else if (hotKeyPressed && type == MenuOpcode.EXAMINE_NPC.getId())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user