mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +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 {
|
||||
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) "
|
||||
|
@ -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() {
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
@ -330,9 +330,9 @@ public final class CommandRegistrationManager {
|
||||
PluginCommand command = mcMMO.p.getCommand("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;" +
|
||||
"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.quit;mcmmo.commands.party.rename;mcmmo.commands.party.unlock");
|
||||
"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.quit;mcmmo.commands.party.rename;mcmmo.commands.party.unlock");
|
||||
command.setPermissionMessage(permissionsMessage);
|
||||
command.setExecutor(new PartyCommand());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user