mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
Did the requested change.
This commit is contained in:
parent
dffc5758e2
commit
305dd57b39
@ -32,11 +32,9 @@ public class WindStaff extends SimpleSlimefunItem<ItemUseHandler> {
|
||||
FoodLevelChangeEvent event = new FoodLevelChangeEvent(p, p.getFoodLevel() - 2);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
|
||||
if (event.isCancelled()) {
|
||||
SlimefunPlugin.getLocalization().sendMessage(p, "messages.wind-staff-fail", true);
|
||||
return;
|
||||
if (!event.isCancelled()) {
|
||||
p.setFoodLevel(event.getFoodLevel());
|
||||
}
|
||||
p.setFoodLevel(event.getFoodLevel());
|
||||
}
|
||||
|
||||
p.setVelocity(p.getEyeLocation().getDirection().multiply(4));
|
||||
|
Loading…
Reference in New Issue
Block a user