Brief access info is now displayed under two circumstances: if you have been granted explicit access to the territory you are in ("access granted"), or if you are a normal member of the faction which owns the territory and access is denied to you ("access restricted"). This info will be displayed through Spout under the faction tag if possible, otherwise it will be displayed through chat.
New conf.json setting: "spoutTerritoryAccessShow": true, - whether to show brief access info using Spout
This commit is contained in:
@ -4,6 +4,7 @@ import com.massivecraft.factions.Board;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.FLocation;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.integration.SpoutFeatures;
|
||||
import com.massivecraft.factions.struct.FPerm;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.struct.TerritoryAccess;
|
||||
@ -35,8 +36,9 @@ public class CmdAccess extends FCommand
|
||||
{
|
||||
String type = this.argAsString(0);
|
||||
type = (type == null) ? "" : type.toLowerCase();
|
||||
FLocation loc = new FLocation(me.getLocation());
|
||||
|
||||
TerritoryAccess territory = Board.getTerritoryAccessAt(new FLocation(me.getLocation()));
|
||||
TerritoryAccess territory = Board.getTerritoryAccessAt(loc);
|
||||
Faction locFaction = territory.getHostFaction();
|
||||
boolean accessAny = Permission.ACCESS_ANY.has(sender, false);
|
||||
|
||||
@ -87,6 +89,7 @@ public class CmdAccess extends FCommand
|
||||
}
|
||||
|
||||
msg("<i>%s has been %s<i> the access list for this territory.", target, TextUtil.parseColor(added ? "<lime>added to" : "<rose>removed from"));
|
||||
SpoutFeatures.updateAccessInfoLoc(loc);
|
||||
showAccessList(territory, locFaction);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user