minor stuff
This commit is contained in:
parent
7e33bd0bf1
commit
0992c403b5
@ -133,19 +133,24 @@ public class Faction extends Entity<Faction> implements EconomyParticipator
|
||||
public String getTag()
|
||||
{
|
||||
String ret = this.tag;
|
||||
if (UConf.get(this).factionTagForceUpperCase)
|
||||
|
||||
UConf uconf = UConf.get(this);
|
||||
if (uconf != null && UConf.get(this).factionTagForceUpperCase)
|
||||
{
|
||||
ret = ret.toUpperCase();
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
public void setTag(String str)
|
||||
{
|
||||
if (UConf.get(this).factionTagForceUpperCase)
|
||||
UConf uconf = UConf.get(this);
|
||||
if (uconf != null && UConf.get(this).factionTagForceUpperCase)
|
||||
{
|
||||
str = str.toUpperCase();
|
||||
}
|
||||
|
||||
this.tag = str;
|
||||
this.changed();
|
||||
}
|
||||
@ -264,7 +269,9 @@ public class Faction extends Entity<Faction> implements EconomyParticipator
|
||||
|
||||
public boolean isDefaultOpen()
|
||||
{
|
||||
return UConf.get(this).defaultFactionOpen;
|
||||
UConf uconf = UConf.get(this);
|
||||
if (uconf == null) return false;
|
||||
return uconf.defaultFactionOpen;
|
||||
}
|
||||
|
||||
public boolean isOpen()
|
||||
@ -274,9 +281,8 @@ public class Faction extends Entity<Faction> implements EconomyParticipator
|
||||
return ret;
|
||||
}
|
||||
|
||||
public void setOpen(Boolean open)
|
||||
public void setOpen(boolean open)
|
||||
{
|
||||
if (open == null || MUtil.equals(open, this.isDefaultOpen())) open = null;
|
||||
this.open = open;
|
||||
this.changed();
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ public class FactionColl extends Coll<Faction>
|
||||
Faction faction = this.get(id);
|
||||
if (faction != null) return faction;
|
||||
|
||||
faction = this.createNewInstance();
|
||||
faction = this.create(id);
|
||||
|
||||
faction.setTag(ChatColor.DARK_GREEN+"Wilderness");
|
||||
faction.setDescription(null);
|
||||
@ -150,8 +150,6 @@ public class FactionColl extends Coll<Faction>
|
||||
faction.setPermittedRelations(FPerm.BUTTON, Rel.LEADER, Rel.OFFICER, Rel.MEMBER, Rel.RECRUIT, Rel.ALLY, Rel.TRUCE, Rel.NEUTRAL, Rel.ENEMY);
|
||||
faction.setPermittedRelations(FPerm.LEVER, Rel.LEADER, Rel.OFFICER, Rel.MEMBER, Rel.RECRUIT, Rel.ALLY, Rel.TRUCE, Rel.NEUTRAL, Rel.ENEMY);
|
||||
|
||||
this.attach(faction, id);
|
||||
|
||||
return faction;
|
||||
}
|
||||
|
||||
@ -161,7 +159,7 @@ public class FactionColl extends Coll<Faction>
|
||||
Faction faction = this.get(id);
|
||||
if (faction != null) return faction;
|
||||
|
||||
faction = this.createNewInstance();
|
||||
faction = this.create(id);
|
||||
|
||||
faction.setTag("SafeZone");
|
||||
faction.setDescription("Free from PVP and monsters");
|
||||
@ -184,8 +182,6 @@ public class FactionColl extends Coll<Faction>
|
||||
faction.setPermittedRelations(FPerm.LEVER, Rel.LEADER, Rel.OFFICER, Rel.MEMBER, Rel.RECRUIT, Rel.ALLY, Rel.TRUCE, Rel.NEUTRAL, Rel.ENEMY);
|
||||
faction.setPermittedRelations(FPerm.TERRITORY, Rel.LEADER, Rel.OFFICER, Rel.MEMBER);
|
||||
|
||||
this.attach(faction, id);
|
||||
|
||||
return faction;
|
||||
}
|
||||
|
||||
@ -195,7 +191,7 @@ public class FactionColl extends Coll<Faction>
|
||||
Faction faction = this.get(id);
|
||||
if (faction != null) return faction;
|
||||
|
||||
faction = this.createNewInstance();
|
||||
faction = this.create(id);
|
||||
|
||||
faction.setTag("WarZone");
|
||||
faction.setDescription("Not the safest place to be");
|
||||
@ -218,8 +214,6 @@ public class FactionColl extends Coll<Faction>
|
||||
faction.setPermittedRelations(FPerm.LEVER, Rel.LEADER, Rel.OFFICER, Rel.MEMBER, Rel.RECRUIT, Rel.ALLY, Rel.TRUCE, Rel.NEUTRAL, Rel.ENEMY);
|
||||
faction.setPermittedRelations(FPerm.TERRITORY, Rel.LEADER, Rel.OFFICER, Rel.MEMBER);
|
||||
|
||||
this.attach(faction, id);
|
||||
|
||||
return faction;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user