This repository has been archived by the owner on May 29, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
76 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
displayName=Example | ||
author=Nobody | ||
support= | ||
description=An example greeter plugin | ||
tags= | ||
plugins=com.example.ExamplePlugin | ||
displayName=Menu Swapper Extended | ||
author=raiyni | ||
support=https://github.com/raiyni/menu-swapper-extended | ||
description=External hub for extra menu swapper additions | ||
tags=npcs,inventory,items,objects | ||
plugins=io.ryoung.menuswapperextended |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
rootProject.name = 'example' | ||
rootProject.name = 'menu-swapper-extended' |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
src/main/java/io/ryoung/menuswapperextended/MenuSwapperConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package io.ryoung.menuswapperextended; | ||
|
||
import net.runelite.client.config.Config; | ||
import net.runelite.client.config.ConfigGroup; | ||
import net.runelite.client.config.ConfigItem; | ||
|
||
@ConfigGroup("menuswapperextended") | ||
public interface MenuSwapperConfig extends Config | ||
{ | ||
@ConfigItem( | ||
keyName = "swapStory", | ||
name = "Story", | ||
description = "Swap Talk-to with Story for Juna at Tears of Guthix" | ||
) | ||
default boolean swapStory() | ||
{ | ||
return true; | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
src/main/java/io/ryoung/menuswapperextended/MenuSwapperPlugin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package io.ryoung.menuswapperextended; | ||
|
||
import com.google.common.collect.ImmutableSet; | ||
import com.google.inject.Provides; | ||
import java.util.Set; | ||
import javax.inject.Inject; | ||
import lombok.extern.slf4j.Slf4j; | ||
import net.runelite.api.Client; | ||
import net.runelite.api.GameState; | ||
import net.runelite.api.MenuAction; | ||
import net.runelite.api.MenuEntry; | ||
import net.runelite.api.NPC; | ||
import net.runelite.api.events.MenuEntryAdded; | ||
import net.runelite.client.config.ConfigManager; | ||
import net.runelite.client.eventbus.Subscribe; | ||
import net.runelite.client.plugins.Plugin; | ||
import net.runelite.client.plugins.PluginDescriptor; | ||
import net.runelite.client.util.Text; | ||
|
||
@Slf4j | ||
@PluginDescriptor( | ||
name = "Menu Swapper Extended" | ||
) | ||
public class MenuSwapperPlugin extends Plugin | ||
{ | ||
private static final Set<MenuAction> NPC_MENU_TYPES = ImmutableSet.of( | ||
MenuAction.NPC_FIRST_OPTION, | ||
MenuAction.NPC_SECOND_OPTION, | ||
MenuAction.NPC_THIRD_OPTION, | ||
MenuAction.NPC_FOURTH_OPTION, | ||
MenuAction.NPC_FIFTH_OPTION, | ||
MenuAction.EXAMINE_NPC); | ||
|
||
@Inject | ||
private Client client; | ||
|
||
@Inject | ||
private MenuSwapperConfig config; | ||
|
||
@Provides | ||
MenuSwapperConfig provideConfig(ConfigManager configManager) | ||
{ | ||
return configManager.getConfig(MenuSwapperConfig.class); | ||
} | ||
} |
6 changes: 3 additions & 3 deletions
6
...t/java/com/example/ExamplePluginTest.java → ...wapperextended/MenuSwapperPluginTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
package com.example; | ||
package io.ryoung.menuswapperextended; | ||
|
||
import net.runelite.client.RuneLite; | ||
import net.runelite.client.externalplugins.ExternalPluginManager; | ||
|
||
public class ExamplePluginTest | ||
public class MenuSwapperPluginTest | ||
{ | ||
public static void main(String[] args) throws Exception | ||
{ | ||
ExternalPluginManager.loadBuiltin(ExamplePlugin.class); | ||
ExternalPluginManager.loadBuiltin(MenuSwapperPlugin.class); | ||
RuneLite.main(args); | ||
} | ||
} |