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 { try {
statement = connection.prepareStatement( statement = connection.prepareStatement(
"SELECT " "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, " + "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.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, " + "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 " + "FROM " + tablePrefix + "users u "
+ "JOIN " + tablePrefix + "skills s ON (u.id = s.user_id) " + "JOIN " + tablePrefix + "skills s ON (u.id = s.user_id) "
+ "JOIN " + tablePrefix + "experience e ON (u.id = e.user_id) " + "JOIN " + tablePrefix + "experience e ON (u.id = e.user_id) "
@ -437,10 +437,10 @@ public final class SQLDatabaseManager implements DatabaseManager {
try { try {
statement = connection.prepareStatement( statement = connection.prepareStatement(
"SELECT " "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, " + "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.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, " + "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 " + "FROM " + tablePrefix + "users u "
+ "JOIN " + tablePrefix + "skills s ON (u.id = s.user_id) " + "JOIN " + tablePrefix + "skills s ON (u.id = s.user_id) "
+ "JOIN " + tablePrefix + "experience e ON (u.id = e.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; import org.bukkit.potion.PotionEffect;
public class AlchemyPotion { public class AlchemyPotion {
private short data_value; private short dataValue;
private String name; private String name;
private List<String> lore; private List<String> lore;
private List<PotionEffect> effects; private List<PotionEffect> effects;
private Map<ItemStack, Short> children; private Map<ItemStack, Short> children;
public AlchemyPotion(short data_value, String name, List<String> lore, List<PotionEffect> effects, Map<ItemStack, Short> children) { public AlchemyPotion(short dataValue, String name, List<String> lore, List<PotionEffect> effects, Map<ItemStack, Short> children) {
this.setDataValue(data_value); this.dataValue = dataValue;
this.setLore(lore); this.lore = lore;
this.setName(name); this.name = name;
this.setEffects(effects); this.effects = effects;
this.setChildren(children); this.children = children;
} }
public String toString() { 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() { public ItemStack toItemStack() {
@ -49,11 +49,11 @@ public class AlchemyPotion {
} }
public short getDataValue() { public short getDataValue() {
return data_value; return dataValue;
} }
public void setDataValue(short data_value) { public void setDataValue(short data_value) {
this.data_value = data_value; this.dataValue = data_value;
} }
public String getName() { public String getName() {

View File

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

View File

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

View File

@ -330,9 +330,9 @@ public final class CommandRegistrationManager {
PluginCommand command = mcMMO.p.getCommand("party"); PluginCommand command = mcMMO.p.getCommand("party");
command.setDescription(LocaleLoader.getString("Commands.Description.party")); command.setDescription(LocaleLoader.getString("Commands.Description.party"));
command.setPermission("mcmmo.commands.party;mcmmo.commands.party.accept;mcmmo.commands.party.create;mcmmo.commands.party.disband;" + command.setPermission("mcmmo.commands.party;mcmmo.commands.party.accept;mcmmo.commands.party.create;mcmmo.commands.party.disband;" +
"mcmmo.commands.party.expshare;mcmmo.commands.party.invite;mcmmo.commands.party.itemshare;mcmmo.commands.party.join;" + "mcmmo.commands.party.expshare;mcmmo.commands.party.invite;mcmmo.commands.party.itemshare;mcmmo.commands.party.join;" +
"mcmmo.commands.party.kick;mcmmo.commands.party.lock;mcmmo.commands.party.owner;mcmmo.commands.party.password;" + "mcmmo.commands.party.kick;mcmmo.commands.party.lock;mcmmo.commands.party.owner;mcmmo.commands.party.password;" +
"mcmmo.commands.party.quit;mcmmo.commands.party.rename;mcmmo.commands.party.unlock"); "mcmmo.commands.party.quit;mcmmo.commands.party.rename;mcmmo.commands.party.unlock");
command.setPermissionMessage(permissionsMessage); command.setPermissionMessage(permissionsMessage);
command.setExecutor(new PartyCommand()); command.setExecutor(new PartyCommand());
} }