mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-11-30 14:13:52 +01:00
Fixed error when no parameter given to f balance.
This commit is contained in:
parent
9f8f125a92
commit
d718e8bddc
@ -1,5 +1,7 @@
|
|||||||
package com.massivecraft.factions.commands;
|
package com.massivecraft.factions.commands;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.massivecraft.factions.Conf;
|
import com.massivecraft.factions.Conf;
|
||||||
import com.massivecraft.factions.Econ;
|
import com.massivecraft.factions.Econ;
|
||||||
import com.massivecraft.factions.Faction;
|
import com.massivecraft.factions.Faction;
|
||||||
@ -25,10 +27,15 @@ public class FCommandBalance extends FBaseCommand {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String factionName = parameters.get(0);
|
Faction faction;
|
||||||
Faction faction = findFaction(factionName, true);
|
|
||||||
|
|
||||||
sendMessage(Conf.colorChrome+faction.getTag()+"'s balance: "+ Econ.moneyString(faction.getMoney()));
|
if (parameters.size() > 0) {
|
||||||
|
faction = findFaction(parameters.get(0), true);
|
||||||
|
} else {
|
||||||
|
faction = me.getFaction();
|
||||||
|
}
|
||||||
|
|
||||||
|
sendMessage(Conf.colorChrome+faction.getTag()+" balance: "+ Econ.moneyString(faction.getMoney()));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user