Splits the blacksmith command into two commands, and much more
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user