Skip to content

Commit

Permalink
MultiBUttons
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRedMagic committed Feb 20, 2024
1 parent 16d450d commit 41561e0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ publishing {
create<MavenPublication>("maven") {
groupId = "com.redmagic"
artifactId = "UndefinedAPI"
version = "1.0.0"
version = "0.3.3"

from(components["java"])
}
}
}

group = "com.redmagic"
version = "1.0.0"
version = "0.3.3"

repositories {
mavenCentral()
Expand Down
7 changes: 0 additions & 7 deletions jitpack.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.redmagic.undefinedapi.menu.normal

import com.redmagic.undefinedapi.menu.MenuSize
import com.redmagic.undefinedapi.menu.normal.button.Button
import com.redmagic.undefinedapi.menu.normal.button.ClickData
import org.bukkit.Bukkit
import org.bukkit.inventory.Inventory
import org.bukkit.inventory.ItemStack
Expand Down Expand Up @@ -86,6 +87,10 @@ abstract class UndefinedMenu(private val title: String, private val size: Int) {
buttons.add(button)
}

fun Inventory.addButtons(slot: List<Int>, consumer: ClickData.() -> Unit){
slot.forEach { addButton(Button(it, consumer)) }
}

/**
* Fills the empty slots of the inventory with the given item stack.
*
Expand Down

0 comments on commit 41561e0

Please sign in to comment.