Fixed NoCheat issue (again).

This commit is contained in:
GJ 2012-03-06 14:27:34 -05:00
parent 798cc3bbb3
commit d401a69560
3 changed files with 10 additions and 5 deletions

View File

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

View File

@ -264,6 +264,7 @@ public class WoodCutting
PlayerAnimationEvent armswing = new PlayerAnimationEvent(player);
Bukkit.getPluginManager().callEvent(armswing);
if(LoadProperties.woodcuttingrequiresaxe)
Skills.abilityDurabilityLoss(player.getItemInHand(), LoadProperties.abilityDurabilityLoss);
if(LoadProperties.spoutEnabled)
SpoutStuff.playSoundForPlayer(SoundEffect.POP, player, block.getLocation());