Refactor L2C
This commit is contained in:
@@ -31,30 +31,47 @@ import net.runelite.client.config.ConfigItem;
|
|||||||
@ConfigGroup("learntoclick")
|
@ConfigGroup("learntoclick")
|
||||||
public interface LearnToClickConfig extends Config
|
public interface LearnToClickConfig extends Config
|
||||||
{
|
{
|
||||||
|
@ConfigItem(
|
||||||
@ConfigItem(position = 1, keyName = "blockCompass", name = "Compass", description = "Prevents the camera from moving when you misclick on the compass")
|
position = 1,
|
||||||
|
keyName = "blockCompass",
|
||||||
|
name = "Compass",
|
||||||
|
description = "Prevents the camera from moving when you misclick on the compass"
|
||||||
|
)
|
||||||
default boolean shouldBlockCompass()
|
default boolean shouldBlockCompass()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(position = 2, keyName = "rightClickMap", name = "World Map", description = "Prevents the world map from opening on left click without disabling it entirely")
|
@ConfigItem(
|
||||||
|
position = 2,
|
||||||
|
keyName = "rightClickMap",
|
||||||
|
name = "World Map",
|
||||||
|
description = "Prevents the world map from opening on left click without disabling it entirely"
|
||||||
|
)
|
||||||
default boolean shouldRightClickMap()
|
default boolean shouldRightClickMap()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(position = 3, keyName = "rightClickXp", name = "Xp Drops Toggle", description = "Prevents toggling xp drops on left click without disabling the toggle function entirely")
|
@ConfigItem(
|
||||||
|
position = 3,
|
||||||
|
keyName = "rightClickXp",
|
||||||
|
name = "Xp Drops Toggle",
|
||||||
|
description = "Prevents toggling xp drops on left click without disabling the toggle function entirely"
|
||||||
|
)
|
||||||
default boolean shouldRightClickXp()
|
default boolean shouldRightClickXp()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(position = 4, keyName = "rightClickRetaliate", name = "Auto Retaliate", description = "Prevents toggling auto retaliate on left click without disabling the toggle function entirely")
|
@ConfigItem(
|
||||||
|
position = 4,
|
||||||
|
keyName = "rightClickRetaliate",
|
||||||
|
name = "Auto Retaliate",
|
||||||
|
description = "Prevents toggling auto retaliate on left click without disabling the toggle function entirely"
|
||||||
|
)
|
||||||
default boolean shouldRightClickRetaliate()
|
default boolean shouldRightClickRetaliate()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -38,7 +38,6 @@ public class LearnToClickPlugin extends Plugin
|
|||||||
@Inject
|
@Inject
|
||||||
private LearnToClickConfig config;
|
private LearnToClickConfig config;
|
||||||
private boolean forceRightClickFlag;
|
private boolean forceRightClickFlag;
|
||||||
private MenuEntry[] entries;
|
|
||||||
@Inject
|
@Inject
|
||||||
private Client client;
|
private Client client;
|
||||||
|
|
||||||
@@ -86,7 +85,7 @@ public class LearnToClickPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
forceRightClickFlag = true;
|
forceRightClickFlag = true;
|
||||||
}
|
}
|
||||||
entries = client.getMenuEntries();
|
MenuEntry[] entries = client.getMenuEntries();
|
||||||
if (config.shouldBlockCompass())
|
if (config.shouldBlockCompass())
|
||||||
{
|
{
|
||||||
for (int i = entries.length - 1; i >= 0; i--)
|
for (int i = entries.length - 1; i >= 0; i--)
|
||||||
|
|||||||
Reference in New Issue
Block a user