Skip to content

Commit eb30c25

Browse files
Send a chat message when the user tries to run /p list without a party
1 parent 1755207 commit eb30c25

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/main/kotlin/com/bluedragonmc/server/command/PartyCommand.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import com.bluedragonmc.server.utils.miniMessage
66
import com.bluedragonmc.server.utils.plus
77
import com.bluedragonmc.server.utils.surroundWithSeparators
88
import net.kyori.adventure.text.Component
9+
import net.kyori.adventure.text.format.NamedTextColor
910
import net.minestom.server.entity.Player
1011

1112
class PartyCommand(name: String, usageString: String, vararg aliases: String) :
@@ -86,6 +87,8 @@ class PartyCommand(name: String, usageString: String, vararg aliases: String) :
8687
*members.map { miniMessage.deserialize(it.username) }.toTypedArray()
8788
)
8889
sender.sendMessage((leaderText + Component.newline() + membersText).surroundWithSeparators())
90+
} else {
91+
sender.sendMessage(Component.translatable("puffin.party.list.not_found", NamedTextColor.RED))
8992
}
9093
}
9194
}

src/main/resources/lang_en.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@ puffin.party.join.no_invitation=You don't have an invitation to that party!
456456

457457
puffin.party.list.leader=Party Leader: {0}
458458
puffin.party.list.members=Members ({0}): {1}
459+
puffin.party.list.not_found=You are not in a party.
459460

460461
puffin.queue.not_enough_space=You couldn't be sent to {0}: Server is full
461462
puffin.party.game_join_disallowed.not_leader=You must be the leader of a party to do this.

0 commit comments

Comments
 (0)