Skip to content

Commit

Permalink
Remove 'Insert -> [...] ID' if a non-ID-based version is selected
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgio committed Jul 17, 2018
1 parent 69b9b24 commit 77b6060
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions src/org/chorusmc/chorus/menus/drop/InsertDropMenu.kt
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
package org.chorusmc.chorus.menus.drop

import org.chorusmc.chorus.minecraft.McClass

/**
* @author Gio
*/
class InsertDropMenu : DropMenu() {

override fun getButtons(): MutableList<DropMenuButton> = arrayListOf(
DropMenuButton("Colored text", "insert"),
DropMenuButton("Item name", "insert"),
DropMenuButton("Item ID", "insert"),
DropMenuButton("Particle name", "insert"),
DropMenuButton("Effect name", "insert"),
DropMenuButton("Effect ID", "insert"),
DropMenuButton("Sound name", "insert"),
DropMenuButton("Entity name", "insert"),
DropMenuButton("Enchantment name", "insert"),
DropMenuButton("Enchantment ID", "insert"),
DropMenuButton("Ticks", "insert")
)
override fun getButtons(): MutableList<DropMenuButton> {
val array = arrayListOf(
DropMenuButton("Colored text", "insert"),
DropMenuButton("Item name", "insert"),
DropMenuButton("Particle name", "insert"),
DropMenuButton("Effect name", "insert"),
DropMenuButton("Sound name", "insert"),
DropMenuButton("Entity name", "insert"),
DropMenuButton("Enchantment name", "insert"),
DropMenuButton("Ticks", "insert")
)
if(McClass("").version == "1.12") {
array.add(2, DropMenuButton("Item ID", "insert"))
array.add(5, DropMenuButton("Effect ID", "insert"))
array.add(9, DropMenuButton("Enchantment ID", "insert"))
}
return array
}
}

0 comments on commit 77b6060

Please sign in to comment.