Fix drag delay not updating (#1014)

This commit is contained in:
Ganom
2019-07-16 16:01:08 -04:00
committed by Kyleeld
parent 46bd5f4c8e
commit 12b5fd5077

View File

@@ -102,11 +102,11 @@ public class AntiDragPlugin extends Plugin
@Override @Override
protected void startUp() throws Exception protected void startUp() throws Exception
{ {
updateConfig();
if (this.keybind) if (this.keybind)
{ {
keyManager.registerKeyListener(hotkeyListener); keyManager.registerKeyListener(hotkeyListener);
} }
updateConfig();
client.setInventoryDragDelay(this.alwaysOn ? this.dragDelay : DEFAULT_DELAY); client.setInventoryDragDelay(this.alwaysOn ? this.dragDelay : DEFAULT_DELAY);
} }
@@ -141,6 +141,10 @@ public class AntiDragPlugin extends Plugin
{ {
client.setInventoryDragDelay(this.alwaysOn ? this.dragDelay : DEFAULT_DELAY); client.setInventoryDragDelay(this.alwaysOn ? this.dragDelay : DEFAULT_DELAY);
} }
if (event.getKey().equals("dragDelay") && this.alwaysOn)
{
client.setInventoryDragDelay(this.dragDelay);
}
} }
} }