Skip to content

Commit

Permalink
3.0.6: Updated to 1.21.3 (#75)
Browse files Browse the repository at this point in the history
* Updated to 1.21.3

* Revert upgrading minimum voicechat API version and add 1.21.4 as supported

* Cast to ServerPlayerEntity instead of PlayerEntity to avoid required overlay argument

* Revert qualifying ClickEvent and TextColor

* Add better workaround for getBukkitSender being removed

---------

Co-authored-by: amsam0 <44983869+amsam0@users.noreply.github.com>
  • Loading branch information
AlexDerProGamer and amsam0 authored Jan 5, 2025
1 parent 917e1dd commit f249e75
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
20 changes: 12 additions & 8 deletions buildSrc/src/main/kotlin/Properties.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ object Properties {

/* Paper */
const val paperApiVersion = "1.19"
const val paperMinecraftDevVersion = "1.21"
const val paperDevBundleVersion = "1.21-R0.1-SNAPSHOT"
const val paperMinecraftDevVersion = "1.21.3"
const val paperDevBundleVersion = "1.21.3-R0.1-SNAPSHOT"

/* Fabric (https://fabricmc.net/develop) */
const val fabricLoaderRequiredVersion = "0.14.22"
const val fabricMinecraftDevVersion = "1.21"
const val yarnMappingsDevVersion = "$fabricMinecraftDevVersion+build.7"
const val fabricLoaderDevVersion = "0.15.11"
const val fabricApiDevVersion = "0.100.4+$fabricMinecraftDevVersion"
const val fabricMinecraftDevVersion = "1.21.3"
const val yarnMappingsDevVersion = "$fabricMinecraftDevVersion+build.2"
const val fabricLoaderDevVersion = "0.16.9"
const val fabricApiDevVersion = "0.107.3+$fabricMinecraftDevVersion"

/* Dependencies */
const val voicechatApiVersion = "2.4.11"
const val voicechatModRuntimeVersion = "2.5.16"
const val voicechatModRuntimeVersion = "2.5.25"
const val yamlConfigurationVersion = "2.0.2"
const val javaSemverVersion = "0.10.2"
const val gsonVersion = "2.10.1"
Expand All @@ -42,7 +42,11 @@ object Properties {
"1.20.4",
"1.20.5",
"1.20.6",
"1.21"
"1.21",
"1.21.1",
"1.21.2",
"1.21.3",
"1.21.4"
)

/* Gradle Plugins */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ else if (sender instanceof CommandContext<?> context) {
}

public void sendMessage(Player player, String message) {
((PlayerEntity) player.getPlayer()).sendMessage(toNative(mm(message)));
((ServerPlayerEntity) player.getPlayer()).sendMessage(toNative(mm(message)));
}

public String getName(Player player) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import de.maxhenkel.voicechat.api.Position;
import de.maxhenkel.voicechat.api.ServerLevel;
import de.maxhenkel.voicechat.api.ServerPlayer;
import org.bukkit.Bukkit;
import org.bukkit.World;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Entity;
Expand Down Expand Up @@ -56,7 +57,7 @@ public ServerPlayer commandContextToPlayer(CommandContext<?> context) {
}
}
if (nmsEntity == null) return null;
@SuppressWarnings("DataFlowIssue") Entity entity = (Entity) nmsEntity.getBukkitSender(null);
Entity entity = nmsEntity.getBukkitEntity();
return api.createPosition(
entity.getLocation().getX(),
entity.getLocation().getY(),
Expand Down

0 comments on commit f249e75

Please sign in to comment.