Small Fixes:

- Fixed 'attack-effects.yml' autogenerating itself
- Fixed UpgradingEdition back button
This commit is contained in:
Aria 2019-09-16 20:29:53 +02:00
parent 022c09d756
commit f91beaebfe
2 changed files with 3 additions and 3 deletions

View File

@ -153,12 +153,12 @@ public class ConfigManager {
ConfigFile attackEffects = new ConfigFile("/language", "attack-effects"); ConfigFile attackEffects = new ConfigFile("/language", "attack-effects");
for (StaffSpirit spirit : StaffSpirit.values()) { for (StaffSpirit spirit : StaffSpirit.values()) {
String path = spirit.name().toLowerCase().replace("_", "-"); String path = spirit.name().toLowerCase().replace("_", "-");
if (!attackEffects.getConfig().contains(path)) if (!attackEffects.getConfig().contains("staff-spirit." + path))
attackEffects.getConfig().set("staff-spirit." + path, "&7" + AltChar.listSquare + " " + spirit.getDefaultName()); attackEffects.getConfig().set("staff-spirit." + path, "&7" + AltChar.listSquare + " " + spirit.getDefaultName());
} }
for (LuteAttackEffect effect : LuteAttackEffect.values()) { for (LuteAttackEffect effect : LuteAttackEffect.values()) {
String path = effect.name().toLowerCase().replace("_", "-"); String path = effect.name().toLowerCase().replace("_", "-");
if (!attackEffects.getConfig().contains(path)) if (!attackEffects.getConfig().contains("lute-attack." + path))
attackEffects.getConfig().set("lute-attack." + path, "&7" + AltChar.listSquare + " " + effect.getDefaultName() + " Attacks"); attackEffects.getConfig().set("lute-attack." + path, "&7" + AltChar.listSquare + " " + effect.getDefaultName() + " Attacks");
} }
attackEffects.save(); attackEffects.save();

View File

@ -47,7 +47,7 @@ public class Upgrade_Stat extends ItemStat {
@Override @Override
public boolean whenClicked(EditionInventory inv, InventoryClickEvent event) { public boolean whenClicked(EditionInventory inv, InventoryClickEvent event) {
if (event.getAction() == InventoryAction.PICKUP_ALL) if (event.getAction() == InventoryAction.PICKUP_ALL)
new UpgradingEdition(inv.getPlayer(), inv.getItemType(), inv.getItemId()).open(); new UpgradingEdition(inv.getPlayer(), inv.getItemType(), inv.getItemId()).open(inv.getPreviousPage());
if (event.getAction() == InventoryAction.PICKUP_HALF) { if (event.getAction() == InventoryAction.PICKUP_HALF) {
ConfigFile config = inv.getItemType().getConfigFile(); ConfigFile config = inv.getItemType().getConfigFile();