- public class CurrencyUser {
- private final UUID player;
- private EconomyData economyData;
- private TestData testData;
- public CurrencyUser(UUID player) {
- this.player = player;
- this.economyData = new EconomyData(this.player);
- }
- /**
- * Initializes the data fields to make all of them assigned to a non-null value
- * (ONLY EXECUTE ON STARTUP)
- */
- @SneakyThrows
- public void initialize() {
- for (Field field : getClass().getDeclaredFields()) {
- field.setAccessible(true);
- if (!Data.class.isAssignableFrom(field.getType())) {
- continue;
- }
- if (field.get(this) != null) {
- continue;
- }
- field.set(this, field.getType().getDeclaredConstructor(UUID.class).newInstance(this.player));
- field.setAccessible(false);
- }
- }
- }
[text] opinion
Viewer
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
Editor
You can edit this paste and save as new: