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

PlayerPoints Integration #273

Merged
merged 6 commits into from
Jan 31, 2024
Merged

Conversation

FireML
Copy link
Contributor

@FireML FireML commented Jan 27, 2024

Suggested in #271

Due to the way PlayerPoints works, we can only give it ints. Everything I've done here should account for that.

  • Adds the Economy class and an EconomyType enum so we can use the correct provider.
  • Adds a method to the Economy class which will format values so players don't get the wrong information.

To be specific, this will floor any doubles when PlayerPoints is used and return 0.0 when there is no Economy provider.

  • Fixes the ConfigUpdater because it wasn't working properly.
  • Adds better logging to the ConfigUpdater so admins know exactly what's going on.

This was designed in a way that should make adding other economy types quite easy, so i might add more if i feel like it / see requests for it.

@FireML
Copy link
Contributor Author

FireML commented Jan 28, 2024

  • Adds PlayerPoints as a potential reward type:
      catch-event:
        - "PLAYER_POINTS:100"

Copy link
Collaborator

@sarhatabaot sarhatabaot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, great work on this one 😁

@sarhatabaot sarhatabaot merged commit a14ec4c into Oheers:master Jan 31, 2024
@FireML FireML deleted the player-points-integration branch January 31, 2024 21:14
@noaskers
Copy link
Contributor

noaskers commented Feb 8, 2024

If possible would be cool to add support for this one aswell:
https://www.spigotmc.org/resources/coinsengine-economy-and-virtual-currencies.84121/

And it would also be cool if we can give these after selling fish at the shop ;)

@FireML
Copy link
Contributor Author

FireML commented Feb 8, 2024

If possible would be cool to add support for this one aswell: https://www.spigotmc.org/resources/coinsengine-economy-and-virtual-currencies.84121/

And it would also be cool if we can give these after selling fish at the shop ;)

Unfortunately that plugin doesn't have a repository for its API, so i won't be able to add it right now. I'd recommend asking the dev if there will be a maven repository at some point so this can be done.

@FireML FireML mentioned this pull request Feb 8, 2024
@noaskers
Copy link
Contributor

noaskers commented Mar 5, 2024

If I may add to this:

It would be nice to have both options possible
lets say u can choose both as shown here: #271

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.

3 participants