mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-31 12:56:39 +00:00
fixed offhand item not immidently apply
This commit is contained in:
@@ -42,7 +42,10 @@ public class DyeMenu {
|
||||
//user.removeCosmeticSlot(cosmetic);
|
||||
user.addPlayerCosmetic(cosmetic, color);
|
||||
player.setItemOnCursor(new ItemStack(Material.AIR));
|
||||
Bukkit.getScheduler().runTaskLater(HMCCosmeticsPlugin.getInstance(), player::closeInventory, 2);
|
||||
Bukkit.getScheduler().runTaskLater(HMCCosmeticsPlugin.getInstance(), () -> {
|
||||
player.closeInventory();
|
||||
user.updateCosmetic(cosmetic.getSlot());
|
||||
}, 2);
|
||||
} else event.setCancelled(true);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user