Reformatted Code

This commit is contained in:
ProSavage
2018-11-06 23:38:43 -06:00
parent cd09e77b42
commit b1b9bd1b73
156 changed files with 1589 additions and 1593 deletions

View File

@@ -31,30 +31,30 @@ public class CmdBanner extends FCommand {
@Override
public void perform() {
if (! SavageFactions.plugin.getConfig().getBoolean("fbanners.Enabled")) {
if (! SavageFactions.plugin.getConfig().getBoolean("fbanners.Enabled")) {
msg(TL.COMMAND_BANNER_DISABLED);
return;
}
if (! fme.hasMoney(SavageFactions.plugin.getConfig().getInt("fbanners.Banner-Cost", 5000))) {
if (! fme.hasMoney(SavageFactions.plugin.getConfig().getInt("fbanners.Banner-Cost", 5000))) {
msg(TL.COMMAND_BANNER_NOTENOUGHMONEY);
return;
}
takeMoney(fme, SavageFactions.plugin.getConfig().getInt("fbanners.Banner-Cost", 5000));
takeMoney(fme, SavageFactions.plugin.getConfig().getInt("fbanners.Banner-Cost", 5000));
//ItemStack warBanner = SavageFactions.plugin.createItem(Material.BANNER, 1, (short) 1, SavageFactions.plugin.getConfig().getString("fbanners.Item.Name"), SavageFactions.plugin.getConfig().getStringList("fbanners.Item.Lore"));
//ItemStack warBanner = SavageFactions.plugin.createItem(Material.BANNER, 1, (short) 1, SavageFactions.plugin.getConfig().getString("fbanners.Item.Name"), SavageFactions.plugin.getConfig().getStringList("fbanners.Item.Lore"));
//BannerMeta bannerMeta = (BannerMeta) warBanner.getItemMeta();
ItemStack warBanner = fme.getFaction().getBanner();
if (warBanner != null) {
ItemMeta warmeta = warBanner.getItemMeta();
warmeta.setDisplayName(SavageFactions.plugin.color(SavageFactions.plugin.getConfig().getString("fbanners.Item.Name")));
warmeta.setLore(SavageFactions.plugin.colorList(SavageFactions.plugin.getConfig().getStringList("fbanners.Item.Lore")));
warmeta.setDisplayName(SavageFactions.plugin.color(SavageFactions.plugin.getConfig().getString("fbanners.Item.Name")));
warmeta.setLore(SavageFactions.plugin.colorList(SavageFactions.plugin.getConfig().getStringList("fbanners.Item.Lore")));
warBanner.setItemMeta(warmeta);
} else {
warBanner = SavageFactions.plugin.createItem(SavageFactions.plugin.BANNER, 1, (short) 1, SavageFactions.plugin.getConfig().getString("fbanners.Item.Name"), SavageFactions.plugin.getConfig().getStringList("fbanners.Item.Lore"));
warBanner = SavageFactions.plugin.createItem(SavageFactions.plugin.BANNER, 1, (short) 1, SavageFactions.plugin.getConfig().getString("fbanners.Item.Name"), SavageFactions.plugin.getConfig().getStringList("fbanners.Item.Lore"));
}
fme.msg(TL.COMMAND_BANNER_SUCCESS);
warBanner.setAmount(1);
@@ -63,7 +63,7 @@ public class CmdBanner extends FCommand {
public boolean hasMoney(FPlayer fme, int amt) {
Economy econ = SavageFactions.plugin.getEcon();
Economy econ = SavageFactions.plugin.getEcon();
if (econ.getBalance(fme.getPlayer()) >= amt) {
return true;
} else {
@@ -74,7 +74,7 @@ public class CmdBanner extends FCommand {
public void takeMoney(FPlayer fme, int amt) {
if (hasMoney(fme, amt)) {
Economy econ = SavageFactions.plugin.getEcon();
Economy econ = SavageFactions.plugin.getEcon();
econ.withdrawPlayer(fme.getPlayer(), amt);
fme.sendMessage(TL.COMMAND_BANNER_MONEYTAKE.toString().replace("{amount}", amt + ""));
}