Class PropertyManager
java.lang.Object
me.fami6xx.rpuniverse.core.properties.PropertyManager
- All Implemented Interfaces:
org.bukkit.event.Listener
Manages properties in the RP Universe.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateProperty(Property property)Creates a new property and saves it.voiddisable()Disables the PropertyManager.Gets all properties.getPropertyByHologram(org.bukkit.Location loc)Gets a property by its hologram location.getPropertyById(UUID propertyId)Gets a property by its ID.voidonLockDeleted(LockDeletedEvent event)voidonPlayerLogin(org.bukkit.event.player.PlayerJoinEvent event)Event handler for player login events.voidonPlayerQuit(org.bukkit.event.player.PlayerQuitEvent event)voidremoveProperty(UUID propertyId)Removes a property by its ID.voidSaves all properties to JSON files.voidsaveProperty(Property property)Saves a single property to a JSON file.
-
Constructor Details
-
PropertyManager
Constructs a new PropertyManager.- Parameters:
plugin- the RPUniverse plugin instance
-
-
Method Details
-
disable
public void disable()Disables the PropertyManager. -
saveProperties
public void saveProperties()Saves all properties to JSON files. -
saveProperty
Saves a single property to a JSON file.- Parameters:
property- the property to save
-
createProperty
Creates a new property and saves it.- Parameters:
property- the property to create
-
removeProperty
Removes a property by its ID.- Parameters:
propertyId- the ID of the property to remove
-
getPropertyByHologram
Gets a property by its hologram location.- Parameters:
loc- the location of the hologram- Returns:
- the property with the specified hologram location, or null if not found
-
getAllProperties
Gets all properties.- Returns:
- a collection of all properties
-
getPropertyById
Gets a property by its ID.- Parameters:
propertyId- the ID of the property- Returns:
- the property with the specified ID, or null if not found
-
onPlayerLogin
public void onPlayerLogin(org.bukkit.event.player.PlayerJoinEvent event)Event handler for player login events.- Parameters:
event- the player join event
-
onPlayerQuit
public void onPlayerQuit(org.bukkit.event.player.PlayerQuitEvent event) -
onLockDeleted
-