mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 16:46:46 +01:00
Stylistic and convention changes recommended by GJ
This commit is contained in:
parent
c3801c7118
commit
1d7b102091
@ -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) "
|
||||||
|
@ -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() {
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user