Skip to content

API: Board

Mark Hughes edited this page Oct 4, 2017 · 1 revision

You can work with the game board extremely easily with the LegacyFactions API.

What is Board used for?

Board is actually a database that stores all the chunk claim locations. Using the Board class, you can access and validate claims.

Getting a Faction at a location

This is the most common use of the Board class.

Faction faction = Board.get().getFactionAt(location);

Claim and unclaim land

The next popular use of the Board class is to work with land claims.

Faction faction = ...;
Locality locality = ...;

Board.setFactionAt(faction, locality);

It is a similar action to remove a faction at a locality:

Locality locality = ...;
Board.removeAt(locality);

You can see all the methods right here on GitHub!