mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-23 00:15:05 +00:00
earthgrab: skip tridents, check if arrows are allowed to be picked up
This commit is contained in:
parent
e09ea94629
commit
f67c098b0d
1 changed files with 7 additions and 6 deletions
|
@ -293,13 +293,14 @@ public class EarthGrab extends EarthAbility {
|
|||
continue;
|
||||
}
|
||||
if (entity instanceof Trident) {
|
||||
final Location l = entity.getLocation();
|
||||
entity.remove();
|
||||
entity = l.getWorld().dropItem(l, new ItemStack(Material.TRIDENT, 1));
|
||||
continue;
|
||||
} else if (entity instanceof Arrow) {
|
||||
final Location l = entity.getLocation();
|
||||
entity.remove();
|
||||
entity = l.getWorld().dropItem(l, new ItemStack(Material.ARROW, 1));
|
||||
Arrow arrow = (Arrow) entity;
|
||||
if (arrow.getPickupStatus() == Arrow.PickupStatus.ALLOWED) {
|
||||
final Location l = entity.getLocation();
|
||||
entity.remove();
|
||||
entity = l.getWorld().dropItem(l, new ItemStack(Material.ARROW, 1));
|
||||
}
|
||||
} else if (!(entity instanceof Item)) {
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue