Add custom menu swaps to menu entry swapper
This commit is contained in:
@@ -6,7 +6,7 @@ import net.runelite.api.MenuEntry;
|
|||||||
import static net.runelite.client.menus.MenuManager.LEVEL_PATTERN;
|
import static net.runelite.client.menus.MenuManager.LEVEL_PATTERN;
|
||||||
import net.runelite.client.util.Text;
|
import net.runelite.client.util.Text;
|
||||||
|
|
||||||
class AbstractMenuEntry
|
public class AbstractMenuEntry
|
||||||
{
|
{
|
||||||
@Getter
|
@Getter
|
||||||
private String option;
|
private String option;
|
||||||
@@ -26,17 +26,17 @@ class AbstractMenuEntry
|
|||||||
@Getter
|
@Getter
|
||||||
private boolean strictTarget;
|
private boolean strictTarget;
|
||||||
|
|
||||||
AbstractMenuEntry(String option, String target)
|
public AbstractMenuEntry(String option, String target)
|
||||||
{
|
{
|
||||||
this(option, target, -1, -1, true, true);
|
this(option, target, -1, -1, true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
AbstractMenuEntry(String option, String target, boolean strictTarget)
|
public AbstractMenuEntry(String option, String target, boolean strictTarget)
|
||||||
{
|
{
|
||||||
this(option, target, -1, -1, true, strictTarget);
|
this(option, target, -1, -1, true, strictTarget);
|
||||||
}
|
}
|
||||||
|
|
||||||
AbstractMenuEntry(String option, String target, int id, int type, boolean strictOption, boolean strictTarget)
|
public AbstractMenuEntry(String option, String target, int id, int type, boolean strictOption, boolean strictTarget)
|
||||||
{
|
{
|
||||||
this.option = option;
|
this.option = option;
|
||||||
this.target = target;
|
this.target = target;
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ package net.runelite.client.menus;
|
|||||||
|
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import com.google.common.collect.HashMultimap;
|
import com.google.common.collect.HashMultimap;
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Multimap;
|
import com.google.common.collect.Multimap;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@@ -36,7 +37,6 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -168,7 +168,15 @@ public class MenuManager
|
|||||||
|
|
||||||
MenuEntry newestEntry = menuEntries[menuEntries.length - 1];
|
MenuEntry newestEntry = menuEntries[menuEntries.length - 1];
|
||||||
|
|
||||||
boolean isPrio = priorityEntries.stream().anyMatch(p -> p.matches(newestEntry));
|
boolean isPrio = false;
|
||||||
|
for (AbstractMenuEntry p : priorityEntries)
|
||||||
|
{
|
||||||
|
if (p.matches(newestEntry))
|
||||||
|
{
|
||||||
|
isPrio = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// If the last entry was a priority entry, keep track of it
|
// If the last entry was a priority entry, keep track of it
|
||||||
if (isPrio)
|
if (isPrio)
|
||||||
@@ -187,26 +195,42 @@ public class MenuManager
|
|||||||
copy.add(CANCEL());
|
copy.add(CANCEL());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*// Find the current entry in the swaps map
|
// Find the current entry in the swaps map
|
||||||
Optional<AbstractMenuEntry> swapEntry = swaps.keySet().stream().filter(e -> e.matches(newestEntry)).findFirst();
|
AbstractMenuEntry swapEntry = null;
|
||||||
|
for (AbstractMenuEntry e : swaps.keySet())
|
||||||
if (swapEntry.isPresent())
|
|
||||||
{
|
{
|
||||||
AbstractMenuEntry swap = swapEntry.get();
|
if (e.matches(newestEntry))
|
||||||
AbstractMenuEntry swapTarget = swaps.get(swap);
|
{
|
||||||
|
swapEntry = e;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (swapEntry != null)
|
||||||
|
{
|
||||||
|
AbstractMenuEntry swapTarget = swaps.get(swapEntry);
|
||||||
|
|
||||||
// Find the target for the swap in current menu entries
|
// Find the target for the swap in current menu entries
|
||||||
Optional<MenuEntry> foundSwap = Lists.reverse(copy).stream().filter(swapTarget::matches).findFirst();
|
MenuEntry foundSwap = null;
|
||||||
|
for (MenuEntry entry : Lists.reverse(copy))
|
||||||
|
{
|
||||||
|
if (swapTarget.matches(entry))
|
||||||
|
{
|
||||||
|
foundSwap = entry;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (foundSwap.isPresent())
|
if (foundSwap != null)
|
||||||
{
|
{
|
||||||
// Swap
|
// Swap
|
||||||
int index = copy.indexOf(foundSwap.get());
|
int index = copy.indexOf(foundSwap);
|
||||||
|
int newIndex = copy.indexOf(newestEntry);
|
||||||
|
|
||||||
copy.set(index, newestEntry);
|
copy.set(index, newestEntry);
|
||||||
copy.set(copy.size() - 1, foundSwap.get());
|
copy.set(newIndex, foundSwap);
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
|
|
||||||
client.setMenuEntries(copy.toArray(new MenuEntry[0]));
|
client.setMenuEntries(copy.toArray(new MenuEntry[0]));
|
||||||
}
|
}
|
||||||
@@ -394,6 +418,19 @@ public class MenuManager
|
|||||||
priorityEntries.add(entry);
|
priorityEntries.add(entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds to the set of menu entries which when present, will remove all entries except for this one
|
||||||
|
* This method will add one with strict option, but not-strict target (contains for target, equals for option)
|
||||||
|
*/
|
||||||
|
public void addPriorityEntry(String option)
|
||||||
|
{
|
||||||
|
option = Text.standardize(option);
|
||||||
|
|
||||||
|
AbstractMenuEntry entry = new AbstractMenuEntry(option, "", false);
|
||||||
|
|
||||||
|
priorityEntries.add(entry);
|
||||||
|
}
|
||||||
|
|
||||||
public void removePriorityEntry(String option, String target)
|
public void removePriorityEntry(String option, String target)
|
||||||
{
|
{
|
||||||
option = Text.standardize(option);
|
option = Text.standardize(option);
|
||||||
@@ -401,8 +438,89 @@ public class MenuManager
|
|||||||
|
|
||||||
AbstractMenuEntry entry = new AbstractMenuEntry(option, target);
|
AbstractMenuEntry entry = new AbstractMenuEntry(option, target);
|
||||||
|
|
||||||
Set<AbstractMenuEntry> toRemove = priorityEntries.stream().filter(entry::equals).collect(Collectors.toSet());
|
for (AbstractMenuEntry priorityEntry : priorityEntries)
|
||||||
|
{
|
||||||
|
if (entry.equals(priorityEntry))
|
||||||
|
{
|
||||||
|
priorityEntries.remove(priorityEntry);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
priorityEntries.removeAll(toRemove);
|
public void removePriorityEntry(String option)
|
||||||
|
{
|
||||||
|
option = Text.standardize(option);
|
||||||
|
|
||||||
|
AbstractMenuEntry entry = new AbstractMenuEntry(option, "", false);
|
||||||
|
|
||||||
|
for (AbstractMenuEntry priorityEntry : priorityEntries)
|
||||||
|
{
|
||||||
|
if (entry.equals(priorityEntry))
|
||||||
|
{
|
||||||
|
priorityEntries.remove(priorityEntry);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds to the map of swaps. - Strict option + target
|
||||||
|
*/
|
||||||
|
public void addSwap(String option, String target, String option2, String target2)
|
||||||
|
{
|
||||||
|
option = Text.standardize(option);
|
||||||
|
target = Text.standardize(target);
|
||||||
|
|
||||||
|
option2 = Text.standardize(option2);
|
||||||
|
target2 = Text.standardize(target2);
|
||||||
|
|
||||||
|
AbstractMenuEntry swapFrom = new AbstractMenuEntry(option, target);
|
||||||
|
AbstractMenuEntry swapTo = new AbstractMenuEntry(option2, target2);
|
||||||
|
|
||||||
|
if (swapTo.equals(swapFrom))
|
||||||
|
{
|
||||||
|
log.warn("You shouldn't try swapping an entry for itself");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
swaps.put(swapFrom, swapTo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds to the map of swaps - Pre-baked Abstract entry
|
||||||
|
*/
|
||||||
|
public void addSwap(AbstractMenuEntry swapFrom, AbstractMenuEntry swapTo)
|
||||||
|
{
|
||||||
|
if (swapTo.equals(swapFrom))
|
||||||
|
{
|
||||||
|
log.warn("You shouldn't try swapping an entry for itself");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
swaps.put(swapFrom, swapTo);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removeSwap(String option, String target, String option2, String target2)
|
||||||
|
{
|
||||||
|
option = Text.standardize(option);
|
||||||
|
target = Text.standardize(target);
|
||||||
|
|
||||||
|
option2 = Text.standardize(option2);
|
||||||
|
target2 = Text.standardize(target2);
|
||||||
|
|
||||||
|
AbstractMenuEntry swapFrom = new AbstractMenuEntry(option, target);
|
||||||
|
AbstractMenuEntry swapTo = new AbstractMenuEntry(option2, target2);
|
||||||
|
|
||||||
|
removeSwap(swapFrom, swapTo);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removeSwap(AbstractMenuEntry swapFrom, AbstractMenuEntry swapTo)
|
||||||
|
{
|
||||||
|
for (Map.Entry<AbstractMenuEntry, AbstractMenuEntry> e : swaps.entrySet())
|
||||||
|
{
|
||||||
|
if (e.getKey().equals(swapFrom) && e.getValue().equals(swapTo))
|
||||||
|
{
|
||||||
|
swaps.remove(e.getKey());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,17 @@ import net.runelite.client.config.ConfigItem;
|
|||||||
@ConfigGroup("menuentryswapper")
|
@ConfigGroup("menuentryswapper")
|
||||||
public interface MenuEntrySwapperConfig extends Config
|
public interface MenuEntrySwapperConfig extends Config
|
||||||
{
|
{
|
||||||
|
@ConfigItem(
|
||||||
|
position = -3,
|
||||||
|
keyName = "customSwaps",
|
||||||
|
name = "Custom swaps",
|
||||||
|
description = "Add custom swaps here, 1 per line. Syntax: option, target : option, target<br>Note that the first entry should be the left click one!"
|
||||||
|
)
|
||||||
|
default String customSwaps()
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = -2,
|
position = -2,
|
||||||
keyName = "shiftClickCustomization",
|
keyName = "shiftClickCustomization",
|
||||||
|
|||||||
@@ -25,10 +25,14 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.menuentryswapper;
|
package net.runelite.client.plugins.menuentryswapper;
|
||||||
|
|
||||||
|
import com.google.common.base.Splitter;
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
import com.google.inject.Provides;
|
import com.google.inject.Provides;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
import joptsimple.internal.Strings;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
@@ -51,6 +55,7 @@ import net.runelite.client.eventbus.Subscribe;
|
|||||||
import net.runelite.client.game.ItemManager;
|
import net.runelite.client.game.ItemManager;
|
||||||
import net.runelite.client.game.ItemVariationMapping;
|
import net.runelite.client.game.ItemVariationMapping;
|
||||||
import net.runelite.client.input.KeyManager;
|
import net.runelite.client.input.KeyManager;
|
||||||
|
import net.runelite.client.menus.AbstractMenuEntry;
|
||||||
import net.runelite.client.menus.MenuManager;
|
import net.runelite.client.menus.MenuManager;
|
||||||
import net.runelite.client.menus.WidgetMenuOption;
|
import net.runelite.client.menus.WidgetMenuOption;
|
||||||
import net.runelite.client.plugins.Plugin;
|
import net.runelite.client.plugins.Plugin;
|
||||||
@@ -71,7 +76,6 @@ public class MenuEntrySwapperPlugin extends Plugin
|
|||||||
private static final String SAVE = "Save";
|
private static final String SAVE = "Save";
|
||||||
private static final String RESET = "Reset";
|
private static final String RESET = "Reset";
|
||||||
private static final String MENU_TARGET = "Shift-click";
|
private static final String MENU_TARGET = "Shift-click";
|
||||||
|
|
||||||
private static final String CONFIG_GROUP = "shiftclick";
|
private static final String CONFIG_GROUP = "shiftclick";
|
||||||
private static final String ITEM_KEY_PREFIX = "item_";
|
private static final String ITEM_KEY_PREFIX = "item_";
|
||||||
|
|
||||||
@@ -101,6 +105,13 @@ public class MenuEntrySwapperPlugin extends Plugin
|
|||||||
MenuAction.NPC_FIFTH_OPTION,
|
MenuAction.NPC_FIFTH_OPTION,
|
||||||
MenuAction.EXAMINE_NPC);
|
MenuAction.EXAMINE_NPC);
|
||||||
|
|
||||||
|
private static final Splitter NEWLINE_SPLITTER = Splitter
|
||||||
|
.on("\n")
|
||||||
|
.omitEmptyStrings()
|
||||||
|
.trimResults();
|
||||||
|
|
||||||
|
private final Map<AbstractMenuEntry, AbstractMenuEntry> customSwaps = new HashMap<>();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Client client;
|
private Client client;
|
||||||
|
|
||||||
@@ -131,9 +142,6 @@ public class MenuEntrySwapperPlugin extends Plugin
|
|||||||
@Setter
|
@Setter
|
||||||
private boolean shiftModifier = false;
|
private boolean shiftModifier = false;
|
||||||
|
|
||||||
@Setter
|
|
||||||
private boolean controlModifier = false;
|
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
MenuEntrySwapperConfig provideConfig(ConfigManager configManager)
|
MenuEntrySwapperConfig provideConfig(ConfigManager configManager)
|
||||||
{
|
{
|
||||||
@@ -160,6 +168,11 @@ public class MenuEntrySwapperPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
if (!CONFIG_GROUP.equals(event.getGroup()))
|
if (!CONFIG_GROUP.equals(event.getGroup()))
|
||||||
{
|
{
|
||||||
|
if (event.getKey().equals("customSwaps"))
|
||||||
|
{
|
||||||
|
loadCustomSwaps(config.customSwaps());
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -455,20 +468,6 @@ public class MenuEntrySwapperPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (option.equalsIgnoreCase("climb") && config.swapClimbUpDown())
|
|
||||||
{
|
|
||||||
if (controlModifier ^ shiftModifier)
|
|
||||||
{
|
|
||||||
if (shiftModifier)
|
|
||||||
{
|
|
||||||
swap(client, "climb-up", option, target, true);
|
|
||||||
}
|
|
||||||
if (controlModifier)
|
|
||||||
{
|
|
||||||
swap(client, "climb-down", option, target, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (config.swapTravel() && option.equals("pass") && target.equals("energy barrier"))
|
else if (config.swapTravel() && option.equals("pass") && target.equals("energy barrier"))
|
||||||
{
|
{
|
||||||
swap(client, "pay-toll(2-ecto)", option, target, true);
|
swap(client, "pay-toll(2-ecto)", option, target, true);
|
||||||
@@ -667,4 +666,96 @@ public class MenuEntrySwapperPlugin extends Plugin
|
|||||||
menuManager.addManagedCustomMenu(RESIZABLE_INVENTORY_TAB_CONFIGURE);
|
menuManager.addManagedCustomMenu(RESIZABLE_INVENTORY_TAB_CONFIGURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void loadCustomSwaps(String config)
|
||||||
|
{
|
||||||
|
Map<AbstractMenuEntry, AbstractMenuEntry> tmp = new HashMap<>();
|
||||||
|
|
||||||
|
if (!Strings.isNullOrEmpty(config))
|
||||||
|
{
|
||||||
|
Map<String, String> split = NEWLINE_SPLITTER.withKeyValueSeparator(':').split(config);
|
||||||
|
|
||||||
|
for (Map.Entry<String, String> entry : split.entrySet())
|
||||||
|
{
|
||||||
|
String from = entry.getKey();
|
||||||
|
String to = entry.getValue();
|
||||||
|
String[] splitFrom = Text.standardize(from).split(",");
|
||||||
|
String optionFrom = splitFrom[0].trim();
|
||||||
|
String targetFrom;
|
||||||
|
if (splitFrom.length == 1)
|
||||||
|
{
|
||||||
|
targetFrom = "";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
targetFrom = splitFrom[1].trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
AbstractMenuEntry fromEntry = new AbstractMenuEntry(optionFrom, targetFrom);
|
||||||
|
|
||||||
|
String[] splitTo = Text.standardize(to).split(",");
|
||||||
|
String optionTo = splitTo[0].trim();
|
||||||
|
String targetTo;
|
||||||
|
if (splitTo.length == 1)
|
||||||
|
{
|
||||||
|
targetTo = "";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
targetTo = splitTo[1].trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
AbstractMenuEntry toEntry = new AbstractMenuEntry(optionTo, targetTo);
|
||||||
|
|
||||||
|
tmp.put(fromEntry, toEntry);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Map.Entry<AbstractMenuEntry, AbstractMenuEntry> e : customSwaps.entrySet())
|
||||||
|
{
|
||||||
|
AbstractMenuEntry key = e.getKey();
|
||||||
|
AbstractMenuEntry value = e.getValue();
|
||||||
|
menuManager.removeSwap(key, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
customSwaps.clear();
|
||||||
|
customSwaps.putAll(tmp);
|
||||||
|
|
||||||
|
for (Map.Entry<AbstractMenuEntry, AbstractMenuEntry> entry : customSwaps.entrySet())
|
||||||
|
{
|
||||||
|
AbstractMenuEntry a1 = entry.getKey();
|
||||||
|
AbstractMenuEntry a2 = entry.getValue();
|
||||||
|
menuManager.addSwap(a1, a2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void startShift()
|
||||||
|
{
|
||||||
|
if (!config.swapClimbUpDown())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
menuManager.addPriorityEntry("climb-up");
|
||||||
|
}
|
||||||
|
|
||||||
|
void stopShift()
|
||||||
|
{
|
||||||
|
menuManager.removePriorityEntry("climb-up");
|
||||||
|
}
|
||||||
|
|
||||||
|
void startControl()
|
||||||
|
{
|
||||||
|
if (!config.swapClimbUpDown())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
menuManager.addPriorityEntry("climb-down");
|
||||||
|
}
|
||||||
|
|
||||||
|
void stopControl()
|
||||||
|
{
|
||||||
|
menuManager.removePriorityEntry("climb-down");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,18 +26,10 @@ package net.runelite.client.plugins.menuentryswapper;
|
|||||||
|
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import net.runelite.api.Client;
|
|
||||||
import net.runelite.client.callback.ClientThread;
|
|
||||||
import net.runelite.client.input.KeyListener;
|
import net.runelite.client.input.KeyListener;
|
||||||
|
|
||||||
public class ShiftClickInputListener implements KeyListener
|
public class ShiftClickInputListener implements KeyListener
|
||||||
{
|
{
|
||||||
@Inject
|
|
||||||
private ClientThread clientThread;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private Client client;
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private MenuEntrySwapperPlugin plugin;
|
private MenuEntrySwapperPlugin plugin;
|
||||||
|
|
||||||
@@ -53,10 +45,11 @@ public class ShiftClickInputListener implements KeyListener
|
|||||||
if (event.getKeyCode() == KeyEvent.VK_SHIFT)
|
if (event.getKeyCode() == KeyEvent.VK_SHIFT)
|
||||||
{
|
{
|
||||||
plugin.setShiftModifier(true);
|
plugin.setShiftModifier(true);
|
||||||
|
plugin.startShift();
|
||||||
}
|
}
|
||||||
if (event.getKeyCode() == KeyEvent.VK_CONTROL)
|
if (event.getKeyCode() == KeyEvent.VK_CONTROL)
|
||||||
{
|
{
|
||||||
plugin.setControlModifier(true);
|
plugin.startControl();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,10 +59,11 @@ public class ShiftClickInputListener implements KeyListener
|
|||||||
if (event.getKeyCode() == KeyEvent.VK_SHIFT)
|
if (event.getKeyCode() == KeyEvent.VK_SHIFT)
|
||||||
{
|
{
|
||||||
plugin.setShiftModifier(false);
|
plugin.setShiftModifier(false);
|
||||||
|
plugin.stopShift();
|
||||||
}
|
}
|
||||||
if (event.getKeyCode() == KeyEvent.VK_CONTROL)
|
if (event.getKeyCode() == KeyEvent.VK_CONTROL)
|
||||||
{
|
{
|
||||||
plugin.setControlModifier(false);
|
plugin.stopControl();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user