hansen19498 Posted May 23, 2016 Posted May 23, 2016 Backpack removed two "copper", the trading window, my code, just move the mouse "copper", and then nothing happened for me to correct the wrong place if(getInventory().getItem("Copper ore") != null){ inventory.getItem("Copper ore").interact("Offer-2");}
Solution Posted May 23, 2016 Posted May 23, 2016 Backpack removed two "copper", the trading window, my code, just move the mouse "copper", and then nothing happened for me to correct the wrong place if(getInventory().getItem("Copper ore") != null){ inventory.getItem("Copper ore").interact("Offer-2");} Is "Offer-2" even a legit option in the trade menu?
Acerd Posted May 23, 2016 Posted May 23, 2016 if (getInventory().contains("Copper ore")) { getTrade().offer("Copper ore", 2); } 1
GaetanoH Posted May 23, 2016 Posted May 23, 2016 And you also have to check if we are currently trading with the getTrade()#isCurrentlyTrading() 1
hansen19498 Posted May 23, 2016 Author Posted May 23, 2016 Is "Offer-2" even a legit option in the trade menu? yes ,but how fix it if (getInventory().contains("Copper ore")) { getTrade().offer("Copper ore", 2); } nice thx
hansen19498 Posted May 23, 2016 Author Posted May 23, 2016 And you also have to check if we are currently trading with the getTrade()#isCurrentlyTrading() THX