diff --git a/README.md b/README.md
index 27aed80..97f24c9 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,17 @@

+
+
+
+
+
# Vanguard
Vanguard is an advanced, open-source, lightweight and easy to use Minecraft punishment and enforcement plugin.
It allows server operators to easily manage punishments, without any hassle and works on servers of all sizes.
-## Development Notice
+## ⚠️ Development Notice
Vanguard is currently in development and is not ready for production use. Please do not use Vanguard on a production
server until it is ready for release.
diff --git a/common/src/main/kotlin/ltd/redeye/vanguard/common/command/CommandRegistry.kt b/common/src/main/kotlin/ltd/redeye/vanguard/common/command/CommandRegistry.kt
index 8f8c1d8..9967528 100644
--- a/common/src/main/kotlin/ltd/redeye/vanguard/common/command/CommandRegistry.kt
+++ b/common/src/main/kotlin/ltd/redeye/vanguard/common/command/CommandRegistry.kt
@@ -18,13 +18,15 @@
package ltd.redeye.vanguard.common.command
-import ltd.redeye.vanguard.common.command.CommandInfo
+import ltd.redeye.vanguard.common.command.admin.CommandInfo
+import ltd.redeye.vanguard.common.command.admin.CommandShowExampleMessage
import ltd.redeye.vanguard.common.command.lib.VanguardCommandManager
object CommandRegistry {
fun registerCommands(commandManager: VanguardCommandManager) {
commandManager.registerCommands(
CommandInfo(),
+ CommandShowExampleMessage()
)
}
}
\ No newline at end of file
diff --git a/common/src/main/kotlin/ltd/redeye/vanguard/common/command/CommandInfo.kt b/common/src/main/kotlin/ltd/redeye/vanguard/common/command/admin/CommandInfo.kt
similarity index 98%
rename from common/src/main/kotlin/ltd/redeye/vanguard/common/command/CommandInfo.kt
rename to common/src/main/kotlin/ltd/redeye/vanguard/common/command/admin/CommandInfo.kt
index 0a55018..00cb96e 100644
--- a/common/src/main/kotlin/ltd/redeye/vanguard/common/command/CommandInfo.kt
+++ b/common/src/main/kotlin/ltd/redeye/vanguard/common/command/admin/CommandInfo.kt
@@ -16,7 +16,7 @@
* along with this program. If not, see .
*/
-package ltd.redeye.vanguard.common.command
+package ltd.redeye.vanguard.common.command.admin
import cloud.commandframework.annotations.CommandDescription
import cloud.commandframework.annotations.CommandMethod
diff --git a/common/src/main/kotlin/ltd/redeye/vanguard/common/command/CommandShowExampleMessage.kt b/common/src/main/kotlin/ltd/redeye/vanguard/common/command/admin/CommandShowExampleMessage.kt
similarity index 96%
rename from common/src/main/kotlin/ltd/redeye/vanguard/common/command/CommandShowExampleMessage.kt
rename to common/src/main/kotlin/ltd/redeye/vanguard/common/command/admin/CommandShowExampleMessage.kt
index 96f1bc8..55d46c5 100644
--- a/common/src/main/kotlin/ltd/redeye/vanguard/common/command/CommandShowExampleMessage.kt
+++ b/common/src/main/kotlin/ltd/redeye/vanguard/common/command/admin/CommandShowExampleMessage.kt
@@ -16,7 +16,7 @@
* along with this program. If not, see .
*/
-package ltd.redeye.vanguard.common.command
+package ltd.redeye.vanguard.common.command.admin
import cloud.commandframework.annotations.CommandDescription
import cloud.commandframework.annotations.CommandMethod
diff --git a/common/src/main/kotlin/ltd/redeye/vanguard/common/config/file/MessagesConfig.kt b/common/src/main/kotlin/ltd/redeye/vanguard/common/config/file/MessagesConfig.kt
index e269041..646dfe2 100644
--- a/common/src/main/kotlin/ltd/redeye/vanguard/common/config/file/MessagesConfig.kt
+++ b/common/src/main/kotlin/ltd/redeye/vanguard/common/config/file/MessagesConfig.kt
@@ -21,7 +21,6 @@ package ltd.redeye.vanguard.common.config.file
import ltd.redeye.vanguard.common.config.file.messages.AlertsMessages
import ltd.redeye.vanguard.common.config.file.messages.ExpiryPlaceholders
import ltd.redeye.vanguard.common.message.VanguardMessage
-import ltd.redeye.vanguard.common.message.section.MessageBossBar
import ltd.redeye.vanguard.common.message.section.MessageSound
import ltd.redeye.vanguard.common.message.section.MessageTitle
import org.spongepowered.configurate.objectmapping.ConfigSerializable
@@ -34,7 +33,6 @@ data class MessagesConfig(
chat = mutableListOf("Message One", "<#00ff00>Message Two", "Message Three"),
"Example Actionbar",
MessageTitle("Example Title", "Example Subtitle", 10, 10, 10),
- MessageBossBar("Example Bossbar", "blue", "notched_20", 1.0F),
MessageSound("minecraft:entity.experience_orb.pickup", 1.0F, 1.0F)
),
diff --git a/common/src/main/kotlin/ltd/redeye/vanguard/common/message/VanguardMessage.kt b/common/src/main/kotlin/ltd/redeye/vanguard/common/message/VanguardMessage.kt
index 1dbc856..74bb59e 100644
--- a/common/src/main/kotlin/ltd/redeye/vanguard/common/message/VanguardMessage.kt
+++ b/common/src/main/kotlin/ltd/redeye/vanguard/common/message/VanguardMessage.kt
@@ -19,7 +19,6 @@
package ltd.redeye.vanguard.common.message
import ltd.redeye.vanguard.common.player.VanguardPlayer
-import ltd.redeye.vanguard.common.message.section.MessageBossBar
import ltd.redeye.vanguard.common.message.section.MessageSound
import ltd.redeye.vanguard.common.message.section.MessageTitle
import ltd.redeye.vanguard.common.message.serialization.SerializedVanguardMessage
@@ -33,12 +32,10 @@ data class VanguardMessage(
var chat: MutableList? = mutableListOf(""),
var actionbar: String?,
var title: MessageTitle?,
- var bossbar: MessageBossBar?,
var sound: MessageSound?
) : Serializable, VanguardMessageBag() {
- constructor() : this(null, null, null, null, null)
- constructor(basicMessage: String) : this(mutableListOf(basicMessage), null, null, null, null)
+ constructor() : this(null, null, null, null)
fun send(target: Audience, tagResolver: TagResolver? = null) {
if (chat != null && chat!!.size > 0) {
@@ -55,10 +52,6 @@ data class VanguardMessage(
title!!.send(target, tagResolver)
}
- if (bossbar != null) {
- bossbar!!.send(target, tagResolver)
- }
-
if (sound != null) {
sound!!.send(target)
}
@@ -76,7 +69,6 @@ data class VanguardMessage(
chat,
parseToGson(this.actionbar.orEmpty(), tagResolver),
title!!.serialize(tagResolver),
- bossbar!!.serialize(tagResolver),
sound!!.serialize()
)
}
diff --git a/common/src/main/kotlin/ltd/redeye/vanguard/common/message/section/MessageBossBar.kt b/common/src/main/kotlin/ltd/redeye/vanguard/common/message/section/MessageBossBar.kt
deleted file mode 100644
index 2c5c35d..0000000
--- a/common/src/main/kotlin/ltd/redeye/vanguard/common/message/section/MessageBossBar.kt
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Vanguard
- * Copyright (C) 2023 RedEye Technologies Limited
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package ltd.redeye.vanguard.common.message.section
-
-import ltd.redeye.vanguard.common.message.VanguardMessageBag
-import ltd.redeye.vanguard.common.message.serialization.SerializedMessageBossBar
-import net.kyori.adventure.audience.Audience
-import net.kyori.adventure.bossbar.BossBar
-import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver
-import org.spongepowered.configurate.objectmapping.ConfigSerializable
-import java.io.Serializable
-
-@ConfigSerializable
-data class MessageBossBar(
- var title: String? = null,
- var color: BossBar.Color? = BossBar.Color.BLUE,
- var style: BossBar.Overlay? = BossBar.Overlay.PROGRESS,
- var progress: Float? = 1.0F,
-) : Serializable, VanguardMessageBag() {
- fun send(target: Audience, tagResolver: TagResolver?) {
- val title = deserialize(title!!, tagResolver)
-
- target.showBossBar(
- BossBar.bossBar(
- title,
- progress!!,
- color!!,
- style!!
- )
- )
- }
-
- fun serialize(tagResolver: TagResolver): SerializedMessageBossBar {
- return SerializedMessageBossBar(
- if(title!!.isNotEmpty()) parseToGson(title.orEmpty(), tagResolver) else "",
- progress!!,
- style!!,
- color!!
- )
- }
-}
\ No newline at end of file
diff --git a/common/src/main/kotlin/ltd/redeye/vanguard/common/message/serialization/SerializedVanguardMessage.kt b/common/src/main/kotlin/ltd/redeye/vanguard/common/message/serialization/SerializedVanguardMessage.kt
index c236db7..b281390 100644
--- a/common/src/main/kotlin/ltd/redeye/vanguard/common/message/serialization/SerializedVanguardMessage.kt
+++ b/common/src/main/kotlin/ltd/redeye/vanguard/common/message/serialization/SerializedVanguardMessage.kt
@@ -29,7 +29,6 @@ data class SerializedVanguardMessage(
var chat: MutableList,
var actionBar: String,
var title: SerializedMessageTitle,
- var bossBar: SerializedMessageBossBar,
var sound: SerializedMessageSound
) : VanguardMessageBag() {
@@ -46,9 +45,7 @@ data class SerializedVanguardMessage(
}
title.send(audience)
- bossBar.send(audience)
sound.send(audience)
-
}
companion object {
diff --git a/common/src/main/kotlin/ltd/redeye/vanguard/common/player/VanguardPlayer.kt b/common/src/main/kotlin/ltd/redeye/vanguard/common/player/VanguardPlayer.kt
index 54476bd..136c0dd 100644
--- a/common/src/main/kotlin/ltd/redeye/vanguard/common/player/VanguardPlayer.kt
+++ b/common/src/main/kotlin/ltd/redeye/vanguard/common/player/VanguardPlayer.kt
@@ -33,6 +33,8 @@ data class VanguardPlayer(
val knownIps: MutableSet = mutableSetOf(),
val lastKnownName: String? = null,
) {
+ constructor(uuid: UUID) : this(uuid, mutableSetOf(), mutableSetOf(), null)
+
val banned: Boolean
get() {
return VanguardCore.instance.punishmentManager.isBanned(this)
diff --git a/paper/src/main/kotlin/ltd/redeye/vanguard/paper/network/PaperSingleMessagingProxy.kt b/paper/src/main/kotlin/ltd/redeye/vanguard/paper/network/PaperSingleMessagingProxy.kt
index 853f49d..857753f 100644
--- a/paper/src/main/kotlin/ltd/redeye/vanguard/paper/network/PaperSingleMessagingProxy.kt
+++ b/paper/src/main/kotlin/ltd/redeye/vanguard/paper/network/PaperSingleMessagingProxy.kt
@@ -33,7 +33,6 @@ object PaperSingleMessagingProxy : MessagingProxy {
override fun alertPlayer(uuid: UUID, message: VanguardMessage, placeholders: TagResolver?) {
val player = Bukkit.getPlayer(uuid)
- if (player != null) {
message.send(player, placeholders)
}
}