Send chat messages directly when the player does not have the required permissions for /say
This commit is contained in:
parent
73c55de5b4
commit
30b3985658
|
@ -14,5 +14,13 @@ data class Macro(
|
|||
@JvmField var command: String,
|
||||
override var title: String = command
|
||||
): ButtonImpl() {
|
||||
override fun execAction() = Minecraft.getInstance().player!!.chat("/$command")
|
||||
override fun execAction() = with(Minecraft.getInstance().player) {
|
||||
chat(
|
||||
"/$command".let {
|
||||
if (it.startsWith("/say") && !hasPermissions(2)) {
|
||||
it.drop(5)
|
||||
} else it
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue