fixed bug that prevented plants from resetting age

This commit is contained in:
steev 2023-10-07 03:26:54 +02:00
parent 6ac6455f2d
commit d9cfdb218e
2 changed files with 5 additions and 4 deletions

View File

@ -36,9 +36,12 @@ public class replanting {
target.getLocation().getWorld().dropItem(loc, new ItemStack(item[0]));
}
if (amount.length > 1) {
for (int i = 0; i < amount[1]; i++) {
target.getLocation().getWorld().dropItem(loc, new ItemStack(item[1]));
}
}
crop.setAge(0);
target.setBlockData(crop);
}

View File

@ -1,6 +1,5 @@
package de.steev.bm.Listener;
import de.steev.bm.BetterMinecraft;
import de.steev.bm.Manager.GameManager;
import org.bukkit.Bukkit;
import org.bukkit.World;
@ -49,5 +48,4 @@ public class BedListener implements Listener {
this.gameManager.getPlugin().playerInBed = 0;
}
}
}