GithubHelp home page GithubHelp logo

Economy db (Towny) about essentials HOT 2 OPEN

AxoRm avatar AxoRm commented on July 2, 2024
Economy db (Towny)

from essentials.

Comments (2)

mbax avatar mbax commented on July 2, 2024

Not an EssX maintainer, just some guy.

For a little backstory, Vault is the lovely system that allows plugins to share economy data without having to write a bunch of plugin-specific stuff. Vault's economy API is, by their clear documentation, explicitly meant for Player economy data. It refers to the names of account holders as playerName and, for more than ten years, has nudged plugin developers to not even use the methods that take a name but rather to use what's called an OfflinePlayer object: A representation of a player (name and uuid).

From what I can tell, Towny sends the town's name as if it's a Minecraft player's name. This means your town names, containing Cyrillic characters, are being sent as invalid Minecraft account names. If not converting this name (which I suspect is part of a system for dealing with invalid input from various places), another valid response by EssX would be to not track any econ data at all for these invalid names.

If Towny sent OfflinePlayer objects with a consistent UUID based on the town that EssX (and other economy plugins) could store and track the UUID as would be a reasonable approach for the last decade (since 2014 when UUIDs were introduced with the idea of usernames changing), I can see this being an EssX issue to fix. As it stands, though, this looks like Towny is making a critical mistake.

from essentials.

Warriorrrr avatar Warriorrrr commented on July 2, 2024

I made a branch a few months ago for Towny that makes it send proper OfflinePlayer objects to vault, although because I got busy with some other things I unfortunately forgot. I'll take a look at it again to hopefully fix this decade old issue.

Is there any UUID version that's preferred for marking that we want to create an npc account? I saw that both v2 and v3 uuids work, so I was thinking of just editing the version byte or generating a v3 from the stringified uuid, or is there no real difference?

Besides that, I also don't think there's any issue here for EssX to fix, so this issue should probably be closed.

from essentials.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.