Comments (5)
Could you show what you're doing please?
from api.
I'm attempting to get every attribute from my plugin, that i currently have to loop through the directory so that it can get all the UUIDs of the players with attributes, and then use getSaveManager().loadAttribute(). After loading the attribute, using the UUID from the file's name, the attribute is loaded by using this.id or this.getId() returns null regardless of if the player is online
java~
if (ConfigProxy.PLAYERDATA.exists() && ConfigProxy.PLAYERDATA.isDirectory()) {
File[] files = ConfigProxy.PLAYERDATA.listFiles();
if (files != null) {
for (File file : files) {
UUID uuid = UUID.fromString(file.getName().replace(".json", ""));
playerManager.getSaveManager().loadAttribute(AttributeData.class, uuid).whenComplete((attribute, throwable) -> {
attribute.setUuid(uuid); // had to add as if using this.id and this.getId() both return null
DATA.put(uuid, attribute);
});
}
}
}
from api.
Does the attribute class extend PlayerAttribute
? if not then the JsonSaveManager will not update the parent after it is loaded.
from api.
it extends the ManagedForgeAttribute also the player is offline, but i still want to get the UUID
from api.
Related Issues (20)
- Support for HEX colours and HEX gradients in UIs/lang
- [Issue]reforge16 has a large size jar after compiled HOT 4
- Add a message() method to ForgeEnvyPlayer which supports ITextComp HOT 2
- Parsed colour() messages don't respect formatting codes HOT 1
- Add blacklist to PokemonGenerator
- PokemonGeneratorConfig: change blockedTypes to support PokemonSpecs instead of Species HOT 1
- PokemonGeneratorConfig: include maximum IVs percentage HOT 1
- PokemonGeneratorConfig: impossible combinations HOT 4
- jar HOT 1
- UtilWorld#getRandomPosition in Nether teleports you above the bedrock level HOT 1
- Typo before 'https' on default "invite to discord message" HOT 1
- forge 1.18.2 HOT 1
- UtilConfigItem.Builder() does not support multiple formatting codes
- Feature Request: Getting page number from UtilConfigInterface#paginatedBuilder's itemConfigItemConversion or itemConversion. HOT 1
- %breedable% placeholder inverted
- Daniel is bad
- Testing ticket creation
- testing ticket creation again
- [Feature]Methods of refreshing GUI HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from api.