Inital scream
This commit is contained in:
commit
d68f4c34fa
37 changed files with 528 additions and 0 deletions
24
src/main/kotlin/world/pinkhaj/boxOfMeow/BoxOfMeow.kt
Normal file
24
src/main/kotlin/world/pinkhaj/boxOfMeow/BoxOfMeow.kt
Normal 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)
|
||||
}
|
||||
}
|
||||
|
|
@ -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")
|
||||
}
|
||||
|
|
@ -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))
|
||||
}
|
||||
}
|
||||
}
|
||||
4
src/main/resources/plugin.yml
Normal file
4
src/main/resources/plugin.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
name: BoxOfMeow
|
||||
version: '1.0-SNAPSHOT'
|
||||
main: world.pinkhaj.boxOfMeow.BoxOfMeow
|
||||
api-version: '1.21'
|
||||
Loading…
Add table
Add a link
Reference in a new issue