Inital scream

This commit is contained in:
Liliesh 2025-12-06 10:25:33 +01:00
commit d68f4c34fa
Signed by: liliesh
GPG key ID: 680387646C7BAE8E
37 changed files with 528 additions and 0 deletions

View file

@ -0,0 +1,24 @@
package world.pinkhaj.boxOfMeow
import org.bukkit.configuration.file.FileConfiguration
import org.bukkit.plugin.java.JavaPlugin
import world.pinkhaj.boxOfMeow.other.ConsoleColor
import world.pinkhaj.boxOfMeow.other.sounds.ChatNotification
class BoxOfMeow : JavaPlugin() {
val fileConfiguration = this.config
override fun onEnable() {
this.saveDefaultConfig()
registerEvents()
println(ConsoleColor.BLUE.raw + "[Meow] Activated :3" + ConsoleColor.RESET.raw)
}
override fun onDisable() {
println(ConsoleColor.BLUE.raw + "[Meow] Goodbye nya :3" + ConsoleColor.RESET.raw)
}
fun registerEvents() {
this.server.pluginManager.registerEvents(ChatNotification(), this)
}
}

View file

@ -0,0 +1,13 @@
package world.pinkhaj.boxOfMeow.other
enum class ConsoleColor(val raw: String) {
RESET("\u001B[0m"),
BLACK("\u001B[30m"),
RED("\u001B[31m"),
GREEN("\u001B[32m"),
YELLOW("\u001B[33m"),
BLUE("\u001B[34m"),
PURPLE("\u001B[35m"),
CYAN("\u001B[36m"),
WHITE("\u001B[37m")
}

View file

@ -0,0 +1,20 @@
package world.pinkhaj.boxOfMeow.other.sounds
import io.papermc.paper.event.player.AsyncChatEvent
import org.bukkit.Bukkit
import org.bukkit.Instrument
import org.bukkit.Note
import org.bukkit.event.EventHandler
import org.bukkit.event.Listener
class ChatNotification(): Listener {
@EventHandler
fun chatNotify(e: AsyncChatEvent) {
val players = Bukkit.getOnlinePlayers()
players.forEach {
if (it.uniqueId != e.player.uniqueId)
it.playNote(it.getLocation(), Instrument.BANJO, Note.natural(1, Note.Tone.C))
}
}
}

View file

@ -0,0 +1,4 @@
name: BoxOfMeow
version: '1.0-SNAPSHOT'
main: world.pinkhaj.boxOfMeow.BoxOfMeow
api-version: '1.21'