mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-25 02:04:44 +02:00
2.1.144
This commit is contained in:
@ -367,7 +367,7 @@ public class EntityListener implements Listener {
|
||||
Player defendingPlayer = (Player) defender;
|
||||
Player attackingPlayer;
|
||||
|
||||
//If the attacker is a Player or a projectile beloning to a player
|
||||
//If the attacker is a Player or a projectile belonging to a player
|
||||
if(attacker instanceof Projectile || attacker instanceof Player) {
|
||||
if(attacker instanceof Projectile) {
|
||||
Projectile projectile = (Projectile) attacker;
|
||||
|
@ -711,7 +711,7 @@ public class PlayerListener implements Listener {
|
||||
*
|
||||
* @param event The event to monitor
|
||||
*/
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void onPlayerInteractMonitor(PlayerInteractEvent event) {
|
||||
/* WORLD BLACKLIST CHECK */
|
||||
if(WorldBlacklist.isWorldBlacklisted(event.getPlayer().getWorld()))
|
||||
@ -804,7 +804,8 @@ public class PlayerListener implements Listener {
|
||||
FakePlayerAnimationEvent fakeSwing = new FakePlayerAnimationEvent(event.getPlayer()); //PlayerAnimationEvent compat
|
||||
if (herbalismManager.canGreenThumbBlock(blockState)) {
|
||||
Bukkit.getPluginManager().callEvent(fakeSwing);
|
||||
player.getInventory().setItemInMainHand(new ItemStack(Material.WHEAT_SEEDS, heldItem.getAmount() - 1));
|
||||
player.getInventory().getItemInMainHand().setAmount(heldItem.getAmount() - 1);
|
||||
player.updateInventory();
|
||||
if (herbalismManager.processGreenThumbBlocks(blockState) && EventUtils.simulateBlockBreak(block, player, false)) {
|
||||
blockState.update(true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user