Just started adding in the universe toggle.
This commit is contained in:
parent
8fd088e291
commit
ac2c7c705c
@ -2,6 +2,7 @@ package com.massivecraft.factions.chat.tag;
|
||||
|
||||
import com.massivecraft.factions.chat.ChatTagAbstract;
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
import com.massivecraft.factions.entity.UConf;
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
|
||||
public class ChatTagName extends ChatTagAbstract
|
||||
@ -21,6 +22,7 @@ public class ChatTagName extends ChatTagAbstract
|
||||
@Override
|
||||
public String getReplacement(UPlayer fsender, UPlayer frecipient)
|
||||
{
|
||||
if (!UConf.get(fsender).enabled) return "";
|
||||
Faction faction = fsender.getFaction();
|
||||
if (faction.isNone()) return "";
|
||||
return faction.getName();
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.massivecraft.factions.chat.tag;
|
||||
|
||||
import com.massivecraft.factions.chat.ChatTagAbstract;
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
import com.massivecraft.factions.entity.UConf;
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
|
||||
public class ChatTagNameforce extends ChatTagAbstract
|
||||
@ -20,7 +22,9 @@ public class ChatTagNameforce extends ChatTagAbstract
|
||||
@Override
|
||||
public String getReplacement(UPlayer fsender, UPlayer frecipient)
|
||||
{
|
||||
return fsender.getFaction().getName();
|
||||
if (!UConf.get(fsender).enabled) return "";
|
||||
Faction faction = fsender.getFaction();
|
||||
return faction.getName();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.massivecraft.factions.chat.tag;
|
||||
|
||||
import com.massivecraft.factions.chat.ChatTagAbstract;
|
||||
import com.massivecraft.factions.entity.UConf;
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
|
||||
public class ChatTagRelcolor extends ChatTagAbstract
|
||||
@ -20,7 +21,8 @@ public class ChatTagRelcolor extends ChatTagAbstract
|
||||
@Override
|
||||
public String getReplacement(UPlayer fsender, UPlayer frecipient)
|
||||
{
|
||||
if (fsender == null) return "";
|
||||
if (!UConf.get(fsender).enabled) return "";
|
||||
|
||||
if (frecipient == null) return "";
|
||||
|
||||
return frecipient.getRelationTo(fsender).getColor().toString();
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.massivecraft.factions.chat.tag;
|
||||
|
||||
import com.massivecraft.factions.chat.ChatTagAbstract;
|
||||
import com.massivecraft.factions.entity.UConf;
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
import com.massivecraft.mcore.util.Txt;
|
||||
|
||||
@ -21,6 +22,8 @@ public class ChatTagRole extends ChatTagAbstract
|
||||
@Override
|
||||
public String getReplacement(UPlayer fsender, UPlayer frecipient)
|
||||
{
|
||||
if (!UConf.get(fsender).enabled) return "";
|
||||
|
||||
return Txt.upperCaseFirst(fsender.getRole().toString().toLowerCase());
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.massivecraft.factions.chat.tag;
|
||||
|
||||
import com.massivecraft.factions.chat.ChatTagAbstract;
|
||||
import com.massivecraft.factions.entity.UConf;
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
|
||||
public class ChatTagRoleprefix extends ChatTagAbstract
|
||||
@ -20,6 +21,8 @@ public class ChatTagRoleprefix extends ChatTagAbstract
|
||||
@Override
|
||||
public String getReplacement(UPlayer fsender, UPlayer frecipient)
|
||||
{
|
||||
if (!UConf.get(fsender).enabled) return "";
|
||||
|
||||
return fsender.getRole().getPrefix();
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.massivecraft.factions.chat.tag;
|
||||
|
||||
import com.massivecraft.factions.chat.ChatTagAbstract;
|
||||
import com.massivecraft.factions.entity.UConf;
|
||||
import com.massivecraft.factions.entity.UPlayer;
|
||||
|
||||
public class ChatTagTitle extends ChatTagAbstract
|
||||
@ -20,6 +21,8 @@ public class ChatTagTitle extends ChatTagAbstract
|
||||
@Override
|
||||
public String getReplacement(UPlayer fsender, UPlayer frecipient)
|
||||
{
|
||||
if (!UConf.get(fsender).enabled) return "";
|
||||
|
||||
if (!fsender.hasTitle()) return "";
|
||||
return fsender.getTitle();
|
||||
}
|
||||
|
@ -24,6 +24,12 @@ public class UConf extends Entity<UConf>
|
||||
return UConfColls.get().get2(oid);
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// UNIVERSE ENABLE SWITCH
|
||||
// -------------------------------------------- //
|
||||
|
||||
public boolean enabled = true;
|
||||
|
||||
// -------------------------------------------- //
|
||||
// SPECIAL FACTION IDS
|
||||
// -------------------------------------------- //
|
||||
|
Loading…
Reference in New Issue
Block a user