diff --git a/ansible/files/paper-config/plugins/FactoryMod/config.yml b/ansible/files/paper-config/plugins/FactoryMod/config.yml index 679905657..21d193bdb 100644 --- a/ansible/files/paper-config/plugins/FactoryMod/config.yml +++ b/ansible/files/paper-config/plugins/FactoryMod/config.yml @@ -1103,14 +1103,14 @@ factories: material: HONEYCOMB amount: 32 recipes: - - wax_copper_block - - wax_exposed_copper - - wax_weathered_copper - - wax_oxidized_copper - - weather_copper_block - - weather_exposed_copper - - weather_weathered_copper - - repair_copper_workshop + - wax_copper_block + - wax_exposed_copper + - wax_weathered_copper + - wax_oxidized_copper + - weather_copper_block + - weather_exposed_copper + - weather_weathered_copper + - repair_copper_workshop #RECIPES recipes: smelt_stone: @@ -1627,7 +1627,7 @@ recipes: output: glass: material: GLASS - amount: 128 + amount: 128 smelt_netherrack: production_time: 4s name: Smelt Netherrack @@ -1845,7 +1845,7 @@ recipes: amount: 64 bucket: material: BUCKET - amount: 1 + amount: 1 make_packed_mud: forceInclude: true production_time: 4s @@ -1885,7 +1885,7 @@ recipes: amount: 64 yellow dye: material: YELLOW_DYE - amount: 8 + amount: 8 output: end_stone: material: END_STONE @@ -5545,8 +5545,8 @@ recipes: type: PRODUCTION input: iron_ingot: - material: IRON_INGOT - amount: 6 + material: IRON_INGOT + amount: 6 lava_bucket: material: LAVA_BUCKET amount: 4 @@ -6801,7 +6801,7 @@ recipes: lore: - Crack it open for a surprise! outputs: - #Food--- 60% + #Food--- 60% egg: chance: 0.15 egg: @@ -6821,8 +6821,8 @@ recipes: chance: 0.15 bread: material: BREAD - amount: 8 - #Good Loot--- 30% + amount: 8 + #Good Loot--- 30% ironingot: chance: 0.0375 ironingot: @@ -6863,7 +6863,7 @@ recipes: goldenapple: material: GOLDEN_APPLE amount: 4 - #Unique--- 10% + #Unique--- 10% recipe1: chance: 0.01 recipe1: @@ -6920,11 +6920,11 @@ recipes: amount: 1 name: §dDeviled Eggs lore: - - Egg - - Mayonnaise - - Mustard - - Paprika - - Salt + - Egg + - Mayonnaise + - Mustard + - Paprika + - Salt - Pepper recipe6: chance: 0.01 @@ -6956,7 +6956,7 @@ recipes: rabbitpunch: chance: 0.01 rabbitkick: - material: RABBIT_FEET + material: RABBIT_FOOT amount: 1 lore: - Rabbit Kick! @@ -7088,7 +7088,7 @@ recipes: output: thing_banner_pattern: material: MOJANG_BANNER_PATTERN - amount: 1 + amount: 1 repair_printer: forceInclude: true type: REPAIR @@ -7102,7 +7102,7 @@ recipes: material: PAPER amount: 6 health_gained: 10000 - repair_station: + repair_station: forceInclude: true type: REPAIR name: Repair Station @@ -7286,7 +7286,7 @@ recipes: amount: 1 gravel: chance: 0.175 - gravel: + gravel: material: GRAVEL amount: 1 terracotta: @@ -7300,81 +7300,71 @@ recipes: vindicator: material: VINDICATOR_SPAWN_EGG amount: 1 - nbt: - EntityTag: - id: "minecraft:vindication_illager" + entity_data: + id: "minecraft:vindication_illager" vex: chance: 0.00047619047 vex: material: VEX_SPAWN_EGG amount: 1 - nbt: - EntityTag: - id: "minecraft:vex" + entity_data: + id: "minecraft:vex" silverfish: chance: 0.00047619047 silverfish: material: SILVERFISH_SPAWN_EGG amount: 1 - nbt: - EntityTag: - id: "minecraft:silverfish" + entity_data: + id: "minecraft:silverfish" endermite: chance: 0.00047619047 endermite: material: ENDERMITE_SPAWN_EGG amount: 1 - nbt: - EntityTag: - id: "minecraft:endermite" + entity_data: + id: "minecraft:endermite" zombiehorse: chance: 0.00047619047 zombiehorse: material: ZOMBIE_HORSE_SPAWN_EGG amount: 1 - nbt: - EntityTag: - id: "minecraft:zombie_horse" + entity_data: + id: "minecraft:zombie_horse" skeletonhorse: chance: 0.00047619047 skeletonhorse: material: SKELETON_HORSE_SPAWN_EGG amount: 1 - nbt: - EntityTag: - id: "minecraft:skeleton_horse" + entity_data: + id: "minecraft:skeleton_horse" donkey: chance: 0.00047619047 donkey: material: DONKEY_SPAWN_EGG amount: 1 - nbt: - EntityTag: - id: "minecraft:donkey" + entity_data: + id: "minecraft:donkey" polarbear: chance: 0.00047619047 polarbear: material: POLAR_BEAR_SPAWN_EGG amount: 1 - nbt: - EntityTag: - id: "minecraft:polar_bear" + entity_data: + id: "minecraft:polar_bear" parrot: chance: 0.00047619047 parrot: material: PARROT_SPAWN_EGG amount: 1 - nbt: - EntityTag: - id: "minecraft:parrot" + entity_data: + id: "minecraft:parrot" llama: chance: 0.00047619047 llama: material: LLAMA_SPAWN_EGG amount: 1 - nbt: - EntityTag: - id: "minecraft:llama" + entity_data: + id: "minecraft:llama" fox: chance: 0.00047619047 fox: @@ -7603,17 +7593,17 @@ recipes: amount: 1 record_otherside: chance: 0.000625 - record_otherside: + record_otherside: material: MUSIC_DISC_OTHERSIDE amount: 1 record_relic: chance: 0.000625 - record_relic: + record_relic: material: MUSIC_DISC_RELIC amount: 1 record_5: chance: 0.000625 - record_5: + record_5: material: MUSIC_DISC_5 amount: 1 #Resources - 25% (Divided seperately over all below) @@ -7967,7 +7957,7 @@ recipes: dirt: material: DIRT amount: 16 - health_gained: 10000 + health_gained: 10000 repair_gold_forge: production_time: 4s name: Repair Factory @@ -8008,7 +7998,7 @@ recipes: output: mangrove_propagule: material: MANGROVE_PROPAGULE - amount: 32 + amount: 32 grow_flowering_azalea_leaves: production_time: 4s fuel_consumption_intervall: 1s @@ -8147,7 +8137,7 @@ recipes: output: mushroom_stem: material: MUSHROOM_STEM - amount: 16 + amount: 16 grow_sculk: production_time: 4s fuel_consumption_intervall: 1s diff --git a/build.gradle.kts b/build.gradle.kts index 7fc926138..ac7f59e71 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,7 +1,7 @@ import com.gradle.enterprise.gradleplugin.GradleEnterpriseExtension plugins { - id("io.papermc.paperweight.userdev") version "1.5.10" apply false + id("io.papermc.paperweight.userdev") version "1.7.1" apply false id("com.github.johnrengelman.shadow") version "8.1.1" apply false id("xyz.jpenilla.run-paper") version "2.2.2" apply false } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 033e24c4c..d64cd4917 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 62f495dfe..1af9e0930 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index fcb6fca14..1aa94a426 100755 --- a/gradlew +++ b/gradlew @@ -83,7 +83,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -144,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -152,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -201,11 +202,11 @@ fi # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ diff --git a/plugins/banstick-paper/build.gradle.kts b/plugins/banstick-paper/build.gradle.kts index 5cb7f26ac..8ff4390bb 100644 --- a/plugins/banstick-paper/build.gradle.kts +++ b/plugins/banstick-paper/build.gradle.kts @@ -7,7 +7,7 @@ version = "2.0.1" dependencies { paperweight { - paperDevBundle("1.20.4-R0.1-SNAPSHOT") + paperDevBundle("1.20.6-R0.1-SNAPSHOT") } compileOnly(project(":plugins:civmodcore-paper")) diff --git a/plugins/banstick-paper/src/main/resources/plugin.yml b/plugins/banstick-paper/src/main/resources/plugin.yml index dd7eebe43..80cc8c7bb 100644 --- a/plugins/banstick-paper/src/main/resources/plugin.yml +++ b/plugins/banstick-paper/src/main/resources/plugin.yml @@ -3,7 +3,7 @@ version: ${version} main: com.programmerdan.minecraft.banstick.BanStick author: ProgrammerDan description: A plugin focused on better IP / VPN / CIDR tracking and justice delivery -api-version: 1.20 +api-version: 1.20.6 depend: [CivModCore] softdepend: [IP-Check, NameLayer] commands: diff --git a/plugins/bastion-paper/build.gradle.kts b/plugins/bastion-paper/build.gradle.kts index f28eaaff4..0282e0345 100644 --- a/plugins/bastion-paper/build.gradle.kts +++ b/plugins/bastion-paper/build.gradle.kts @@ -6,7 +6,7 @@ version = "3.0.1" dependencies { paperweight { - paperDevBundle("1.20.4-R0.1-SNAPSHOT") + paperDevBundle("1.20.6-R0.1-SNAPSHOT") } compileOnly(project(":plugins:civmodcore-paper")) diff --git a/plugins/bastion-paper/src/main/resources/plugin.yml b/plugins/bastion-paper/src/main/resources/plugin.yml index 767709cab..3863e7f35 100644 --- a/plugins/bastion-paper/src/main/resources/plugin.yml +++ b/plugins/bastion-paper/src/main/resources/plugin.yml @@ -4,7 +4,7 @@ main: isaac.bastion.Bastion author: spaceFountain authors: [Rourke750, ProgrammerDan, Maxopoly, TealNerd, Aleksey-Terzi] depend: [CivModCore, Citadel, NameLayer] -api-version: 1.20 +api-version: 1.20.6 commands: Bastion: description: Base command for Bastion diff --git a/plugins/build.gradle.kts b/plugins/build.gradle.kts index ba56cb1c9..054e48822 100644 --- a/plugins/build.gradle.kts +++ b/plugins/build.gradle.kts @@ -7,7 +7,7 @@ subprojects { configure { toolchain { - languageVersion.set(JavaLanguageVersion.of(17)) + languageVersion.set(JavaLanguageVersion.of(21)) } withSourcesJar() withJavadocJar() @@ -15,7 +15,7 @@ subprojects { tasks.withType { options.encoding = "UTF-8" - options.release = 17 + options.release = 21 } tasks.withType { diff --git a/plugins/castlegates-paper/build.gradle.kts b/plugins/castlegates-paper/build.gradle.kts index 0039e305a..0d743ce54 100644 --- a/plugins/castlegates-paper/build.gradle.kts +++ b/plugins/castlegates-paper/build.gradle.kts @@ -6,7 +6,7 @@ version = "2.0.2" dependencies { paperweight { - paperDevBundle("1.20.4-R0.1-SNAPSHOT") + paperDevBundle("1.20.6-R0.1-SNAPSHOT") } compileOnly(project(":plugins:civmodcore-paper")) diff --git a/plugins/castlegates-paper/src/main/java/com/aleksey/castlegates/utils/ParticleHelper.java b/plugins/castlegates-paper/src/main/java/com/aleksey/castlegates/utils/ParticleHelper.java index 1aa7662ac..264f76472 100644 --- a/plugins/castlegates-paper/src/main/java/com/aleksey/castlegates/utils/ParticleHelper.java +++ b/plugins/castlegates-paper/src/main/java/com/aleksey/castlegates/utils/ParticleHelper.java @@ -25,13 +25,12 @@ public class ParticleHelper { } public static void spawn(Location location, Type type) { - final Particle particle = type == Type.Info ? Particle.ENCHANTMENT_TABLE: Particle.EXPLOSION_NORMAL; + final Particle particle = type == Type.Info ? Particle.ENCHANT: Particle.EXPLOSION; final float offsetX = 0; final float offsetY = 0; final float offsetZ = 0; final float speed = 0.5f; final int particleCount = 80; - location.getWorld().spawnParticle(particle, location, particleCount, offsetX, offsetY, offsetZ, speed, null); } } diff --git a/plugins/castlegates-paper/src/main/resources/plugin.yml b/plugins/castlegates-paper/src/main/resources/plugin.yml index a645bd745..c734630c9 100644 --- a/plugins/castlegates-paper/src/main/resources/plugin.yml +++ b/plugins/castlegates-paper/src/main/resources/plugin.yml @@ -3,7 +3,7 @@ main: com.aleksey.castlegates.CastleGates version: ${version} author: Aleksey-Terzi description: 'Drawable gates and bridges' -api-version: 1.17 +api-version: 1.20.6 softdepend: [NameLayer, Citadel, Bastion, JukeAlert] commands: cg: diff --git a/plugins/citadel-paper/build.gradle.kts b/plugins/citadel-paper/build.gradle.kts index ddc80c1a7..b68191378 100644 --- a/plugins/citadel-paper/build.gradle.kts +++ b/plugins/citadel-paper/build.gradle.kts @@ -6,7 +6,7 @@ version = "5.2.4" dependencies { paperweight { - paperDevBundle("1.20.4-R0.1-SNAPSHOT") + paperDevBundle("1.20.6-R0.1-SNAPSHOT") } compileOnly(project(":plugins:civmodcore-paper")) diff --git a/plugins/citadel-paper/src/main/java/vg/civcraft/mc/citadel/listener/EntityListener.java b/plugins/citadel-paper/src/main/java/vg/civcraft/mc/citadel/listener/EntityListener.java index d2c545d53..0ae1c11ff 100644 --- a/plugins/citadel-paper/src/main/java/vg/civcraft/mc/citadel/listener/EntityListener.java +++ b/plugins/citadel-paper/src/main/java/vg/civcraft/mc/citadel/listener/EntityListener.java @@ -65,23 +65,23 @@ public class EntityListener implements Listener { } } - // Prevent Piglins and other "smart" mobs from opening reinforced doors, trapdoors, and fence gates - @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) - public void onOpenDoor(EntityInteractEvent eie) { - Material material = eie.getBlock().getType(); + // Prevent Piglins and other "smart" mobs from opening reinforced doors, trapdoors, and fence gates + @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) + public void onOpenDoor(EntityInteractEvent eie) { + Material material = eie.getBlock().getType(); - if (!(Tag.DOORS.isTagged(material) || Tag.TRAPDOORS.isTagged(material) || Tag.FENCE_GATES.isTagged(material))) { - return; - } + if (!(Tag.DOORS.isTagged(material) || Tag.TRAPDOORS.isTagged(material) || Tag.FENCE_GATES.isTagged(material))) { + return; + } - Reinforcement rein = ReinforcementLogic.getReinforcementProtecting(eie.getBlock()); - if (rein != null) { - eie.setCancelled(true); - if (eie.getEntity() instanceof Mob mob) { - mob.getPathfinder().stopPathfinding(); // Prevent trying to interact every tick - } - } - } + Reinforcement rein = ReinforcementLogic.getReinforcementProtecting(eie.getBlock()); + if (rein != null) { + eie.setCancelled(true); + if (eie.getEntity() instanceof Mob mob) { + mob.getPathfinder().stopPathfinding(); // Prevent trying to interact every tick + } + } + } // For some ungodly reason, when you break a block below a block with gravity, it spawns a FallingBlock entity // that then attempts to change the block. To prevent this change from ticking damage and creating a ghost block @@ -208,7 +208,7 @@ public class EntityListener implements Listener { @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) public void spawn(CreatureSpawnEvent cse) { EntityType type = cse.getEntityType(); - if (type != EntityType.IRON_GOLEM && type != EntityType.SNOWMAN && type != EntityType.WITHER + if (type != EntityType.IRON_GOLEM && type != EntityType.SNOW_GOLEM && type != EntityType.WITHER && type != EntityType.SILVERFISH) { return; } diff --git a/plugins/citadel-paper/src/main/resources/plugin.yml b/plugins/citadel-paper/src/main/resources/plugin.yml index 9754f680a..c9dff49c2 100644 --- a/plugins/citadel-paper/src/main/resources/plugin.yml +++ b/plugins/citadel-paper/src/main/resources/plugin.yml @@ -17,7 +17,7 @@ depend: softdepend: - HolographicDisplays description: Citadel allows you to make blocks difficult to break. When a block is reinforced, it must be broken many times before it is destroyed. -api-version: 1.20 +api-version: 1.20.6 permissions: citadel.admin: default: op diff --git a/plugins/civchat2-paper/build.gradle.kts b/plugins/civchat2-paper/build.gradle.kts index e55268d00..20b2aaec5 100644 --- a/plugins/civchat2-paper/build.gradle.kts +++ b/plugins/civchat2-paper/build.gradle.kts @@ -6,7 +6,7 @@ version = "2.2.2" dependencies { paperweight { - paperDevBundle("1.20.4-R0.1-SNAPSHOT") + paperDevBundle("1.20.6-R0.1-SNAPSHOT") } compileOnly(project(":plugins:civmodcore-paper")) diff --git a/plugins/civchat2-paper/src/main/java/vg/civcraft/mc/civchat2/listeners/CivChat2Listener.java b/plugins/civchat2-paper/src/main/java/vg/civcraft/mc/civchat2/listeners/CivChat2Listener.java index 433250d92..f8d04bcdd 100644 --- a/plugins/civchat2-paper/src/main/java/vg/civcraft/mc/civchat2/listeners/CivChat2Listener.java +++ b/plugins/civchat2-paper/src/main/java/vg/civcraft/mc/civchat2/listeners/CivChat2Listener.java @@ -1,5 +1,7 @@ package vg.civcraft.mc.civchat2.listeners; +import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.format.NamedTextColor; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.entity.Player; @@ -52,13 +54,17 @@ public class CivChat2Listener implements Listener { @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void onPlayerQuit(PlayerQuitEvent playerQuitEvent) { - playerQuitEvent.setQuitMessage(null); + playerQuitEvent.quitMessage(null); for (Player p : Bukkit.getOnlinePlayers()){ if (settings.getShowLeaves(p.getUniqueId()) && !db.isIgnoringPlayer(p.getUniqueId(), playerQuitEvent.getPlayer().getUniqueId())){ if (playerQuitEvent.getPlayer().hasPermission("civchat2.leavejoinimmune")) { continue; } - p.sendMessage(playerQuitEvent.getPlayer().getDisplayName() + ChatColor.YELLOW + " has left the game"); + p.sendMessage(playerQuitEvent.getPlayer().displayName() + .append(Component.text(" has left the game") + .color(NamedTextColor.YELLOW) + ) + ); } } } @@ -66,14 +72,18 @@ public class CivChat2Listener implements Listener { @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void onPlayerJoin(PlayerJoinEvent playerJoinEvent) { if (!CivChat2.getInstance().getPluginConfig().getLoginAnnounce()) { - playerJoinEvent.setJoinMessage(null); + playerJoinEvent.joinMessage(null); } for (Player p : Bukkit.getOnlinePlayers()) { if (settings.getShowJoins(p.getUniqueId()) && !db.isIgnoringPlayer(p.getUniqueId(), playerJoinEvent.getPlayer().getUniqueId())) { if (playerJoinEvent.getPlayer().hasPermission("civchat2.leavejoinimmune")) { continue; } - p.sendMessage(playerJoinEvent.getPlayer().getDisplayName() + ChatColor.YELLOW + " has joined the game"); + p.sendMessage(playerJoinEvent.getPlayer().displayName() + .append(Component.text(" has joined the game") + .color(NamedTextColor.YELLOW) + ) + ); } } diff --git a/plugins/civchat2-paper/src/main/resources/plugin.yml b/plugins/civchat2-paper/src/main/resources/plugin.yml index d6dc0e5e2..29617766b 100644 --- a/plugins/civchat2-paper/src/main/resources/plugin.yml +++ b/plugins/civchat2-paper/src/main/resources/plugin.yml @@ -1,7 +1,7 @@ name: CivChat2 main: vg.civcraft.mc.civchat2.CivChat2 version: ${version} -api-version: 1.16 +api-version: 1.20.6 authors: - jjj5311 - Maxopoly diff --git a/plugins/civduties-paper/build.gradle.kts b/plugins/civduties-paper/build.gradle.kts index 78754bfe1..5f77ce864 100644 --- a/plugins/civduties-paper/build.gradle.kts +++ b/plugins/civduties-paper/build.gradle.kts @@ -6,7 +6,7 @@ version = "1.5.0-SNAPSHOT" dependencies { paperweight { - paperDevBundle("1.20.4-R0.1-SNAPSHOT") + paperDevBundle("1.20.6-R0.1-SNAPSHOT") } compileOnly(project(":plugins:civmodcore-paper")) diff --git a/plugins/civduties-paper/src/main/java/vg/civcraft/mc/civduties/ModeManager.java b/plugins/civduties-paper/src/main/java/vg/civcraft/mc/civduties/ModeManager.java index 14ab61ff0..e177fb636 100644 --- a/plugins/civduties-paper/src/main/java/vg/civcraft/mc/civduties/ModeManager.java +++ b/plugins/civduties-paper/src/main/java/vg/civcraft/mc/civduties/ModeManager.java @@ -8,7 +8,7 @@ import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.GameMode; import org.bukkit.Location; -import org.bukkit.craftbukkit.v1_20_R3.entity.CraftPlayer; +import org.bukkit.craftbukkit.entity.CraftPlayer; import org.bukkit.entity.Player; import vg.civcraft.mc.civduties.configuration.Command; import vg.civcraft.mc.civduties.configuration.Command.Timing; diff --git a/plugins/civduties-paper/src/main/resources/plugin.yml b/plugins/civduties-paper/src/main/resources/plugin.yml index d38133caf..34ec19494 100644 --- a/plugins/civduties-paper/src/main/resources/plugin.yml +++ b/plugins/civduties-paper/src/main/resources/plugin.yml @@ -3,7 +3,7 @@ main: vg.civcraft.mc.civduties.CivDuties version: ${version} depend: [CivModCore] softdepend: [Vault] -api-version: 1.16 +api-version: 1.20.6 commands: duty: permission: civduties.duty diff --git a/plugins/civmodcore-paper/build.gradle.kts b/plugins/civmodcore-paper/build.gradle.kts index 3c32f58f1..45984ca3a 100644 --- a/plugins/civmodcore-paper/build.gradle.kts +++ b/plugins/civmodcore-paper/build.gradle.kts @@ -8,7 +8,7 @@ version = "3.0.6" dependencies { paperweight { - paperDevBundle("1.20.4-R0.1-SNAPSHOT") + paperDevBundle("1.20.6-R0.1-SNAPSHOT") } api("co.aikar:acf-bukkit:0.5.1-SNAPSHOT") diff --git a/plugins/civmodcore-paper/src/main/java/org/bukkit/pseudo/PseudoServer.java b/plugins/civmodcore-paper/src/main/java/org/bukkit/pseudo/PseudoServer.java index e3e8764b1..298083b4f 100644 --- a/plugins/civmodcore-paper/src/main/java/org/bukkit/pseudo/PseudoServer.java +++ b/plugins/civmodcore-paper/src/main/java/org/bukkit/pseudo/PseudoServer.java @@ -43,11 +43,12 @@ import org.bukkit.command.CommandMap; import org.bukkit.command.CommandSender; import org.bukkit.command.ConsoleCommandSender; import org.bukkit.command.PluginCommand; -import org.bukkit.craftbukkit.v1_20_R3.block.data.CraftBlockData; -import org.bukkit.craftbukkit.v1_20_R3.inventory.CraftItemFactory; -import org.bukkit.craftbukkit.v1_20_R3.util.CraftMagicNumbers; -import org.bukkit.craftbukkit.v1_20_R3.util.Versioning; +import org.bukkit.craftbukkit.block.data.CraftBlockData; +import org.bukkit.craftbukkit.inventory.CraftItemFactory; +import org.bukkit.craftbukkit.util.CraftMagicNumbers; +import org.bukkit.craftbukkit.util.Versioning; import org.bukkit.entity.Entity; +import org.bukkit.entity.EntityFactory; import org.bukkit.entity.Player; import org.bukkit.entity.SpawnCategory; import org.bukkit.event.inventory.InventoryType; @@ -122,6 +123,11 @@ public class PseudoServer implements Server { return CraftItemFactory.instance(); } + @Override + public @NotNull EntityFactory getEntityFactory() { + return null; + } + @Nonnull @Override public UnsafeValues getUnsafe() { @@ -131,7 +137,7 @@ public class PseudoServer implements Server { @Nonnull @Override public BlockData createBlockData(@Nonnull final Material material) { - return CraftBlockData.newData(material, null); + return CraftBlockData.newData(material.asBlockType(), null); } @Override @@ -637,6 +643,11 @@ public class PseudoServer implements Server { return false; } + @Override + public boolean isAcceptingTransfers() { + return false; + } + @Override public boolean getHideOnlinePlayers() { throw new NotImplementedException(); @@ -697,19 +708,19 @@ public class PseudoServer implements Server { @Override public org.bukkit.profile.@NotNull PlayerProfile createPlayerProfile( - @org.jetbrains.annotations.Nullable UUID uniqueId, @org.jetbrains.annotations.Nullable String name) { + @org.jetbrains.annotations.Nullable UUID uniqueId, @org.jetbrains.annotations.Nullable String name) { throw new NotImplementedException(); } @Override public org.bukkit.profile.@NotNull PlayerProfile createPlayerProfile( - @NotNull UUID uniqueId) { + @NotNull UUID uniqueId) { throw new NotImplementedException(); } @Override public org.bukkit.profile.@NotNull PlayerProfile createPlayerProfile( - @NotNull String name) { + @NotNull String name) { throw new NotImplementedException(); } @@ -744,12 +755,12 @@ public class PseudoServer implements Server { public Set getBannedPlayers() { throw new NotImplementedException(); } - + @Override public , E> @NotNull B getBanList(@NotNull BanListType banListType) { return null; } - + @Nonnull @Override public > T getBanList(@Nonnull final BanList.Type type) { @@ -781,7 +792,7 @@ public class PseudoServer implements Server { @Override public @NotNull CommandSender createCommandSender( - @NotNull Consumer feedback) { + @NotNull Consumer feedback) { throw new NotImplementedException(); } @@ -989,7 +1000,7 @@ public class PseudoServer implements Server { @Override public ChunkGenerator.@NotNull ChunkData createVanillaChunkData( - @NotNull World world, int x, int z) { + @NotNull World world, int x, int z) { throw new NotImplementedException(); } diff --git a/plugins/civmodcore-paper/src/main/java/vg/civcraft/mc/civmodcore/chat/ChatUtils.java b/plugins/civmodcore-paper/src/main/java/vg/civcraft/mc/civmodcore/chat/ChatUtils.java index a308a398a..c27a4de22 100644 --- a/plugins/civmodcore-paper/src/main/java/vg/civcraft/mc/civmodcore/chat/ChatUtils.java +++ b/plugins/civmodcore-paper/src/main/java/vg/civcraft/mc/civmodcore/chat/ChatUtils.java @@ -19,7 +19,7 @@ import net.md_5.bungee.api.ChatColor; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; -import org.bukkit.craftbukkit.v1_20_R3.util.CraftChatMessage; +import org.bukkit.craftbukkit.util.CraftChatMessage; import org.bukkit.inventory.ItemStack; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; @@ -34,21 +34,21 @@ public final class ChatUtils { */ @Deprecated public static final List COLOURS = List.of( - ChatColor.BLACK, - ChatColor.DARK_BLUE, - ChatColor.DARK_GREEN, - ChatColor.DARK_AQUA, - ChatColor.DARK_RED, - ChatColor.DARK_PURPLE, - ChatColor.GOLD, - ChatColor.GRAY, - ChatColor.DARK_GRAY, - ChatColor.BLUE, - ChatColor.GREEN, - ChatColor.AQUA, - ChatColor.RED, - ChatColor.LIGHT_PURPLE, - ChatColor.YELLOW); + ChatColor.BLACK, + ChatColor.DARK_BLUE, + ChatColor.DARK_GREEN, + ChatColor.DARK_AQUA, + ChatColor.DARK_RED, + ChatColor.DARK_PURPLE, + ChatColor.GOLD, + ChatColor.GRAY, + ChatColor.DARK_GRAY, + ChatColor.BLUE, + ChatColor.GREEN, + ChatColor.AQUA, + ChatColor.RED, + ChatColor.LIGHT_PURPLE, + ChatColor.YELLOW); /** * Converts an RGB value into a Bungee ChatColor. @@ -84,7 +84,7 @@ public final class ChatUtils { for (final ChatColor currentColour : COLOURS) { final Color currentColor = currentColour.getColor(); final double distance = Math.sqrt( - Math.pow(color.getRed() - currentColor.getRed(), 2) + Math.pow(color.getRed() - currentColor.getRed(), 2) - Math.pow(color.getGreen() - currentColor.getGreen(), 2) - Math.pow(color.getBlue() - currentColor.getBlue(), 2)); if (nearestDistance > distance) { @@ -141,51 +141,51 @@ public final class ChatUtils { @Deprecated public static String parseColorTags(@Nonnull String string) { return string - .replace("", ChatColor.BLACK.toString()) - .replace("", ChatColor.DARK_BLUE.toString()) - .replace("", ChatColor.DARK_GREEN.toString()) - .replace("", ChatColor.DARK_AQUA.toString()) - .replace("", ChatColor.DARK_RED.toString()) - .replace("", ChatColor.DARK_PURPLE.toString()) - .replace("", ChatColor.GOLD.toString()) - .replace("", ChatColor.GRAY.toString()) // This has to be lgray because gray is already claimed. - .replace("", ChatColor.DARK_GRAY.toString()) - .replace("", ChatColor.BLUE.toString()) - .replace("", ChatColor.GREEN.toString()) - .replace("", ChatColor.AQUA.toString()) - .replace("", ChatColor.RED.toString()) - .replace("", ChatColor.LIGHT_PURPLE.toString()) - .replace("", ChatColor.YELLOW.toString()) - .replace("", ChatColor.WHITE.toString()) - .replace("", ChatColor.STRIKETHROUGH.toString()) - .replace("", ChatColor.UNDERLINE.toString()) - .replace("