1
0
mirror of https://github.com/mcMMO-Dev/mcMMO.git synced 2026-02-21 11:13:00 +01:00

== is faster than .equals() for enums.

This commit is contained in:
GJ
2013-02-04 11:35:52 -05:00
parent 49de6614c0
commit 4aceadd777
7 changed files with 11 additions and 11 deletions

View File

@@ -312,7 +312,7 @@ public final class BlockChecks {
}
public static boolean isLog(Block block) {
if (block.getType().equals(Material.LOG) || (configInstance.getBlockModsEnabled() && ModChecks.isCustomLogBlock(block))) {
if (block.getType() == Material.LOG || (configInstance.getBlockModsEnabled() && ModChecks.isCustomLogBlock(block))) {
return true;
}
@@ -320,7 +320,7 @@ public final class BlockChecks {
}
public static boolean isLeaves(Block block) {
if (block.getType().equals(Material.LEAVES) || (configInstance.getBlockModsEnabled() && ModChecks.isCustomLeafBlock(block))) {
if (block.getType() == Material.LEAVES || (configInstance.getBlockModsEnabled() && ModChecks.isCustomLeafBlock(block))) {
return true;
}