antidrag: Enable shift-antidrag in PvP regardless of onShiftOnly config
This commit is contained in:
@@ -46,7 +46,7 @@ public interface AntiDragConfig extends Config
|
||||
@ConfigItem(
|
||||
keyName = "onShiftOnly",
|
||||
name = "On Shift Only",
|
||||
description = "Configures whether to only adjust the delay while holding shift. Required for anti drag in PvP scenarios.",
|
||||
description = "Configures whether to only adjust the delay while holding shift in non-PvP scenarios. Shift is required in PvP regardless of this config setting",
|
||||
position = 2
|
||||
)
|
||||
default boolean onShiftOnly()
|
||||
|
||||
@@ -112,7 +112,7 @@ public class AntiDragPlugin extends Plugin implements KeyListener
|
||||
@Override
|
||||
public void keyPressed(KeyEvent e)
|
||||
{
|
||||
if (e.getKeyCode() == KeyEvent.VK_SHIFT && config.onShiftOnly())
|
||||
if (e.getKeyCode() == KeyEvent.VK_SHIFT && (inPvp || config.onShiftOnly()))
|
||||
{
|
||||
setDragDelay();
|
||||
held = true;
|
||||
@@ -122,7 +122,7 @@ public class AntiDragPlugin extends Plugin implements KeyListener
|
||||
@Override
|
||||
public void keyReleased(KeyEvent e)
|
||||
{
|
||||
if (e.getKeyCode() == KeyEvent.VK_SHIFT && config.onShiftOnly())
|
||||
if (e.getKeyCode() == KeyEvent.VK_SHIFT && (inPvp || config.onShiftOnly()))
|
||||
{
|
||||
resetDragDelay();
|
||||
held = false;
|
||||
|
||||
Reference in New Issue
Block a user