Skip to content

Commit

Permalink
ItemCombiner - using WidgetInfo.INVENTORY instead of static value (97…
Browse files Browse the repository at this point in the history
…64864)
  • Loading branch information
ben93riggs committed Aug 21, 2020
1 parent 5e413af commit c5d9684
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion itemcombiner/itemcombiner.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

version = "0.4.0"
version = "0.5.0"

project.extra["PluginName"] = "Item Combiner"
project.extra["PluginDescription"] = "Automatically uses items on another item"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

public class ItemCombinerHotkeyListener extends MouseAdapter implements KeyListener
{
private Client client;
Expand Down Expand Up @@ -111,11 +110,11 @@ private void useItems()
return;
}

plugin.entry = new MenuEntry("Use", "<col=ff9040>" + itemManager.getItemDefinition(firstItem.getId()).getName(), firstItem.getId(), MenuOpcode.ITEM_USE.getId(), firstItem.getIndex(), 9764864, false);
plugin.entry = new MenuEntry("Use", "<col=ff9040>" + itemManager.getItemDefinition(firstItem.getId()).getName(), firstItem.getId(), MenuOpcode.ITEM_USE.getId(), firstItem.getIndex(), WidgetInfo.INVENTORY.getId(), false);
click();
Thread.sleep(config.clickDelay());

plugin.entry = new MenuEntry("Use", "<col=ff9040>" + itemManager.getItemDefinition(firstItem.getId()).getName() + "<col=ffffff> -> <col=ff9040>" + itemManager.getItemDefinition(secondItem.getId()).getName(), secondItem.getId(), MenuOpcode.ITEM_USE_ON_WIDGET_ITEM.getId(), secondItem.getIndex(), 9764864, false);
plugin.entry = new MenuEntry("Use", "<col=ff9040>" + itemManager.getItemDefinition(firstItem.getId()).getName() + "<col=ffffff> -> <col=ff9040>" + itemManager.getItemDefinition(secondItem.getId()).getName(), secondItem.getId(), MenuOpcode.ITEM_USE_ON_WIDGET_ITEM.getId(), secondItem.getIndex(), WidgetInfo.INVENTORY.getId(), false);
click();
Thread.sleep(config.clickDelay());
}
Expand Down

0 comments on commit c5d9684

Please sign in to comment.