mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Fixed NoCheat issue (again).
This commit is contained in:
parent
798cc3bbb3
commit
d401a69560
@ -16,6 +16,7 @@
|
||||
*/
|
||||
package com.gmail.nossr50.skills;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
@ -23,6 +24,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.getspout.spoutapi.sound.SoundEffect;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.event.player.PlayerAnimationEvent;
|
||||
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.m;
|
||||
@ -188,6 +190,7 @@ public class Mining
|
||||
Material type = block.getType();
|
||||
int tier = m.getTier(player);
|
||||
int durabilityLoss = LoadProperties.abilityDurabilityLoss;
|
||||
PlayerAnimationEvent armswing = new PlayerAnimationEvent(player);
|
||||
|
||||
switch(type)
|
||||
{
|
||||
@ -214,6 +217,7 @@ public class Mining
|
||||
case STONE:
|
||||
if((block.getData() == (byte) 5) || plugin.misc.blockWatchList.contains(block))
|
||||
return;
|
||||
Bukkit.getPluginManager().callEvent(armswing);
|
||||
Skills.abilityDurabilityLoss(player.getItemInHand(), durabilityLoss);
|
||||
blockProcCheck(block, player);
|
||||
blockProcCheck(block, player);
|
||||
|
@ -264,7 +264,8 @@ public class WoodCutting
|
||||
|
||||
PlayerAnimationEvent armswing = new PlayerAnimationEvent(player);
|
||||
Bukkit.getPluginManager().callEvent(armswing);
|
||||
Skills.abilityDurabilityLoss(player.getItemInHand(), LoadProperties.abilityDurabilityLoss);
|
||||
if(LoadProperties.woodcuttingrequiresaxe)
|
||||
Skills.abilityDurabilityLoss(player.getItemInHand(), LoadProperties.abilityDurabilityLoss);
|
||||
if(LoadProperties.spoutEnabled)
|
||||
SpoutStuff.playSoundForPlayer(SoundEffect.POP, player, block.getLocation());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user