diff --git a/foundation-core/build.gradle.kts b/foundation-core/build.gradle.kts index a08af88..586b312 100644 --- a/foundation-core/build.gradle.kts +++ b/foundation-core/build.gradle.kts @@ -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")) } diff --git a/foundation-core/src/main/kotlin/gay/pizza/foundation/core/features/player/MegaTntCommand.kt b/foundation-core/src/main/kotlin/gay/pizza/foundation/core/features/player/MegaTntCommand.kt new file mode 100644 index 0000000..6bd03f1 --- /dev/null +++ b/foundation-core/src/main/kotlin/gay/pizza/foundation/core/features/player/MegaTntCommand.kt @@ -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): 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 + } +} diff --git a/foundation-core/src/main/kotlin/gay/pizza/foundation/core/features/player/PlayerFeature.kt b/foundation-core/src/main/kotlin/gay/pizza/foundation/core/features/player/PlayerFeature.kt index 4196081..7a0db1d 100644 --- a/foundation-core/src/main/kotlin/gay/pizza/foundation/core/features/player/PlayerFeature.kt +++ b/foundation-core/src/main/kotlin/gay/pizza/foundation/core/features/player/PlayerFeature.kt @@ -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 { diff --git a/foundation-core/src/main/resources/plugin.yml b/foundation-core/src/main/resources/plugin.yml index cb8c21f..79235f4 100644 --- a/foundation-core/src/main/resources/plugin.yml +++ b/foundation-core/src/main/resources/plugin.yml @@ -61,10 +61,16 @@ commands: localweather: description: Set the player's local weather in the client. usage: /localweather + 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