Skip to content

Conversation

@Zoriot
Copy link
Member

@Zoriot Zoriot commented Jun 27, 2025

Missing things:

  • LangLibs 1.5 Update

Cinnazeyy and others added 18 commits January 5, 2025 20:18
* Added city project ID and difficulty ID validation in CityProjectDataProviderSQL.

* Make PlotCreator#createPlot receive String cityProjectID parameter as we only use the ID for registering plots anyway.

* Make PlotCreator#createPlot private which is now callable by #createPlot(Player, CityProject, String) or #createPlotManually(Player, String, String)

* PlotCreator#createPlotManually create a plot with specified city and difficulty ID arguments, fail if IDs does not exist in the database.
* PlotDataProviderSQL#createPlot(String, String, String, String, UUID, byte)

* Missing default plot_type column

* Fixed to type 1 as LOCAL_INSPIRATION_MODE
* Added command info for creating plot manually

* Added warning message when manually creating plot with DataProvider set to API
@Zoriot Zoriot linked an issue Jun 27, 2025 that may be closed by this pull request
Zoriot and others added 11 commits June 27, 2025 11:56
Only MySQL Driver is bundled by bukkit.
Align with plot-system changes. Maybe we should export that logic in a library or smt.
* Setup for plugin cache for CityProject data
* Added javadoc for ExpiringCacheMap

* Renamed CityProjectCache.java to CityProjectData.java

* Make CreatePlotMenu retrieve city project data from the plugin's cache

* New CityProjectData to cache available city project(s) with expiry refreshing
  * Using ExpiringCacheMap to manage expirations of city project data
  * Cache is managed onEnable of plugin by running ExpiryThread
  * Cached data is then able to be retrieved
    by using PlotSystemTerra#getCityProjectData
  * Expiry is configurable as cache-duration-minutes in config.yml
…orrect)

Also fix a small logic confusion in if.
* CityProjectData instance now initialized via the plugin class (PlotSystemTerra)

* Cache expiring task timer is scrapped,
  it is now fetch on every #getCache call instead.

* CityProjectData cache is moved to the wrapper child class 'Cache' which handle cache refreshing.

* Renamed ExpiringCacheMap.java to ExpiringHashMap.java

* ExpiringCacheMap's ExpiryThread now ran every 5 seconds (previously 1)
  since this plugin probably won't require fast refreshing rate
* for #createPlotManually use a new constant field to check for valid difficulty
  instead of fetching from database (Difficulty are hard-coded)

* removed the deprecated #isCreationDataValid
* Check it from CityProjectData cache instead
tintinkung and others added 9 commits July 6, 2025 07:49
* So it won't display square bracket
* Moved to a new section "Plot Creating"

* Edited some wording
# Conflicts:
#	src/main/java/com/alpsbte/plotsystemterra/PlotSystemTerra.java
#	src/main/java/com/alpsbte/plotsystemterra/core/config/ConfigPaths.java
* ✨ ♻️ Improve database handling

Use the alpslib-io package so our plugin will share it. Also use just a plain sql file for the initialisation. Removes much overhead & the additional properties will improve performance. The (bad) StatementBuilder logic was also removed. Now it should use proper pooling.
! BREAKING CHANGE: database.db-url renamed to database.url and database.db-name renamed to database.dbname

* ♻️ Improve statements with io helper + remove duplicated code

* remove redundant async variants of dataprovider methods and convert all base dataproviders back to interfaces

---------

Co-authored-by: Cinnazeyy <imcinnazeyy@gmail.com>
@Zoriot Zoriot linked an issue Jul 8, 2025 that may be closed by this pull request
Zoriot and others added 7 commits July 14, 2025 18:39
# Conflicts:
#	src/main/java/com/alpsbte/plotsystemterra/PlotSystemTerra.java
#	src/main/java/com/alpsbte/plotsystemterra/core/plotsystem/PlotCreator.java
* Moved `core.plotsystem.CityProjectData` to `core.data.CityProjectData`

* Make CityProjectData#fetchDataAsync no longer static

* Make CityProjectData constructor retrieve DataProvider for #fetchDataAync

* Removed constructor for making static CityProjectData cache,
  handled via the new constructor by setting expiry below zero instead.

* DataProviders is now initialized with cacheDurationMinute

* DataProvider#getCityProjectData: get city project data cache
* Handle edge case if difficultyID is null.

* Avoid using a branching statement as the last in a loop.
* Moved CityProjectData.Cache to a top-level reusable class

* Made Cache generic with <K, V> to support multiple data models

* Updated javadocs to meet new usages
…e-data

[Feature] Caching for city project data & Manual plot creation
@Zoriot Zoriot added the enhancement New feature or request label Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] - Create plot can support cuboid selection mode [Feature] - Implement PlotSystemAPI into the plugin

4 participants