@Override public void onMouseUp(double x, double y, int button) { if (selectedSlider != null && itemTarget.getSelectedItem() != null && moduleTarget.getSelectedModule() != null) { ClickableItem item = itemTarget.getSelectedItem(); IPowerModule module = moduleTarget.getSelectedModule().getModule(); MusePacket tweakRequest = new MusePacketTweakRequest( (Player) player, item.inventorySlot, module.getName(), selectedSlider.getName(), selectedSlider.getValue()); player.sendQueue.addToSendQueue(tweakRequest.getPacket250()); } if (button == 0) { selectedSlider = null; } }
@Override public void update(double mousex, double mousey) { mousex /= SCALERATIO; mousey /= SCALERATIO; if (itemTarget.getSelectedItem() != null && moduleTarget.getSelectedModule() != null) { ItemStack stack = itemTarget.getSelectedItem().getItem(); IPowerModule module = moduleTarget.getSelectedModule().getModule(); if (MuseItemUtils.itemHasModule( itemTarget.getSelectedItem().getItem(), moduleTarget.getSelectedModule().getModule().getName())) { loadTweaks(stack, module); } else { sliders = null; propertyStrings = null; } } else { sliders = null; propertyStrings = null; } if (selectedSlider != null) { selectedSlider.moveSlider(mousex, mousey); } }