Skip to content

Commit

Permalink
Fix death message custom embed
Browse files Browse the repository at this point in the history
Signed-off-by: ErdbeerbaerLP <[email protected]>
  • Loading branch information
ErdbeerbaerLP committed Nov 28, 2023
1 parent 629d135 commit a3ac322
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ apply plugin: 'org.spongepowered.mixin'


//Build variables
version = "3.0.4"
version = "3.0.4.1"
group = "de.erdbeerbaerlp.dcintegration"
archivesBaseName = "dcintegration-forge"

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
# This is required to provide enough memory for the Minecraft decompilation process.
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
changelog=More bug fixes\nImplement permissions
changelog=Fix death message custom embed
releaseType = BETA
mcVersion = 1.20.1
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,8 @@ public void death(LivingDeathEvent ev) {
final MessageEmbed embed = ForgeMessageUtils.genItemStackEmbedIfAvailable(deathMessage);
if (Configuration.instance().embedMode.enabled && Configuration.instance().embedMode.deathMessage.asEmbed) {
final String avatarURL = Configuration.instance().webhook.playerAvatarURL.replace("%uuid%", ev.getEntity().getUUID().toString()).replace("%uuid_dashless%", ev.getEntity().getUUID().toString().replace("-", "")).replace("%name%", ev.getEntity().getName().getString()).replace("%randomUUID%", UUID.randomUUID().toString());
if (!Configuration.instance().embedMode.playerJoinMessage.customJSON.isBlank()) {
final EmbedBuilder b = Configuration.instance().embedMode.playerJoinMessage.toEmbedJson(Configuration.instance().embedMode.playerJoinMessage.customJSON
if (!Configuration.instance().embedMode.deathMessage.customJSON.isBlank()) {
final EmbedBuilder b = Configuration.instance().embedMode.deathMessage.toEmbedJson(Configuration.instance().embedMode.deathMessage.customJSON
.replace("%uuid%", ev.getEntity().getUUID().toString())
.replace("%uuid_dashless%", ev.getEntity().getUUID().toString().replace("-", ""))
.replace("%name%", ForgeMessageUtils.formatPlayerName(ev.getEntity()))
Expand Down
4 changes: 4 additions & 0 deletions update_checker.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
[
{
"version": "3.0.4.1",
"changelog": "Fix death message custom embed",
"type": "beta"
},{
"version": "3.0.4",
"changelog": "More bug fixes\nImplement permissions",
"type": "beta"
Expand Down

0 comments on commit a3ac322

Please sign in to comment.