Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup Some Stuff, Increment Version (+0.0.1) #4

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

TheFlagCourier
Copy link
Member

@TheFlagCourier TheFlagCourier commented Nov 10, 2024

Pom Changes

  • Increment Package Version
  • Switch to Java 17
  • Set sourceEncoding to UTF-8
  • Switch from org.bukkit:bukkit to org.spigotmc:spigot-api
    • version defined as property: bukkit.dependency.version, 1.20.6-R0.1-SNAPSHOT
    • Matches ChestShop3's target.
  • Use Glaremaster's Repo (retire GHPR)
  • Bump Towny, 0.100.4.0
  • Bump ChestShop, 3.12.3-SNAPSHOT

Dependency Install Script:

Removed. Unnecessary when using either a properly configured settings.xml for the GitHub Package Registry, or when using Glaremaster's repository.

Makes more sense to store it as a gist.

Towny Class:

Static Access

Make datafolder and loadFile(String) non-static.

Improve File Handling:

Uses Optional<File> instead of pure File to handle loading the configuration, and put in more effort to get a non-null File.

If a File is not provided by the Optional, just disable the plugin.

Improve Disabling

Free up 'dataFile' and clear any events/listeners.

TownyUtils Class:

Just adds a null-check

Properties Class

Add 'final' keyword (these are never modified)

- Switches from bukkit to spigot-api
- Replaces GitHub Package Database with Glaremaster's Repository (Towny)
- Bump Towny dep to 0.100.4.0
- Bump ChestShop dep to 3.12.3-SNAPSHOT
- Build with Java 17
- Set sourceEncoding to UTF-8
- Set spigot-api to follow the `${bukkit.dependency.version}` property.
- Set afformentioned property to "1.20.6-R0.1-SNAPSHOT" (Matches ChestShop3's main POM.)
## Towny Class:
Uses `Optional<File>` instead of pure `File` to handle loading the configuration.

If a File is not provided by the Optional, disable the plugin, and free up datafolder to be culled.

## TownyUtils Class:
Just adds a null-check
May have served a purpose for manually installing Towny. But no longer necessary when using Glaremaster's repository.
Really only useful if unloading after a normal onEnable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant