Remove Lang class. Constants belong in Factions and MPlayer accordingly.
This commit is contained in:
parent
83b12fddc8
commit
f32af6e02f
@ -1,10 +0,0 @@
|
|||||||
package com.massivecraft.factions;
|
|
||||||
|
|
||||||
import com.massivecraft.massivecore.util.Txt;
|
|
||||||
|
|
||||||
public class Lang
|
|
||||||
{
|
|
||||||
public static final String FACTION_NODESCRIPTION = Txt.parse("<em><silver>no description set");
|
|
||||||
public static final String FACTION_NOMOTD = Txt.parse("<em><silver>no message of the day set");
|
|
||||||
public static final String PLAYER_NOTITLE = Txt.parse("<em><silver>no title set");
|
|
||||||
}
|
|
@ -1,12 +1,11 @@
|
|||||||
package com.massivecraft.factions.entity;
|
package com.massivecraft.factions.entity;
|
||||||
|
|
||||||
import com.massivecraft.factions.predicate.PredicateCommandSenderFaction;
|
|
||||||
import com.massivecraft.factions.Factions;
|
import com.massivecraft.factions.Factions;
|
||||||
import com.massivecraft.factions.FactionsParticipator;
|
import com.massivecraft.factions.FactionsParticipator;
|
||||||
import com.massivecraft.factions.Lang;
|
|
||||||
import com.massivecraft.factions.predicate.PredicateMPlayerRole;
|
|
||||||
import com.massivecraft.factions.Rel;
|
import com.massivecraft.factions.Rel;
|
||||||
import com.massivecraft.factions.RelationParticipator;
|
import com.massivecraft.factions.RelationParticipator;
|
||||||
|
import com.massivecraft.factions.predicate.PredicateCommandSenderFaction;
|
||||||
|
import com.massivecraft.factions.predicate.PredicateMPlayerRole;
|
||||||
import com.massivecraft.factions.util.MiscUtil;
|
import com.massivecraft.factions.util.MiscUtil;
|
||||||
import com.massivecraft.factions.util.RelationUtil;
|
import com.massivecraft.factions.util.RelationUtil;
|
||||||
import com.massivecraft.massivecore.collections.MassiveList;
|
import com.massivecraft.massivecore.collections.MassiveList;
|
||||||
@ -44,6 +43,13 @@ import java.util.TreeSet;
|
|||||||
|
|
||||||
public class Faction extends Entity<Faction> implements FactionsParticipator
|
public class Faction extends Entity<Faction> implements FactionsParticipator
|
||||||
{
|
{
|
||||||
|
// -------------------------------------------- //
|
||||||
|
// CONSTANTS
|
||||||
|
// -------------------------------------------- //
|
||||||
|
|
||||||
|
public static final transient String NODESCRIPTION = Txt.parse("<em><silver>no description set");
|
||||||
|
public static final transient String NOMOTD = Txt.parse("<em><silver>no message of the day set");
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// META
|
// META
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
@ -236,7 +242,7 @@ public class Faction extends Entity<Faction> implements FactionsParticipator
|
|||||||
public String getDescription()
|
public String getDescription()
|
||||||
{
|
{
|
||||||
if (this.hasDescription()) return this.description;
|
if (this.hasDescription()) return this.description;
|
||||||
return Lang.FACTION_NODESCRIPTION;
|
return NODESCRIPTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDescription(String description)
|
public void setDescription(String description)
|
||||||
@ -277,7 +283,7 @@ public class Faction extends Entity<Faction> implements FactionsParticipator
|
|||||||
public String getMotd()
|
public String getMotd()
|
||||||
{
|
{
|
||||||
if (this.hasMotd()) return Txt.parse(this.motd);
|
if (this.hasMotd()) return Txt.parse(this.motd);
|
||||||
return Lang.FACTION_NOMOTD;
|
return NOMOTD;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMotd(String description)
|
public void setMotd(String description)
|
||||||
|
@ -2,7 +2,6 @@ package com.massivecraft.factions.entity;
|
|||||||
|
|
||||||
import com.massivecraft.factions.Factions;
|
import com.massivecraft.factions.Factions;
|
||||||
import com.massivecraft.factions.FactionsParticipator;
|
import com.massivecraft.factions.FactionsParticipator;
|
||||||
import com.massivecraft.factions.Lang;
|
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
import com.massivecraft.factions.Rel;
|
import com.massivecraft.factions.Rel;
|
||||||
import com.massivecraft.factions.RelationParticipator;
|
import com.massivecraft.factions.RelationParticipator;
|
||||||
@ -38,6 +37,12 @@ public class MPlayer extends SenderEntity<MPlayer> implements FactionsParticipat
|
|||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// META
|
// META
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
|
public static final transient String NOTITLE = Txt.parse("<em><silver>no title set");
|
||||||
|
|
||||||
|
// -------------------------------------------- //
|
||||||
|
// META
|
||||||
|
// -------------------------------------------- //
|
||||||
|
|
||||||
public static MPlayer get(Object oid)
|
public static MPlayer get(Object oid)
|
||||||
{
|
{
|
||||||
@ -353,7 +358,7 @@ public class MPlayer extends SenderEntity<MPlayer> implements FactionsParticipat
|
|||||||
public String getTitle()
|
public String getTitle()
|
||||||
{
|
{
|
||||||
if (this.hasTitle()) return this.title;
|
if (this.hasTitle()) return this.title;
|
||||||
return Lang.PLAYER_NOTITLE;
|
return NOTITLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTitle(String title)
|
public void setTitle(String title)
|
||||||
|
Loading…
Reference in New Issue
Block a user