Class ObjectGroup
java.lang.Object
com.palmergames.bukkit.towny.object.TownyObject
com.palmergames.bukkit.towny.object.ObjectGroup
- All Implemented Interfaces:
Identifiable
,Nameable
,Savable
- Direct Known Subclasses:
PlotGroup
An abstract class which defines the mechanics of groups in towny.
- Author:
- Suneet Tipirneni (Siris)
-
Constructor Summary
-
Method Summary
Methods inherited from class com.palmergames.bukkit.towny.object.TownyObject
addMetaData, addMetaData, exists, getMetadata, getMetadata, getMetadata, getName, getTreeDepth, getTreeString, hasMeta, hasMeta, hasMeta, removeMetaData, removeMetaData, removeMetaData, removeMetaData, setName
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.palmergames.bukkit.towny.object.Nameable
getFormattedName
-
Constructor Details
-
ObjectGroup
The constructor for the Group object.- Parameters:
id
- A unique identifier for the group id.name
- An alias for the id used for player in-game interaction via commands.
-
-
Method Details
-
getUUID
- Specified by:
getUUID
in interfaceIdentifiable
-
setUUID
Description copied from interface:Identifiable
This should only be used by internal loading methods!- Specified by:
setUUID
in interfaceIdentifiable
- Parameters:
id
- the UUID to set.
-
equals
Determines whether a group is equivalent or not. -
toString
Converts this into the qualified string representation.- Overrides:
toString
in classTownyObject
- Returns:
- A string in the format "name, id".
-
hashCode
public int hashCode()Get hashcode for object group name. The reason we hash the name and not the UUID is for quicker common access from commands.
-