mirror of
https://github.com/GayPizzaSpecifications/foundation.git
synced 2025-09-23 19:21:32 +00:00
/megatnt command
This commit is contained in:
@ -0,0 +1,25 @@
|
||||
package gay.pizza.foundation.core.features.player
|
||||
|
||||
import gay.pizza.foundation.common.spawn
|
||||
import org.bukkit.command.Command
|
||||
import org.bukkit.command.CommandExecutor
|
||||
import org.bukkit.command.CommandSender
|
||||
import org.bukkit.entity.Player
|
||||
import org.bukkit.entity.TNTPrimed
|
||||
|
||||
class MegaTntCommand : CommandExecutor {
|
||||
override fun onCommand(
|
||||
sender: CommandSender,
|
||||
command: Command,
|
||||
label: String,
|
||||
args: Array<out String>): Boolean {
|
||||
if (sender !is Player) {
|
||||
sender.sendMessage("Player is required for this command.")
|
||||
return true
|
||||
}
|
||||
val tnt = sender.spawn(TNTPrimed::class)
|
||||
tnt.fuseTicks = 1
|
||||
tnt.yield = 50.0f
|
||||
return true
|
||||
}
|
||||
}
|
@ -48,6 +48,7 @@ class PlayerFeature : Feature() {
|
||||
registerCommandExecutor(listOf("spectator", "sp"), GamemodeCommand(GameMode.SPECTATOR))
|
||||
registerCommandExecutor(listOf("localweather", "lw"), LocalWeatherCommand())
|
||||
registerCommandExecutor(listOf("goose", "the_most_wonderful_kitty_ever"), GooseCommand())
|
||||
registerCommandExecutor(listOf("megatnt"), MegaTntCommand())
|
||||
}
|
||||
|
||||
override fun module() = org.koin.dsl.module {
|
||||
|
Reference in New Issue
Block a user