Interface TownBlockOwner
- All Superinterfaces:
Nameable
,Permissible
Allows objects to contain townblocks to be accessed/manipulated.
- Author:
- EdgarL, Shade, Suneet Tipirneni (Siris)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addTownBlock
(TownBlock townBlock) Adds a townblock to the list of existing townblocks.Gets the unmodifiable collection of townblocks.boolean
hasTownBlock
(TownBlock townBlock) Checks whether object has townblock or not.void
removeTownBlock
(TownBlock townBlock) Removes townblock from the list of existing townblocks.Methods inherited from interface com.palmergames.bukkit.towny.object.Nameable
getFormattedName, getName
Methods inherited from interface com.palmergames.bukkit.towny.object.Permissible
getPermissions, setPermissions
-
Method Details
-
getTownBlocks
Collection<TownBlock> getTownBlocks()Gets the unmodifiable collection of townblocks.- Returns:
- The townblocks this object contains.
-
hasTownBlock
Checks whether object has townblock or not.- Parameters:
townBlock
- The townblock to check for.- Returns:
- A boolean indicating if it was found or not.
-
addTownBlock
Adds a townblock to the list of existing townblocks.- Parameters:
townBlock
- The townblock to add.- Throws:
AlreadyRegisteredException
- When the townblock is already in the list.
-
removeTownBlock
Removes townblock from the list of existing townblocks.- Parameters:
townBlock
- The townblock to remove.- Throws:
NotRegisteredException
- Thrown when the townblock given is not in the list.
-