Splits the blacksmith command into two commands, and much more

This commit is contained in:
2022-08-19 19:08:54 +02:00
parent 755db8c497
commit e1191dad7d
21 changed files with 1077 additions and 235 deletions

View File

@ -68,13 +68,14 @@ public class ReforgeSession implements Runnable {
//Give the item back to the player
if (!config.getDisableDelay()) {
//If the player isn't online, drop the item to prevent it from disappearing
if (config.getDropItem() || !player.isOnline()) {
//If the player isn't online, or the player cannot fit the item, drop the item to prevent it from disappearing
if (config.getDropItem() || !player.isOnline() || player.getInventory().firstEmpty() == -1) {
player.getWorld().dropItemNaturally(npc.getEntity().getLocation(), itemToReforge);
} else {
player.getInventory().addItem(itemToReforge);
}
} else {
//It can be assumed as this happens instantly, that the player still has the item's previous slot selected
player.getInventory().setItemInMainHand(itemToReforge);
}