Update dependencies and improve various functionalities

- Bump Gradle to 8.5 and adjust related configs.
- Upgrade from JDK 17 to JDK 21.
- Replace deprecated methods with modern equivalents (`withDisplayName` -> `withCustomName`).
- Refactor and simplify event handling (e.g., PlayerLoginEvent -> AsyncPlayerConfigurationEvent).
- Fix minor issues with player and inventory handling.
- Improve Gradle startup scripts for better compatibility.
- Transition plugin handling from deprecated to current class references.
- General cleanup and code modernization.
This commit is contained in:
2025-12-21 17:31:48 +01:00
parent 533df11984
commit d80b7deb53
15 changed files with 97 additions and 88 deletions

View File

@@ -12,47 +12,47 @@ import java.util.function.Consumer;
public enum Items {
HUB(
ItemStack
.of(Material.IRON_DOOR)
.withDisplayName(
Component
.text("Zurück zur Überischt")
.color(NamedTextColor.GOLD)
),
player -> new VoidWorld().movePlayer(player)
ItemStack
.of(Material.IRON_DOOR)
.withCustomName(
Component
.text("Zurück zur Überischt")
.color(NamedTextColor.GOLD)
),
player -> new VoidWorld().movePlayer(player)
),
SPAWN(
ItemStack
.of(Material.TARGET)
.withDisplayName(
Component
.text("Zum Spawn")
.color(NamedTextColor.GOLD)
),
SpawnCommand::teleportToSpawn
ItemStack
.of(Material.TARGET)
.withCustomName(
Component
.text("Zum Spawn")
.color(NamedTextColor.GOLD)
),
SpawnCommand::teleportToSpawn
),
MORE_SPEED(
ItemStack
.of(Material.FEATHER)
.withDisplayName(
Component
.text("Schneller fliegen")
.color(NamedTextColor.AQUA)
),
player -> player.updateFlyingSpeed(0.05f)
ItemStack
.of(Material.FEATHER)
.withCustomName(
Component
.text("Schneller fliegen")
.color(NamedTextColor.AQUA)
),
player -> player.updateFlyingSpeed(0.05f)
),
LESS_SPEED(
ItemStack
.of(Material.ANVIL)
.withDisplayName(
Component
.text("Langsamer fliegen")
.color(NamedTextColor.AQUA)
),
player -> player.updateFlyingSpeed(-0.05f)
ItemStack
.of(Material.ANVIL)
.withCustomName(
Component
.text("Langsamer fliegen")
.color(NamedTextColor.AQUA)
),
player -> player.updateFlyingSpeed(-0.05f)
);