mirror of
https://github.com/5vl/Troll.git
synced 2025-05-24 02:17:03 +00:00
Added explode feature
This commit is contained in:
parent
e02ed3a142
commit
7501801e48
@ -44,4 +44,9 @@ object Trolls {
|
|||||||
ps.playSound(ps.location, Sound.ENTITY_CREEPER_PRIMED, 1.0f, 1.0f)
|
ps.playSound(ps.location, Sound.ENTITY_CREEPER_PRIMED, 1.0f, 1.0f)
|
||||||
p.sendMessage(Utils.color("<color:#4747ff>${ps.name} has been scared!</color>"))
|
p.sendMessage(Utils.color("<color:#4747ff>${ps.name} has been scared!</color>"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun explode(p: Player, ps: Player) {
|
||||||
|
ps.location.createExplosion(1.0f, false, false)
|
||||||
|
p.sendMessage(Utils.color("<color:#4747ff>${ps.name} has been exploded!</color>"))
|
||||||
|
}
|
||||||
}
|
}
|
@ -17,6 +17,7 @@ object TrollGui {
|
|||||||
gui.setItem(3, getSpinItem())
|
gui.setItem(3, getSpinItem())
|
||||||
gui.setItem(4, getIgniteItem())
|
gui.setItem(4, getIgniteItem())
|
||||||
gui.setItem(5, getScareItem())
|
gui.setItem(5, getScareItem())
|
||||||
|
gui.setItem(6, getExplodeItem())
|
||||||
inTrollGui[from] = target
|
inTrollGui[from] = target
|
||||||
return gui
|
return gui
|
||||||
}
|
}
|
||||||
@ -75,6 +76,15 @@ object TrollGui {
|
|||||||
return item
|
return item
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun getExplodeItem(): ItemStack {
|
||||||
|
val item = ItemStack(Material.TNT)
|
||||||
|
val meta = item.itemMeta
|
||||||
|
meta.displayName(Utils.color("<color:#780600>Explode</color>"))
|
||||||
|
meta.lore(Utils.loreBuilder("This will explode the player.", "Will do damage but won't break blocks!"))
|
||||||
|
item.itemMeta = meta
|
||||||
|
return item
|
||||||
|
}
|
||||||
|
|
||||||
/* ITEM DEFAULT SETUP
|
/* ITEM DEFAULT SETUP
|
||||||
private fun item(): ItemStack {
|
private fun item(): ItemStack {
|
||||||
val item = ItemStack(Material.)
|
val item = ItemStack(Material.)
|
||||||
|
@ -21,6 +21,7 @@ class InvClickListener : Listener {
|
|||||||
3 -> Trolls.spin(p, ps)
|
3 -> Trolls.spin(p, ps)
|
||||||
4 -> Trolls.ignite(p, ps)
|
4 -> Trolls.ignite(p, ps)
|
||||||
5 -> Trolls.scare(p, ps)
|
5 -> Trolls.scare(p, ps)
|
||||||
|
6 -> Trolls.explode(p, ps)
|
||||||
}
|
}
|
||||||
TrollGui.inTrollGui.remove(p)
|
TrollGui.inTrollGui.remove(p)
|
||||||
p.closeInventory()
|
p.closeInventory()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user