Starting to rename fplayer --> uplayer since we will need an mplayer.
This commit is contained in:
@@ -8,7 +8,7 @@ import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import com.massivecraft.factions.entity.FPlayer;
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
|
||||
/**
|
||||
* The ChatFormater is a system offered by factions for tag parsing.
|
||||
@@ -102,7 +102,7 @@ public class ChatFormatter
|
||||
// FORMAT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public static String format(String msg, FPlayer fsender, FPlayer frecipient)
|
||||
public static String format(String msg, UPlayer fsender, UPlayer frecipient)
|
||||
{
|
||||
// We build the return value in this string buffer
|
||||
StringBuffer ret = new StringBuffer();
|
||||
@@ -159,7 +159,7 @@ public class ChatFormatter
|
||||
// TAG COMPUTE
|
||||
// -------------------------------------------- //
|
||||
|
||||
public static String compute(ChatTag tag, List<String> modifierIds, FPlayer fsender, FPlayer frecipient)
|
||||
public static String compute(ChatTag tag, List<String> modifierIds, UPlayer fsender, UPlayer frecipient)
|
||||
{
|
||||
String ret = tag.getReplacement(fsender, frecipient);
|
||||
if (ret == null) return null;
|
||||
|
@@ -1,12 +1,12 @@
|
||||
package com.massivecraft.factions.chat;
|
||||
|
||||
import com.massivecraft.factions.entity.FPlayer;
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
|
||||
|
||||
public interface ChatModifier
|
||||
{
|
||||
public String getId();
|
||||
public String getModified(String subject, FPlayer fsender, FPlayer frecipient);
|
||||
public String getModified(String subject, UPlayer fsender, UPlayer frecipient);
|
||||
public boolean register();
|
||||
public boolean unregister();
|
||||
}
|
||||
|
@@ -1,11 +1,11 @@
|
||||
package com.massivecraft.factions.chat;
|
||||
|
||||
import com.massivecraft.factions.entity.FPlayer;
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
|
||||
public interface ChatTag
|
||||
{
|
||||
public String getId();
|
||||
public String getReplacement(FPlayer fsender, FPlayer frecipient);
|
||||
public String getReplacement(UPlayer fsender, UPlayer frecipient);
|
||||
public boolean register();
|
||||
public boolean unregister();
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package com.massivecraft.factions.chat.modifier;
|
||||
|
||||
import com.massivecraft.factions.chat.ChatModifierAbstract;
|
||||
import com.massivecraft.factions.entity.FPlayer;
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
|
||||
public class ChatModifierLc extends ChatModifierAbstract
|
||||
{
|
||||
@@ -18,7 +18,7 @@ public class ChatModifierLc extends ChatModifierAbstract
|
||||
// -------------------------------------------- //
|
||||
|
||||
@Override
|
||||
public String getModified(String subject, FPlayer fsender, FPlayer frecipient)
|
||||
public String getModified(String subject, UPlayer fsender, UPlayer frecipient)
|
||||
{
|
||||
return subject.toLowerCase();
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package com.massivecraft.factions.chat.modifier;
|
||||
|
||||
import com.massivecraft.factions.chat.ChatModifierAbstract;
|
||||
import com.massivecraft.factions.entity.FPlayer;
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
|
||||
|
||||
public class ChatModifierLp extends ChatModifierAbstract
|
||||
@@ -19,7 +19,7 @@ public class ChatModifierLp extends ChatModifierAbstract
|
||||
// -------------------------------------------- //
|
||||
|
||||
@Override
|
||||
public String getModified(String subject, FPlayer fsender, FPlayer frecipient)
|
||||
public String getModified(String subject, UPlayer fsender, UPlayer frecipient)
|
||||
{
|
||||
if (subject.equals("")) return subject;
|
||||
return " "+subject;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package com.massivecraft.factions.chat.modifier;
|
||||
|
||||
import com.massivecraft.factions.chat.ChatModifierAbstract;
|
||||
import com.massivecraft.factions.entity.FPlayer;
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
import com.massivecraft.mcore.util.Txt;
|
||||
|
||||
public class ChatModifierParse extends ChatModifierAbstract
|
||||
@@ -19,7 +19,7 @@ public class ChatModifierParse extends ChatModifierAbstract
|
||||
// -------------------------------------------- //
|
||||
|
||||
@Override
|
||||
public String getModified(String subject, FPlayer fsender, FPlayer frecipient)
|
||||
public String getModified(String subject, UPlayer fsender, UPlayer frecipient)
|
||||
{
|
||||
return Txt.parse(subject);
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package com.massivecraft.factions.chat.modifier;
|
||||
|
||||
import com.massivecraft.factions.chat.ChatModifierAbstract;
|
||||
import com.massivecraft.factions.entity.FPlayer;
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
|
||||
public class ChatModifierRp extends ChatModifierAbstract
|
||||
{
|
||||
@@ -18,7 +18,7 @@ public class ChatModifierRp extends ChatModifierAbstract
|
||||
// -------------------------------------------- //
|
||||
|
||||
@Override
|
||||
public String getModified(String subject, FPlayer fsender, FPlayer frecipient)
|
||||
public String getModified(String subject, UPlayer fsender, UPlayer frecipient)
|
||||
{
|
||||
if (subject.equals("")) return subject;
|
||||
return subject+" ";
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package com.massivecraft.factions.chat.modifier;
|
||||
|
||||
import com.massivecraft.factions.chat.ChatModifierAbstract;
|
||||
import com.massivecraft.factions.entity.FPlayer;
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
|
||||
public class ChatModifierUc extends ChatModifierAbstract
|
||||
{
|
||||
@@ -18,7 +18,7 @@ public class ChatModifierUc extends ChatModifierAbstract
|
||||
// -------------------------------------------- //
|
||||
|
||||
@Override
|
||||
public String getModified(String subject, FPlayer fsender, FPlayer frecipient)
|
||||
public String getModified(String subject, UPlayer fsender, UPlayer frecipient)
|
||||
{
|
||||
return subject.toUpperCase();
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package com.massivecraft.factions.chat.modifier;
|
||||
|
||||
import com.massivecraft.factions.chat.ChatModifierAbstract;
|
||||
import com.massivecraft.factions.entity.FPlayer;
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
import com.massivecraft.mcore.util.Txt;
|
||||
|
||||
public class ChatModifierUcf extends ChatModifierAbstract
|
||||
@@ -19,7 +19,7 @@ public class ChatModifierUcf extends ChatModifierAbstract
|
||||
// -------------------------------------------- //
|
||||
|
||||
@Override
|
||||
public String getModified(String subject, FPlayer fsender, FPlayer frecipient)
|
||||
public String getModified(String subject, UPlayer fsender, UPlayer frecipient)
|
||||
{
|
||||
return Txt.upperCaseFirst(subject);
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package com.massivecraft.factions.chat.tag;
|
||||
|
||||
import com.massivecraft.factions.chat.ChatTagAbstract;
|
||||
import com.massivecraft.factions.entity.FPlayer;
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
|
||||
public class ChatTagRelcolor extends ChatTagAbstract
|
||||
{
|
||||
@@ -18,7 +18,7 @@ public class ChatTagRelcolor extends ChatTagAbstract
|
||||
// -------------------------------------------- //
|
||||
|
||||
@Override
|
||||
public String getReplacement(FPlayer fsender, FPlayer frecipient)
|
||||
public String getReplacement(UPlayer fsender, UPlayer frecipient)
|
||||
{
|
||||
if (fsender == null) return "";
|
||||
if (frecipient == null) return "";
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package com.massivecraft.factions.chat.tag;
|
||||
|
||||
import com.massivecraft.factions.chat.ChatTagAbstract;
|
||||
import com.massivecraft.factions.entity.FPlayer;
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
import com.massivecraft.mcore.util.Txt;
|
||||
|
||||
public class ChatTagRole extends ChatTagAbstract
|
||||
@@ -19,7 +19,7 @@ public class ChatTagRole extends ChatTagAbstract
|
||||
// -------------------------------------------- //
|
||||
|
||||
@Override
|
||||
public String getReplacement(FPlayer fsender, FPlayer frecipient)
|
||||
public String getReplacement(UPlayer fsender, UPlayer frecipient)
|
||||
{
|
||||
return Txt.upperCaseFirst(fsender.getRole().toString().toLowerCase());
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package com.massivecraft.factions.chat.tag;
|
||||
|
||||
import com.massivecraft.factions.chat.ChatTagAbstract;
|
||||
import com.massivecraft.factions.entity.FPlayer;
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
|
||||
public class ChatTagRoleprefix extends ChatTagAbstract
|
||||
{
|
||||
@@ -18,7 +18,7 @@ public class ChatTagRoleprefix extends ChatTagAbstract
|
||||
// -------------------------------------------- //
|
||||
|
||||
@Override
|
||||
public String getReplacement(FPlayer fsender, FPlayer frecipient)
|
||||
public String getReplacement(UPlayer fsender, UPlayer frecipient)
|
||||
{
|
||||
return fsender.getRole().getPrefix();
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package com.massivecraft.factions.chat.tag;
|
||||
|
||||
import com.massivecraft.factions.chat.ChatTagAbstract;
|
||||
import com.massivecraft.factions.entity.FPlayer;
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
|
||||
public class ChatTagTag extends ChatTagAbstract
|
||||
{
|
||||
@@ -18,7 +18,7 @@ public class ChatTagTag extends ChatTagAbstract
|
||||
// -------------------------------------------- //
|
||||
|
||||
@Override
|
||||
public String getReplacement(FPlayer fsender, FPlayer frecipient)
|
||||
public String getReplacement(UPlayer fsender, UPlayer frecipient)
|
||||
{
|
||||
if (!fsender.hasFaction()) return "";
|
||||
return fsender.getFaction().getTag();
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package com.massivecraft.factions.chat.tag;
|
||||
|
||||
import com.massivecraft.factions.chat.ChatTagAbstract;
|
||||
import com.massivecraft.factions.entity.FPlayer;
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
|
||||
public class ChatTagTagforce extends ChatTagAbstract
|
||||
{
|
||||
@@ -18,7 +18,7 @@ public class ChatTagTagforce extends ChatTagAbstract
|
||||
// -------------------------------------------- //
|
||||
|
||||
@Override
|
||||
public String getReplacement(FPlayer fsender, FPlayer frecipient)
|
||||
public String getReplacement(UPlayer fsender, UPlayer frecipient)
|
||||
{
|
||||
return fsender.getFaction().getTag();
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package com.massivecraft.factions.chat.tag;
|
||||
|
||||
import com.massivecraft.factions.chat.ChatTagAbstract;
|
||||
import com.massivecraft.factions.entity.FPlayer;
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
|
||||
public class ChatTagTitle extends ChatTagAbstract
|
||||
{
|
||||
@@ -18,7 +18,7 @@ public class ChatTagTitle extends ChatTagAbstract
|
||||
// -------------------------------------------- //
|
||||
|
||||
@Override
|
||||
public String getReplacement(FPlayer fsender, FPlayer frecipient)
|
||||
public String getReplacement(UPlayer fsender, UPlayer frecipient)
|
||||
{
|
||||
return fsender.getTitle();
|
||||
}
|
||||
|
Reference in New Issue
Block a user