mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 11:45:51 +00:00
Switch to sfItem.isItem()
This commit is contained in:
parent
7f8ef8be84
commit
fc8ffabbcf
@ -63,8 +63,7 @@ public class MiddleClickListener implements Listener {
|
|||||||
* This is sometimes bypassed by the client itself (not fixable though).
|
* This is sometimes bypassed by the client itself (not fixable though).
|
||||||
*/
|
*/
|
||||||
for (int i = 0; i < 9; i++) {
|
for (int i = 0; i < 9; i++) {
|
||||||
SlimefunItem hotbarItem = SlimefunItem.getByItem(player.getInventory().getItem(i));
|
if (sfItem.isItem(player.getInventory().getItem(i))) {
|
||||||
if (hotbarItem != null && hotbarItem.getId() == sfItem.getId()) {
|
|
||||||
player.getInventory().setHeldItemSlot(i);
|
player.getInventory().setHeldItemSlot(i);
|
||||||
// Has to be cancelled in order for it to work properly.
|
// Has to be cancelled in order for it to work properly.
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user