mirror of
https://github.com/GayPizzaSpecifications/foundation.git
synced 2025-08-03 05:30:55 +00:00
/megatnt command
This commit is contained in:
parent
495601d085
commit
ef6daa8467
@ -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"))
|
||||||
}
|
}
|
||||||
|
@ -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("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 {
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user