mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-11-23 02:35:22 +01:00
Fix for faction chat referring to all speakers as "you"
Fix for faction account being null from Register and triggering NPE with some economy plugins Updated Register lib
This commit is contained in:
parent
7ab784f02e
commit
d614dec781
BIN
lib/Register.jar
BIN
lib/Register.jar
Binary file not shown.
@ -1,6 +1,7 @@
|
||||
package com.massivecraft.factions;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
@ -88,6 +89,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);
|
||||
}
|
||||
|
@ -45,9 +45,10 @@ public class FactionsChatEarlyListener extends PlayerListener
|
||||
// Is it a faction chat message?
|
||||
if (me.getChatMode() == ChatMode.FACTION)
|
||||
{
|
||||
|
||||
String message = String.format(Conf.factionChatFormat, me.describeTo(me), msg);
|
||||
me.getFaction().sendMessage(message);
|
||||
Faction myFaction = me.getFaction();
|
||||
|
||||
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