mirror of
https://github.com/GayPizzaSpecifications/foundation.git
synced 2025-08-02 13:10:55 +00:00
/megatnt command
This commit is contained in:
parent
495601d085
commit
ef6daa8467
@ -4,8 +4,9 @@ plugins {
|
||||
|
||||
dependencies {
|
||||
// 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("org.quartz-scheduler:quartz:2.3.2")
|
||||
implementation("com.google.guava:guava:31.0.1-jre")
|
||||
|
||||
api(project(":common-plugin"))
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -61,10 +61,16 @@ commands:
|
||||
localweather:
|
||||
description: Set the player's local weather in the client.
|
||||
usage: /localweather <type>
|
||||
permission: foundation.command.localweather
|
||||
aliases:
|
||||
- lw
|
||||
goose:
|
||||
description: Goose
|
||||
usage: /goose
|
||||
permission: foundation.command.goose
|
||||
aliases:
|
||||
- the_most_wonderful_kitty_ever
|
||||
megatnt:
|
||||
description: Mega TNT
|
||||
usage: /megatnt
|
||||
permission: foundation.command.megatnt
|
||||
|
Loading…
Reference in New Issue
Block a user