mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
Merge pull request #3067 from TheBentoBox/master
Fix 1.11 brewing, remove health bar from armor stands
This commit is contained in:
commit
e238ec8fc6
3
src/main/java/META-INF/MANIFEST.MF
Normal file
3
src/main/java/META-INF/MANIFEST.MF
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Manifest-Version: 1.0
|
||||||
|
Main-Class: com.gmail.nossr50.mcMMO
|
||||||
|
|
@ -5,7 +5,7 @@ import org.bukkit.event.inventory.BrewEvent;
|
|||||||
import org.bukkit.inventory.BrewerInventory;
|
import org.bukkit.inventory.BrewerInventory;
|
||||||
|
|
||||||
public class FakeBrewEvent extends BrewEvent {
|
public class FakeBrewEvent extends BrewEvent {
|
||||||
public FakeBrewEvent(Block brewer, BrewerInventory contents) {
|
public FakeBrewEvent(Block brewer, BrewerInventory contents, int fuelLevel) {
|
||||||
super(brewer, contents);
|
super(brewer, contents, fuelLevel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,17 +4,7 @@ import org.bukkit.Material;
|
|||||||
import org.bukkit.OfflinePlayer;
|
import org.bukkit.OfflinePlayer;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.enchantments.Enchantment;
|
import org.bukkit.enchantments.Enchantment;
|
||||||
import org.bukkit.entity.AnimalTamer;
|
import org.bukkit.entity.*;
|
||||||
import org.bukkit.entity.Arrow;
|
|
||||||
import org.bukkit.entity.Enderman;
|
|
||||||
import org.bukkit.entity.Entity;
|
|
||||||
import org.bukkit.entity.FallingBlock;
|
|
||||||
import org.bukkit.entity.LivingEntity;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.entity.Projectile;
|
|
||||||
import org.bukkit.entity.TNTPrimed;
|
|
||||||
import org.bukkit.entity.Tameable;
|
|
||||||
import org.bukkit.entity.Wolf;
|
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
@ -155,6 +145,10 @@ public class EntityListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event.getEntity() instanceof ArmorStand) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
double damage = event.getFinalDamage();
|
double damage = event.getFinalDamage();
|
||||||
Entity defender = event.getEntity();
|
Entity defender = event.getEntity();
|
||||||
Entity attacker = event.getDamager();
|
Entity attacker = event.getDamager();
|
||||||
|
@ -128,7 +128,7 @@ public final class AlchemyPotionBrewer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FakeBrewEvent event = new FakeBrewEvent(brewingStand.getBlock(), inventory);
|
FakeBrewEvent event = new FakeBrewEvent(brewingStand.getBlock(), inventory, ((BrewingStand) brewingStand).getFuelLevel());
|
||||||
mcMMO.p.getServer().getPluginManager().callEvent(event);
|
mcMMO.p.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (event.isCancelled() || inputList.isEmpty()) {
|
if (event.isCancelled() || inputList.isEmpty()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user