use of betterquesting.api.client.gui.controls.GuiButtonQuestInstance in project BetterQuesting by Funwayguy.
the class ToolboxToolReset method onMouseClick.
@Override
public void onMouseClick(int mx, int my, int click) {
if (click != 0) {
return;
}
GuiButtonQuestInstance btn = gui.getQuestLine().getButtonAt(mx, my);
if (btn != null) {
NBTTagCompound tags = new NBTTagCompound();
// Complete quest
tags.setInteger("action", EnumPacketAction.SET.ordinal());
tags.setInteger("questID", QuestDatabase.INSTANCE.getKey(btn.getQuest()));
tags.setBoolean("status", false);
PacketSender.INSTANCE.sendToServer(new QuestingPacket(PacketTypeNative.QUEST_EDIT.GetLocation(), tags));
}
}
Aggregations