/megatnt command

This commit is contained in:
Alex Zenla 2023-02-04 22:59:00 -08:00
parent 495601d085
commit ef6daa8467
Signed by: alex
GPG Key ID: C0780728420EBFE5
4 changed files with 34 additions and 1 deletions

View File

@ -4,8 +4,9 @@ plugins {
dependencies { dependencies {
// TODO: might be able to ship all dependencies in core? are we duplicating classes in JARs? // TODO: might be able to ship all dependencies in core? are we duplicating classes in JARs?
implementation("software.amazon.awssdk:s3:2.17.102") implementation("software.amazon.awssdk:s3:2.17.102")
implementation("org.quartz-scheduler:quartz:2.3.2") implementation("org.quartz-scheduler:quartz:2.3.2")
implementation("com.google.guava:guava:31.0.1-jre") implementation("com.google.guava:guava:31.0.1-jre")
api(project(":common-plugin"))
} }

View File

@ -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
}
}

View File

@ -48,6 +48,7 @@ class PlayerFeature : Feature() {
registerCommandExecutor(listOf("spectator", "sp"), GamemodeCommand(GameMode.SPECTATOR)) registerCommandExecutor(listOf("spectator", "sp"), GamemodeCommand(GameMode.SPECTATOR))
registerCommandExecutor(listOf("localweather", "lw"), LocalWeatherCommand()) registerCommandExecutor(listOf("localweather", "lw"), LocalWeatherCommand())
registerCommandExecutor(listOf("goose", "the_most_wonderful_kitty_ever"), GooseCommand()) registerCommandExecutor(listOf("goose", "the_most_wonderful_kitty_ever"), GooseCommand())
registerCommandExecutor(listOf("megatnt"), MegaTntCommand())
} }
override fun module() = org.koin.dsl.module { override fun module() = org.koin.dsl.module {

View File

@ -61,10 +61,16 @@ commands:
localweather: localweather:
description: Set the player's local weather in the client. description: Set the player's local weather in the client.
usage: /localweather <type> usage: /localweather <type>
permission: foundation.command.localweather
aliases: aliases:
- lw - lw
goose: goose:
description: Goose description: Goose
usage: /goose usage: /goose
permission: foundation.command.goose
aliases: aliases:
- the_most_wonderful_kitty_ever - the_most_wonderful_kitty_ever
megatnt:
description: Mega TNT
usage: /megatnt
permission: foundation.command.megatnt