1.6.1 stuff
This commit is contained in:
parent
44241d87ba
commit
e0aaa395a7
@ -17,6 +17,7 @@ import com.massivecraft.factions.struct.Role;
|
||||
import com.massivecraft.factions.util.*;
|
||||
import com.massivecraft.factions.zcore.persist.Entity;
|
||||
import com.nijikokun.register.payment.Method.MethodAccount;
|
||||
import java.util.logging.Level;
|
||||
|
||||
|
||||
public class Faction extends Entity implements EconomyParticipator
|
||||
@ -122,6 +123,11 @@ public class Faction extends Entity implements EconomyParticipator
|
||||
// We need to override the default money given to players.
|
||||
if ( ! Econ.getMethod().hasAccount(aid))
|
||||
{
|
||||
if ( ! Econ.getMethod().createAccount(aid))
|
||||
{
|
||||
P.p.log(Level.SEVERE, "Error creating faction bank account through Register: "+aid);
|
||||
return null;
|
||||
}
|
||||
MethodAccount acc = Econ.getMethod().getAccount(aid);
|
||||
acc.set(0);
|
||||
}
|
||||
|
@ -19,6 +19,7 @@ import com.massivecraft.factions.iface.EconomyParticipator;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
import com.massivecraft.factions.util.RelationUtil;
|
||||
import java.util.logging.Level;
|
||||
|
||||
public class Econ
|
||||
{
|
||||
@ -81,6 +82,11 @@ public class Econ
|
||||
|
||||
public static void sendBalanceInfo(FPlayer to, EconomyParticipator about)
|
||||
{
|
||||
if (!shouldBeUsed())
|
||||
{
|
||||
P.p.log(Level.WARNING, "Register does not appear to be hooked into an economy plugin.");
|
||||
return;
|
||||
}
|
||||
to.msg("<a>%s's<i> balance is <h>%s<i>.", about.describeTo(to, true), Econ.moneyString(about.getAccount().balance()));
|
||||
}
|
||||
|
||||
|
@ -45,9 +45,10 @@ public class FactionsChatEarlyListener extends PlayerListener
|
||||
// Is it a faction chat message?
|
||||
if (me.getChatMode() == ChatMode.FACTION)
|
||||
{
|
||||
Faction myFaction = me.getFaction();
|
||||
|
||||
String message = String.format(Conf.factionChatFormat, me.describeTo(me), msg);
|
||||
me.getFaction().sendMessage(message);
|
||||
String message = String.format(Conf.factionChatFormat, me.describeTo(myFaction), msg);
|
||||
myFaction.sendMessage(message);
|
||||
|
||||
P.p.log(Level.INFO, ChatColor.stripColor("FactionChat "+me.getFaction().getTag()+": "+message));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user