|
15 | 15 | import net.azisaba.afnw.afnwcore2.util.TheTAB; |
16 | 16 | import net.azisaba.afnw.afnwcore2.util.data.PlayerData; |
17 | 17 | import net.azisaba.afnw.afnwcore2.util.data.PlayerDataSave; |
| 18 | +import net.minecraft.core.registries.BuiltInRegistries; |
18 | 19 | import net.minecraft.world.entity.ai.attributes.Attributes; |
19 | 20 | import net.minecraft.world.entity.ai.attributes.RangedAttribute; |
20 | 21 | import org.bukkit.Bukkit; |
@@ -61,7 +62,7 @@ public void onEnable() { |
61 | 62 | getLogger().info("Listener 設定中...."); |
62 | 63 | /* プレイヤーリスナー */ |
63 | 64 | pluginEvent.registerEvents(new JoinListener(this, data), this); |
64 | | - pluginEvent.registerEvents(new QuitListener(), this); |
| 65 | + pluginEvent.registerEvents(new QuitListener(this), this); |
65 | 66 | pluginEvent.registerEvents(new DeathListener(), this); |
66 | 67 | pluginEvent.registerEvents(new FirstPlayerJoinListener(this, data), this); |
67 | 68 | pluginEvent.registerEvents(new AFKListener(this), this); |
@@ -129,7 +130,8 @@ public void onEnable() { |
129 | 130 | } |
130 | 131 | }, 10, 10); |
131 | 132 |
|
132 | | - ((RangedAttribute) Attributes.LUCK).maxValue = Double.MAX_VALUE; |
| 133 | + ((RangedAttribute) Objects.requireNonNull(BuiltInRegistries.ATTRIBUTE.get(Attributes.LUCK.unwrap().left().orElseThrow()))) |
| 134 | + .maxValue = Double.MAX_VALUE; |
133 | 135 | getLogger().info("正常に起動しました。"); |
134 | 136 | } |
135 | 137 |
|
|
0 commit comments