Fix some missing default cases and possible fall-through issues.

This commit is contained in:
GJ 2013-02-13 16:34:36 -05:00
parent 3a919f3e4c
commit f4da69a205
6 changed files with 15 additions and 1 deletions

View File

@ -173,6 +173,7 @@ public final class Database {
write("ALTER TABLE `" + tablePrefix + "experience` ADD FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE;"); write("ALTER TABLE `" + tablePrefix + "experience` ADD FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE;");
write("ALTER TABLE `" + tablePrefix + "cooldowns` ADD FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE;"); write("ALTER TABLE `" + tablePrefix + "cooldowns` ADD FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE;");
write("ALTER TABLE `" + tablePrefix + "skills` ADD FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE;"); write("ALTER TABLE `" + tablePrefix + "skills` ADD FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE;");
break;
case FISHING: case FISHING:
sql = "SELECT * FROM `" + tablePrefix + "experience` ORDER BY `" + tablePrefix + "experience`.`fishing` ASC LIMIT 0 , 30"; sql = "SELECT * FROM `" + tablePrefix + "experience` ORDER BY `" + tablePrefix + "experience`.`fishing` ASC LIMIT 0 , 30";

View File

@ -86,6 +86,7 @@ public final class ShakeMob {
break; break;
} }
} }
break;
default: default:
break; break;

View File

@ -532,6 +532,8 @@ public final class CombatTools {
baseXP = configInstance.getSkeletonXP(); baseXP = configInstance.getSkeletonXP();
break; break;
} }
break;
case SLIME: case SLIME:
baseXP = configInstance.getSlimeXP(); baseXP = configInstance.getSlimeXP();
break; break;

View File

@ -42,6 +42,9 @@ public class XpBar {
case DISABLED: case DISABLED:
break; break;
default:
break;
} }
spoutPlayer.getMainScreen().setDirty(true); spoutPlayer.getMainScreen().setDirty(true);
@ -194,6 +197,9 @@ public class XpBar {
case DISABLED: case DISABLED:
break; break;
default:
break;
} }
} }

View File

@ -162,10 +162,12 @@ public final class BlockChecks {
return true; return true;
case SMOOTH_BRICK: case SMOOTH_BRICK:
case COBBLE_WALL: case COBBLE_WALL:
if (block.getData() == 0) { if (block.getData() == (byte)0x0) {
return true; return true;
} }
return false;
default: default:
return false; return false;
} }

View File

@ -564,6 +564,8 @@ public class ItemChecks {
return true; return true;
} }
return false;
default: default:
return false; return false;
} }