public class Town extends TownBlockOwner implements Walled, ResidentList
Constructor and Description |
---|
Town(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
addBonusBlocks(int bonusBlocks) |
void |
addOutpostSpawn(org.bukkit.Location spawn)
Add or update an outpost spawn
|
void |
addPurchasedBlocks(int purchasedBlocks) |
void |
addResident(Resident resident) |
void |
addResidentCheck(Resident resident) |
void |
addTownBlock(TownBlock townBlock) |
void |
addWallSection(WallSection wallSection) |
void |
clear() |
void |
collect(double amount) |
void |
forceAddOutpostSpawn(org.bukkit.Location spawn)
Only to be called from the Loading methods.
|
void |
forceSetHomeBlock(TownBlock homeBlock)
Only to be called from the Loading methods.
|
void |
forceSetSpawn(org.bukkit.Location spawn)
Only to be called from the Loading methods.
|
java.util.List<org.bukkit.Location> |
getAllOutpostSpawns()
Get an unmodifiable List of all outpost spawns.
|
java.util.List<Resident> |
getAssistants() |
double |
getBonusBlockCost() |
double |
getBonusBlockCostN(int inputN) |
int |
getBonusBlocks() |
double |
getCommercialPlotPrice() |
double |
getCommercialPlotTax() |
java.lang.String |
getEconomyName()
Get a valid economy account name for this object.
|
double |
getEmbassyPlotPrice() |
double |
getEmbassyPlotTax() |
TownBlock |
getHomeBlock() |
int |
getMaxOutpostSpawn() |
Resident |
getMayor() |
Nation |
getNation() |
int |
getNumResidents() |
org.bukkit.Location |
getOutpostSpawn(java.lang.Integer index)
Return the Location for this Outpost index.
|
double |
getPlotPrice() |
double |
getPlotTax() |
double |
getPlotTypePrice(TownBlockType type) |
int |
getPurchasedBlocks() |
java.util.List<Resident> |
getResidents() |
org.bukkit.Location |
getSpawn() |
java.lang.String |
getTag() |
double |
getTaxes() |
int |
getTotalBlocks() |
java.lang.String |
getTownBoard() |
java.util.List<java.lang.String> |
getTreeString(int depth) |
Wall |
getWall() |
java.util.List<WallSection> |
getWallSections() |
TownyWorld |
getWorld()
Fetch the World this town is registered too.
|
boolean |
hasAssistant(Resident resident) |
boolean |
hasHomeBlock() |
boolean |
hasMayor() |
boolean |
hasMobs() |
boolean |
hasNation() |
boolean |
hasOutpostSpawn() |
boolean |
hasResident(Resident resident) |
boolean |
hasResident(java.lang.String name) |
boolean |
hasSpawn() |
boolean |
hasTag() |
boolean |
hasUpkeep() |
boolean |
hasWallSection(WallSection wallSection) |
boolean |
hasWorld() |
boolean |
isAdminDisabledPVP() |
boolean |
isAdminEnabledPVP() |
boolean |
isBANG() |
boolean |
isCapital() |
boolean |
isFire() |
boolean |
isHomeBlock(TownBlock townBlock) |
boolean |
isMayor(Resident resident) |
boolean |
isOpen() |
boolean |
isPublic() |
boolean |
isPVP() |
boolean |
isTaxPercentage() |
void |
removeResident(Resident resident) |
void |
removeTownBlock(TownBlock townBlock) |
void |
removeWallSection(WallSection wallSection) |
void |
setAdminDisabledPVP(boolean isPVPDisabled) |
void |
setAdminEnabledPVP(boolean isPVPEnabled) |
void |
setBANG(boolean isBANG) |
void |
setBonusBlocks(int bonusBlocks) |
void |
setCommercialPlotPrice(double commercialPlotPrice) |
void |
setCommercialPlotTax(double commercialTax) |
void |
setEmbassyPlotPrice(double embassyPlotPrice) |
void |
setEmbassyPlotTax(double embassyPlotTax) |
void |
setFire(boolean isFire) |
void |
setHasMobs(boolean hasMobs) |
void |
setHasUpkeep(boolean hasUpkeep) |
boolean |
setHomeBlock(TownBlock homeBlock) |
void |
setMayor(Resident mayor) |
void |
setNation(Nation nation) |
void |
setOpen(boolean isOpen) |
void |
setPlotPrice(double plotPrice) |
void |
setPlotTax(double plotTax) |
void |
setPublic(boolean isPublic) |
void |
setPurchasedBlocks(int purchasedBlocks) |
void |
setPVP(boolean isPVP) |
void |
setSpawn(org.bukkit.Location spawn) |
void |
setTag(java.lang.String text) |
void |
setTaxes(double taxes) |
void |
setTaxPercentage(boolean isPercentage) |
void |
setTownBoard(java.lang.String townBoard) |
void |
setWallSections(java.util.List<WallSection> wallSections) |
void |
setWorld(TownyWorld world)
Sets the world this town belongs to.
|
void |
withdrawFromBank(Resident resident,
int amount) |
getPermissions, getTownBlocks, hasTownBlock, setPermissions, setTownblocks
canPayFromHoldings, collect, getHoldingBalance, getHoldingFormattedBalance, pay, payTo, removeAccount, setBalance
getFormattedName, getName, getTreeDepth, getUID, isChangedName, setChangedName, setName, setUID, toString
public void addTownBlock(TownBlock townBlock) throws AlreadyRegisteredException
addTownBlock
in class TownBlockOwner
AlreadyRegisteredException
public void setTag(java.lang.String text) throws TownyException
TownyException
public java.lang.String getTag()
public boolean hasTag()
public Resident getMayor()
public void setTaxes(double taxes)
public double getTaxes()
public void setMayor(Resident mayor) throws TownyException
TownyException
public Nation getNation() throws NotRegisteredException
NotRegisteredException
public void setNation(Nation nation) throws AlreadyRegisteredException
AlreadyRegisteredException
public java.util.List<Resident> getResidents()
getResidents
in interface ResidentList
public java.util.List<Resident> getAssistants()
public boolean hasResident(java.lang.String name)
hasResident
in interface ResidentList
public boolean hasResident(Resident resident)
public boolean hasAssistant(Resident resident)
public void addResident(Resident resident) throws AlreadyRegisteredException
AlreadyRegisteredException
public void addResidentCheck(Resident resident) throws AlreadyRegisteredException
AlreadyRegisteredException
public boolean isMayor(Resident resident)
public boolean hasNation()
public int getNumResidents()
public boolean isCapital()
public void setHasUpkeep(boolean hasUpkeep)
public boolean hasUpkeep()
public void setHasMobs(boolean hasMobs)
public boolean hasMobs()
public void setPVP(boolean isPVP)
public void setAdminDisabledPVP(boolean isPVPDisabled)
public void setAdminEnabledPVP(boolean isPVPEnabled)
public boolean isPVP()
public boolean isAdminDisabledPVP()
public boolean isAdminEnabledPVP()
public void setBANG(boolean isBANG)
public boolean isBANG()
public void setTaxPercentage(boolean isPercentage)
public boolean isTaxPercentage()
public void setFire(boolean isFire)
public boolean isFire()
public void setTownBoard(java.lang.String townBoard)
public java.lang.String getTownBoard()
public void setBonusBlocks(int bonusBlocks)
public int getTotalBlocks()
public int getBonusBlocks()
public double getBonusBlockCost()
public double getBonusBlockCostN(int inputN) throws TownyException
TownyException
public void addBonusBlocks(int bonusBlocks)
public void setPurchasedBlocks(int purchasedBlocks)
public int getPurchasedBlocks()
public void addPurchasedBlocks(int purchasedBlocks)
public boolean setHomeBlock(TownBlock homeBlock) throws TownyException
homeBlock
- TownyException
public void forceSetHomeBlock(TownBlock homeBlock) throws TownyException
homeBlock
- TownyException
public TownBlock getHomeBlock() throws TownyException
TownyException
public void setWorld(TownyWorld world)
world
- public TownyWorld getWorld()
public boolean hasMayor()
public void removeResident(Resident resident) throws EmptyTownException, NotRegisteredException
public void setSpawn(org.bukkit.Location spawn) throws TownyException
TownyException
public void forceSetSpawn(org.bukkit.Location spawn)
spawn
- public org.bukkit.Location getSpawn() throws TownyException
TownyException
public boolean hasSpawn()
public boolean hasHomeBlock()
public void clear() throws EmptyNationException
EmptyNationException
public boolean hasWorld()
public void removeTownBlock(TownBlock townBlock) throws NotRegisteredException
removeTownBlock
in class TownBlockOwner
NotRegisteredException
public void addOutpostSpawn(org.bukkit.Location spawn) throws TownyException
spawn
- TownyException
public void forceAddOutpostSpawn(org.bukkit.Location spawn)
spawn
- public org.bukkit.Location getOutpostSpawn(java.lang.Integer index) throws TownyException
index
- TownyException
public int getMaxOutpostSpawn()
public boolean hasOutpostSpawn()
public java.util.List<org.bukkit.Location> getAllOutpostSpawns()
public void setPlotPrice(double plotPrice)
public double getPlotPrice()
public double getPlotTypePrice(TownBlockType type)
public void setCommercialPlotPrice(double commercialPlotPrice)
public double getCommercialPlotPrice()
public void setEmbassyPlotPrice(double embassyPlotPrice)
public double getEmbassyPlotPrice()
public java.util.List<WallSection> getWallSections()
getWallSections
in interface Walled
public void setWallSections(java.util.List<WallSection> wallSections)
setWallSections
in interface Walled
public boolean hasWallSection(WallSection wallSection)
hasWallSection
in interface Walled
public void addWallSection(WallSection wallSection)
addWallSection
in interface Walled
public void removeWallSection(WallSection wallSection)
removeWallSection
in interface Walled
public boolean isHomeBlock(TownBlock townBlock)
public void setPlotTax(double plotTax)
public double getPlotTax()
public void setCommercialPlotTax(double commercialTax)
public double getCommercialPlotTax()
public void setEmbassyPlotTax(double embassyPlotTax)
public double getEmbassyPlotTax()
public void setOpen(boolean isOpen)
public boolean isOpen()
public void collect(double amount) throws EconomyException
EconomyException
public void withdrawFromBank(Resident resident, int amount) throws EconomyException, TownyException
EconomyException
TownyException
public java.util.List<java.lang.String> getTreeString(int depth)
getTreeString
in class TownyObject
public void setPublic(boolean isPublic)
public boolean isPublic()
public java.lang.String getEconomyName()
TownyEconomyObject
getEconomyName
in class TownyEconomyObject