Only handle faction tags. No standard ones.
This commit is contained in:
parent
e9b2b4ee66
commit
5e481d4120
@ -109,7 +109,7 @@ public class ConfServer extends SimpleConfig
|
|||||||
// We offer a simple standard way to set the format
|
// We offer a simple standard way to set the format
|
||||||
public static boolean chatSetFormat = false;
|
public static boolean chatSetFormat = false;
|
||||||
public static EventPriority chatSetFormatAt = EventPriority.LOWEST;
|
public static EventPriority chatSetFormatAt = EventPriority.LOWEST;
|
||||||
public static String chatSetFormatTo = "<{faction_relcolor}§l{faction_roleprefix}§r{faction_relcolor}{faction_tag_pr}§f%s> %s";
|
public static String chatSetFormatTo = "<§l{factions_roleprefix}§r{factions_relcolor}{factions_tag|rp}§f%1$s> %2$s";
|
||||||
|
|
||||||
// We offer a simple standard way to parse the chat tags
|
// We offer a simple standard way to parse the chat tags
|
||||||
public static boolean chatParseTags = true;
|
public static boolean chatParseTags = true;
|
||||||
|
@ -6,6 +6,18 @@ import com.massivecraft.factions.adapters.FFlagAdapter;
|
|||||||
import com.massivecraft.factions.adapters.FPermAdapter;
|
import com.massivecraft.factions.adapters.FPermAdapter;
|
||||||
import com.massivecraft.factions.adapters.RelAdapter;
|
import com.massivecraft.factions.adapters.RelAdapter;
|
||||||
import com.massivecraft.factions.adapters.TerritoryAccessAdapter;
|
import com.massivecraft.factions.adapters.TerritoryAccessAdapter;
|
||||||
|
import com.massivecraft.factions.chat.modifier.ChatModifierLc;
|
||||||
|
import com.massivecraft.factions.chat.modifier.ChatModifierLp;
|
||||||
|
import com.massivecraft.factions.chat.modifier.ChatModifierParse;
|
||||||
|
import com.massivecraft.factions.chat.modifier.ChatModifierRp;
|
||||||
|
import com.massivecraft.factions.chat.modifier.ChatModifierUc;
|
||||||
|
import com.massivecraft.factions.chat.modifier.ChatModifierUcf;
|
||||||
|
import com.massivecraft.factions.chat.tag.ChatTagRelcolor;
|
||||||
|
import com.massivecraft.factions.chat.tag.ChatTagRole;
|
||||||
|
import com.massivecraft.factions.chat.tag.ChatTagRoleprefix;
|
||||||
|
import com.massivecraft.factions.chat.tag.ChatTagTag;
|
||||||
|
import com.massivecraft.factions.chat.tag.ChatTagTagforce;
|
||||||
|
import com.massivecraft.factions.chat.tag.ChatTagTitle;
|
||||||
import com.massivecraft.factions.cmd.*;
|
import com.massivecraft.factions.cmd.*;
|
||||||
import com.massivecraft.factions.integration.herochat.HerochatFeatures;
|
import com.massivecraft.factions.integration.herochat.HerochatFeatures;
|
||||||
import com.massivecraft.factions.integration.Econ;
|
import com.massivecraft.factions.integration.Econ;
|
||||||
@ -67,21 +79,7 @@ public class Factions extends MPlugin
|
|||||||
this.outerCmdFactions = new CmdFactions();
|
this.outerCmdFactions = new CmdFactions();
|
||||||
this.outerCmdFactions.register(this);
|
this.outerCmdFactions.register(this);
|
||||||
|
|
||||||
SpoutFeatures.setup();
|
// Setup Listeners
|
||||||
Econ.setup();
|
|
||||||
HerochatFeatures.setup();
|
|
||||||
LWCFeatures.setup();
|
|
||||||
|
|
||||||
if (ConfServer.worldGuardChecking)
|
|
||||||
{
|
|
||||||
Worldguard.init(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Schedule recurring non-tps-dependent tasks
|
|
||||||
AutoLeaveTask.get().schedule(this);
|
|
||||||
EconLandRewardTask.get().schedule(this);
|
|
||||||
|
|
||||||
// Register Event Handlers
|
|
||||||
FactionsListenerMain.get().setup();
|
FactionsListenerMain.get().setup();
|
||||||
FactionsListenerChat.get().setup();
|
FactionsListenerChat.get().setup();
|
||||||
FactionsListenerExploit.get().setup();
|
FactionsListenerExploit.get().setup();
|
||||||
@ -93,6 +91,37 @@ public class Factions extends MPlugin
|
|||||||
this.entityListener = new TodoFactionsEntityListener();
|
this.entityListener = new TodoFactionsEntityListener();
|
||||||
getServer().getPluginManager().registerEvents(this.entityListener, this);
|
getServer().getPluginManager().registerEvents(this.entityListener, this);
|
||||||
|
|
||||||
|
// Schedule recurring non-tps-dependent tasks
|
||||||
|
AutoLeaveTask.get().schedule(this);
|
||||||
|
EconLandRewardTask.get().schedule(this);
|
||||||
|
|
||||||
|
// Register built in chat modifiers
|
||||||
|
ChatModifierLc.get().register();
|
||||||
|
ChatModifierLp.get().register();
|
||||||
|
ChatModifierParse.get().register();
|
||||||
|
ChatModifierRp.get().register();
|
||||||
|
ChatModifierUc.get().register();
|
||||||
|
ChatModifierUcf.get().register();
|
||||||
|
|
||||||
|
// Register built in chat tags
|
||||||
|
ChatTagRelcolor.get().register();
|
||||||
|
ChatTagRole.get().register();
|
||||||
|
ChatTagRoleprefix.get().register();
|
||||||
|
ChatTagTag.get().register();
|
||||||
|
ChatTagTagforce.get().register();
|
||||||
|
ChatTagTitle.get().register();
|
||||||
|
|
||||||
|
// Integrate
|
||||||
|
SpoutFeatures.setup();
|
||||||
|
Econ.setup();
|
||||||
|
HerochatFeatures.setup();
|
||||||
|
LWCFeatures.setup();
|
||||||
|
|
||||||
|
if (ConfServer.worldGuardChecking)
|
||||||
|
{
|
||||||
|
Worldguard.init(this);
|
||||||
|
}
|
||||||
|
|
||||||
postEnable();
|
postEnable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,15 +4,15 @@ import com.massivecraft.factions.FPlayer;
|
|||||||
import com.massivecraft.factions.FPlayerColl;
|
import com.massivecraft.factions.FPlayerColl;
|
||||||
import com.massivecraft.factions.chat.ChatTagAbstract;
|
import com.massivecraft.factions.chat.ChatTagAbstract;
|
||||||
|
|
||||||
public class ChatTagFactionRelcolor extends ChatTagAbstract
|
public class ChatTagRelcolor extends ChatTagAbstract
|
||||||
{
|
{
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// INSTANCE & CONSTRUCT
|
// INSTANCE & CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
private ChatTagFactionRelcolor() { super("factions_relcolor"); }
|
private ChatTagRelcolor() { super("factions_relcolor"); }
|
||||||
private static ChatTagFactionRelcolor i = new ChatTagFactionRelcolor();
|
private static ChatTagRelcolor i = new ChatTagRelcolor();
|
||||||
public static ChatTagFactionRelcolor get() { return i; }
|
public static ChatTagRelcolor get() { return i; }
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// OVERRIDE
|
// OVERRIDE
|
@ -5,15 +5,15 @@ import com.massivecraft.factions.FPlayerColl;
|
|||||||
import com.massivecraft.factions.chat.ChatTagAbstract;
|
import com.massivecraft.factions.chat.ChatTagAbstract;
|
||||||
import com.massivecraft.mcore.util.Txt;
|
import com.massivecraft.mcore.util.Txt;
|
||||||
|
|
||||||
public class ChatTagFactionRole extends ChatTagAbstract
|
public class ChatTagRole extends ChatTagAbstract
|
||||||
{
|
{
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// INSTANCE & CONSTRUCT
|
// INSTANCE & CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
private ChatTagFactionRole() { super("factions_role"); }
|
private ChatTagRole() { super("factions_role"); }
|
||||||
private static ChatTagFactionRole i = new ChatTagFactionRole();
|
private static ChatTagRole i = new ChatTagRole();
|
||||||
public static ChatTagFactionRole get() { return i; }
|
public static ChatTagRole get() { return i; }
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// OVERRIDE
|
// OVERRIDE
|
@ -4,15 +4,15 @@ import com.massivecraft.factions.FPlayer;
|
|||||||
import com.massivecraft.factions.FPlayerColl;
|
import com.massivecraft.factions.FPlayerColl;
|
||||||
import com.massivecraft.factions.chat.ChatTagAbstract;
|
import com.massivecraft.factions.chat.ChatTagAbstract;
|
||||||
|
|
||||||
public class ChatTagFactionRoleprefix extends ChatTagAbstract
|
public class ChatTagRoleprefix extends ChatTagAbstract
|
||||||
{
|
{
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// INSTANCE & CONSTRUCT
|
// INSTANCE & CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
private ChatTagFactionRoleprefix() { super("factions_roleprefix"); }
|
private ChatTagRoleprefix() { super("factions_roleprefix"); }
|
||||||
private static ChatTagFactionRoleprefix i = new ChatTagFactionRoleprefix();
|
private static ChatTagRoleprefix i = new ChatTagRoleprefix();
|
||||||
public static ChatTagFactionRoleprefix get() { return i; }
|
public static ChatTagRoleprefix get() { return i; }
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// OVERRIDE
|
// OVERRIDE
|
@ -1,26 +0,0 @@
|
|||||||
package com.massivecraft.factions.chat.tag;
|
|
||||||
|
|
||||||
import com.massivecraft.factions.chat.ChatTagAbstract;
|
|
||||||
import com.massivecraft.mcore.mixin.Mixin;
|
|
||||||
|
|
||||||
public class ChatTagSendee extends ChatTagAbstract
|
|
||||||
{
|
|
||||||
// -------------------------------------------- //
|
|
||||||
// INSTANCE & CONSTRUCT
|
|
||||||
// -------------------------------------------- //
|
|
||||||
|
|
||||||
private ChatTagSendee() { super("sendee"); }
|
|
||||||
private static ChatTagSendee i = new ChatTagSendee();
|
|
||||||
public static ChatTagSendee get() { return i; }
|
|
||||||
|
|
||||||
// -------------------------------------------- //
|
|
||||||
// OVERRIDE
|
|
||||||
// -------------------------------------------- //
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getReplacement(String senderId, String sendeeId, String recipientId)
|
|
||||||
{
|
|
||||||
return Mixin.getDisplayName(sendeeId);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,26 +0,0 @@
|
|||||||
package com.massivecraft.factions.chat.tag;
|
|
||||||
|
|
||||||
import com.massivecraft.factions.chat.ChatTagAbstract;
|
|
||||||
import com.massivecraft.mcore.mixin.Mixin;
|
|
||||||
|
|
||||||
public class ChatTagSendeeId extends ChatTagAbstract
|
|
||||||
{
|
|
||||||
// -------------------------------------------- //
|
|
||||||
// INSTANCE & CONSTRUCT
|
|
||||||
// -------------------------------------------- //
|
|
||||||
|
|
||||||
private ChatTagSendeeId() { super("sendeeid"); }
|
|
||||||
private static ChatTagSendeeId i = new ChatTagSendeeId();
|
|
||||||
public static ChatTagSendeeId get() { return i; }
|
|
||||||
|
|
||||||
// -------------------------------------------- //
|
|
||||||
// OVERRIDE
|
|
||||||
// -------------------------------------------- //
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getReplacement(String senderId, String sendeeId, String recipientId)
|
|
||||||
{
|
|
||||||
return Mixin.tryFix(sendeeId);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,26 +0,0 @@
|
|||||||
package com.massivecraft.factions.chat.tag;
|
|
||||||
|
|
||||||
import com.massivecraft.factions.chat.ChatTagAbstract;
|
|
||||||
import com.massivecraft.mcore.mixin.Mixin;
|
|
||||||
|
|
||||||
public class ChatTagSender extends ChatTagAbstract
|
|
||||||
{
|
|
||||||
// -------------------------------------------- //
|
|
||||||
// INSTANCE & CONSTRUCT
|
|
||||||
// -------------------------------------------- //
|
|
||||||
|
|
||||||
private ChatTagSender() { super("sender"); }
|
|
||||||
private static ChatTagSender i = new ChatTagSender();
|
|
||||||
public static ChatTagSender get() { return i; }
|
|
||||||
|
|
||||||
// -------------------------------------------- //
|
|
||||||
// OVERRIDE
|
|
||||||
// -------------------------------------------- //
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getReplacement(String senderId, String sendeeId, String recipientId)
|
|
||||||
{
|
|
||||||
return Mixin.getDisplayName(senderId);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,26 +0,0 @@
|
|||||||
package com.massivecraft.factions.chat.tag;
|
|
||||||
|
|
||||||
import com.massivecraft.factions.chat.ChatTagAbstract;
|
|
||||||
import com.massivecraft.mcore.mixin.Mixin;
|
|
||||||
|
|
||||||
public class ChatTagSenderId extends ChatTagAbstract
|
|
||||||
{
|
|
||||||
// -------------------------------------------- //
|
|
||||||
// INSTANCE & CONSTRUCT
|
|
||||||
// -------------------------------------------- //
|
|
||||||
|
|
||||||
private ChatTagSenderId() { super("senderid"); }
|
|
||||||
private static ChatTagSenderId i = new ChatTagSenderId();
|
|
||||||
public static ChatTagSenderId get() { return i; }
|
|
||||||
|
|
||||||
// -------------------------------------------- //
|
|
||||||
// OVERRIDE
|
|
||||||
// -------------------------------------------- //
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getReplacement(String senderId, String sendeeId, String recipientId)
|
|
||||||
{
|
|
||||||
return Mixin.tryFix(senderId);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -4,15 +4,15 @@ import com.massivecraft.factions.FPlayer;
|
|||||||
import com.massivecraft.factions.FPlayerColl;
|
import com.massivecraft.factions.FPlayerColl;
|
||||||
import com.massivecraft.factions.chat.ChatTagAbstract;
|
import com.massivecraft.factions.chat.ChatTagAbstract;
|
||||||
|
|
||||||
public class ChatTagFactionTag extends ChatTagAbstract
|
public class ChatTagTag extends ChatTagAbstract
|
||||||
{
|
{
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// INSTANCE & CONSTRUCT
|
// INSTANCE & CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
private ChatTagFactionTag() { super("factions_tag"); }
|
private ChatTagTag() { super("factions_tag"); }
|
||||||
private static ChatTagFactionTag i = new ChatTagFactionTag();
|
private static ChatTagTag i = new ChatTagTag();
|
||||||
public static ChatTagFactionTag get() { return i; }
|
public static ChatTagTag get() { return i; }
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// OVERRIDE
|
// OVERRIDE
|
@ -4,15 +4,15 @@ import com.massivecraft.factions.FPlayer;
|
|||||||
import com.massivecraft.factions.FPlayerColl;
|
import com.massivecraft.factions.FPlayerColl;
|
||||||
import com.massivecraft.factions.chat.ChatTagAbstract;
|
import com.massivecraft.factions.chat.ChatTagAbstract;
|
||||||
|
|
||||||
public class ChatTagFactionTagforce extends ChatTagAbstract
|
public class ChatTagTagforce extends ChatTagAbstract
|
||||||
{
|
{
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// INSTANCE & CONSTRUCT
|
// INSTANCE & CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
private ChatTagFactionTagforce() { super("factions_tagforce"); }
|
private ChatTagTagforce() { super("factions_tagforce"); }
|
||||||
private static ChatTagFactionTagforce i = new ChatTagFactionTagforce();
|
private static ChatTagTagforce i = new ChatTagTagforce();
|
||||||
public static ChatTagFactionTagforce get() { return i; }
|
public static ChatTagTagforce get() { return i; }
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// OVERRIDE
|
// OVERRIDE
|
@ -4,15 +4,15 @@ import com.massivecraft.factions.FPlayer;
|
|||||||
import com.massivecraft.factions.FPlayerColl;
|
import com.massivecraft.factions.FPlayerColl;
|
||||||
import com.massivecraft.factions.chat.ChatTagAbstract;
|
import com.massivecraft.factions.chat.ChatTagAbstract;
|
||||||
|
|
||||||
public class ChatTagFactionTitle extends ChatTagAbstract
|
public class ChatTagTitle extends ChatTagAbstract
|
||||||
{
|
{
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// INSTANCE & CONSTRUCT
|
// INSTANCE & CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
private ChatTagFactionTitle() { super("factions_title"); }
|
private ChatTagTitle() { super("factions_title"); }
|
||||||
private static ChatTagFactionTitle i = new ChatTagFactionTitle();
|
private static ChatTagTitle i = new ChatTagTitle();
|
||||||
public static ChatTagFactionTitle get() { return i; }
|
public static ChatTagTitle get() { return i; }
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// OVERRIDE
|
// OVERRIDE
|
Loading…
Reference in New Issue
Block a user