1
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:
LinoxGH 2020-08-30 18:25:08 +03:00 committed by GitHub
parent dffc5758e2
commit 305dd57b39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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));