Add a null assertion to the Macro data class
This commit is contained in:
parent
4793b033ff
commit
4231398197
|
@ -14,7 +14,7 @@ data class Macro(
|
||||||
@JvmField var command: String,
|
@JvmField var command: String,
|
||||||
override var title: String = command
|
override var title: String = command
|
||||||
): ButtonImpl() {
|
): ButtonImpl() {
|
||||||
override fun execAction() = with(Minecraft.getInstance().player) {
|
override fun execAction(): Unit = with(Minecraft.getInstance().player!!) {
|
||||||
chat(
|
chat(
|
||||||
"/$command".let {
|
"/$command".let {
|
||||||
if (it.startsWith("/say") && !hasPermissions(2)) {
|
if (it.startsWith("/say") && !hasPermissions(2)) {
|
||||||
|
|
Loading…
Reference in New Issue