Stylistic and convention changes recommended by GJ

This commit is contained in:
Eric Hildebrand 2013-11-18 12:14:35 -05:00
parent c3801c7118
commit 1d7b102091
6 changed files with 21 additions and 26 deletions

View File

@ -361,10 +361,10 @@ public final class SQLDatabaseManager implements DatabaseManager {
try {
statement = connection.prepareStatement(
"SELECT "
+ "s.taming, s.mining, s.repair, s.woodcutting, s.unarmed, s.herbalism, s.excavation, s.archery, s.swords, s.axes, s.acrobatics, s.fishing, "
+ "e.taming, e.mining, e.repair, e.woodcutting, e.unarmed, e.herbalism, e.excavation, e.archery, e.swords, e.axes, e.acrobatics, e.fishing, "
+ "s.taming, s.mining, s.repair, s.woodcutting, s.unarmed, s.herbalism, s.excavation, s.archery, s.swords, s.axes, s.acrobatics, s.fishing, s.alchemy, "
+ "e.taming, e.mining, e.repair, e.woodcutting, e.unarmed, e.herbalism, e.excavation, e.archery, e.swords, e.axes, e.acrobatics, e.fishing, e.alchemy, "
+ "c.taming, c.mining, c.repair, c.woodcutting, c.unarmed, c.herbalism, c.excavation, c.archery, c.swords, c.axes, c.acrobatics, c.blast_mining, "
+ "h.mobhealthbar, s.alchemy, e.alchemy "
+ "h.mobhealthbar "
+ "FROM " + tablePrefix + "users u "
+ "JOIN " + tablePrefix + "skills s ON (u.id = s.user_id) "
+ "JOIN " + tablePrefix + "experience e ON (u.id = e.user_id) "
@ -437,10 +437,10 @@ public final class SQLDatabaseManager implements DatabaseManager {
try {
statement = connection.prepareStatement(
"SELECT "
+ "s.taming, s.mining, s.repair, s.woodcutting, s.unarmed, s.herbalism, s.excavation, s.archery, s.swords, s.axes, s.acrobatics, s.fishing, "
+ "e.taming, e.mining, e.repair, e.woodcutting, e.unarmed, e.herbalism, e.excavation, e.archery, e.swords, e.axes, e.acrobatics, e.fishing, "
+ "s.taming, s.mining, s.repair, s.woodcutting, s.unarmed, s.herbalism, s.excavation, s.archery, s.swords, s.axes, s.acrobatics, s.fishing, s.alchemy, "
+ "e.taming, e.mining, e.repair, e.woodcutting, e.unarmed, e.herbalism, e.excavation, e.archery, e.swords, e.axes, e.acrobatics, e.fishing, e.alchemy, "
+ "c.taming, c.mining, c.repair, c.woodcutting, c.unarmed, c.herbalism, c.excavation, c.archery, c.swords, c.axes, c.acrobatics, c.blast_mining, "
+ "h.mobhealthbar, s.alchemy, e.alchemy "
+ "h.mobhealthbar "
+ "FROM " + tablePrefix + "users u "
+ "JOIN " + tablePrefix + "skills s ON (u.id = s.user_id) "
+ "JOIN " + tablePrefix + "experience e ON (u.id = e.user_id) "

View File

@ -10,22 +10,22 @@ import org.bukkit.inventory.meta.PotionMeta;
import org.bukkit.potion.PotionEffect;
public class AlchemyPotion {
private short data_value;
private short dataValue;
private String name;
private List<String> lore;
private List<PotionEffect> effects;
private Map<ItemStack, Short> children;
public AlchemyPotion(short data_value, String name, List<String> lore, List<PotionEffect> effects, Map<ItemStack, Short> children) {
this.setDataValue(data_value);
this.setLore(lore);
this.setName(name);
this.setEffects(effects);
this.setChildren(children);
public AlchemyPotion(short dataValue, String name, List<String> lore, List<PotionEffect> effects, Map<ItemStack, Short> children) {
this.dataValue = dataValue;
this.lore = lore;
this.name = name;
this.effects = effects;
this.children = children;
}
public String toString() {
return "AlchemyPotion{" + data_value + "," + name + ",Effects[" + effects.size() + "], Children[" + children.size() + "]}";
return "AlchemyPotion{" + dataValue + "," + name + ",Effects[" + effects.size() + "], Children[" + children.size() + "]}";
}
public ItemStack toItemStack() {
@ -49,11 +49,11 @@ public class AlchemyPotion {
}
public short getDataValue() {
return data_value;
return dataValue;
}
public void setDataValue(short data_value) {
this.data_value = data_value;
this.dataValue = data_value;
}
public String getName() {

View File

@ -15,7 +15,7 @@ public class McMMOPlayerBrewEvent extends McMMOPlayerSkillEvent implements Cance
public McMMOPlayerBrewEvent(Player player, Block brewingStand) {
super(player, SkillType.ALCHEMY);
this.setBrewingStandBlock(brewingStand);
this.brewingStand = brewingStand;
cancelled = false;
}
@ -31,10 +31,6 @@ public class McMMOPlayerBrewEvent extends McMMOPlayerSkillEvent implements Cance
return brewingStand;
}
public void setBrewingStandBlock(Block brewingStand) {
this.brewingStand = brewingStand;
}
public BrewingStand getBrewingStand() {
return brewingStand.getState() instanceof BrewingStand ? (BrewingStand) brewingStand.getState() : null;
}

View File

@ -13,7 +13,7 @@ public class McMMOPlayerCatalysisEvent extends McMMOPlayerSkillEvent implements
public McMMOPlayerCatalysisEvent(Player player, double speed) {
super(player, SkillType.ALCHEMY);
this.setSpeed(speed);
this.speed = speed;
cancelled = false;
}

View File

@ -224,7 +224,6 @@ public final class AlchemyPotionBrewer {
Bukkit.getScheduler().scheduleSyncDelayedTask(mcMMO.p, new PlayerUpdateInventoryTask(player));
}
@SuppressWarnings("deprecation")
public static void handleInventoryClick(InventoryClickEvent event) {
Player player = event.getWhoClicked() instanceof Player ? (Player) event.getWhoClicked() : null;
BrewingStand brewingStand = (BrewingStand) event.getInventory().getHolder();