Let's see if we still need this dependency :D

This commit is contained in:
h31ix committed 2012-09-09 14:19:51 -04:00
1 parent 8120050d39
commit f850c3ab96
3 files changed
+2 -27

No files matched your search

-7
View File
@@ -46,12 +46,5 @@
<type>jar</type> <type>jar</type>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency>
<groupId>com.gmail.nossr50</groupId>
<artifactId>mcMMO</artifactId>
<version>1.3.08</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>
@@ -294,7 +294,7 @@ public class Backend
public boolean checkLongReachBlock(Player player, double x, double y, double z) public boolean checkLongReachBlock(Player player, double x, double y, double z)
{ {
return !Utilities.isUsingMcMMOAbility(player) && (x >= BLOCK_MAX_DISTANCE || y > BLOCK_MAX_DISTANCE || z > BLOCK_MAX_DISTANCE); return (x >= BLOCK_MAX_DISTANCE || y > BLOCK_MAX_DISTANCE || z > BLOCK_MAX_DISTANCE);
} }
public boolean checkLongReachDamage(double x, double y, double z) public boolean checkLongReachDamage(double x, double y, double z)
@@ -745,12 +745,10 @@ public class Backend
public boolean checkSwing(Player player, Block block) public boolean checkSwing(Player player, Block block)
{ {
return !player.getInventory().getItemInHand().containsEnchantment(Enchantment.DIG_SPEED) && !Utilities.isInstantBreak(block.getType()) && !justAnimated(player) && !Utilities.isUsingMcMMOAbility(player) && !(player.getInventory().getItemInHand().getType() == Material.SHEARS && block.getType() == Material.LEAVES); return !player.getInventory().getItemInHand().containsEnchantment(Enchantment.DIG_SPEED) && !(player.getInventory().getItemInHand().getType() == Material.SHEARS && block.getType() == Material.LEAVES);
} }
public boolean checkFastBreak(Player player, Block block) public boolean checkFastBreak(Player player, Block block)
{
if (!Utilities.isUsingMcMMOAbility(player))
{ {
int violations = FASTBREAK_MAXVIOLATIONS; int violations = FASTBREAK_MAXVIOLATIONS;
if (player.getGameMode() == GameMode.CREATIVE) if (player.getGameMode() == GameMode.CREATIVE)
@@ -812,7 +810,6 @@ public class Backend
} }
} }
} }
}
return false; return false;
} }
@@ -18,8 +18,6 @@
package net.h31ix.anticheat.util; package net.h31ix.anticheat.util;
import com.gmail.nossr50.datatypes.AbilityType;
import com.gmail.nossr50.mcMMO;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
@@ -110,19 +108,6 @@ public final class Utilities
return block.getType() == lily || block.getRelative(BlockFace.NORTH).getType() == lily || block.getRelative(BlockFace.SOUTH).getType() == lily || block.getRelative(BlockFace.EAST).getType() == lily || block.getRelative(BlockFace.WEST).getType() == lily; return block.getType() == lily || block.getRelative(BlockFace.NORTH).getType() == lily || block.getRelative(BlockFace.SOUTH).getType() == lily || block.getRelative(BlockFace.EAST).getType() == lily || block.getRelative(BlockFace.WEST).getType() == lily;
} }
public static boolean isUsingMcMMOAbility(Player player)
{
boolean b = false;
if (player.getServer().getPluginManager().getPlugin("mcMMO") != null)
{
if (mcMMO.p.getPlayerProfile(player).getAbilityMode(AbilityType.TREE_FELLER) || mcMMO.p.getPlayerProfile(player).getAbilityMode(AbilityType.SUPER_BREAKER) || mcMMO.p.getPlayerProfile(player).getAbilityMode(AbilityType.BERSERK) || mcMMO.p.getPlayerProfile(player).getAbilityMode(AbilityType.GIGA_DRILL_BREAKER) || mcMMO.p.getPlayerProfile(player).getAbilityMode(AbilityType.BLAST_MINING))
{
b = true;
}
}
return b;
}
public static boolean isSubmersed(Player player) public static boolean isSubmersed(Player player)
{ {
return player.getLocation().getBlock().isLiquid() && player.getLocation().getBlock().getRelative(BlockFace.UP).isLiquid(); return player.getLocation().getBlock().isLiquid() && player.getLocation().getBlock().getRelative(BlockFace.UP).isLiquid();