Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
![RedEye Image](https://assets.redeyetechnologies.co.uk/vanguard/vanguard-masthead.png)

![GitHub Issues](https://img.shields.io/github/issues/redeyetechnology/vanguard?style=for-the-badge&logo=github)
![GitHub Pull Requests](https://img.shields.io/github/issues-pr/redeyetechnology/vanguard?style=for-the-badge&logo=github)
![GitHub](https://img.shields.io/github/license/redeyetechnology/vanguard?style=for-the-badge&logo=github)


# 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package ltd.redeye.vanguard.common.command
package ltd.redeye.vanguard.common.command.admin

import cloud.commandframework.annotations.CommandDescription
import cloud.commandframework.annotations.CommandMethod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package ltd.redeye.vanguard.common.command
package ltd.redeye.vanguard.common.command.admin

import cloud.commandframework.annotations.CommandDescription
import cloud.commandframework.annotations.CommandMethod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -34,7 +33,6 @@ data class MessagesConfig(
chat = mutableListOf("<red>Message One", "<#00ff00><bold>Message Two", "<gradient:red:blue>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)
),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -33,12 +32,10 @@ data class VanguardMessage(
var chat: MutableList<String>? = 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) {
Expand All @@ -55,10 +52,6 @@ data class VanguardMessage(
title!!.send(target, tagResolver)
}

if (bossbar != null) {
bossbar!!.send(target, tagResolver)
}

if (sound != null) {
sound!!.send(target)
}
Expand All @@ -76,7 +69,6 @@ data class VanguardMessage(
chat,
parseToGson(this.actionbar.orEmpty(), tagResolver),
title!!.serialize(tagResolver),
bossbar!!.serialize(tagResolver),
sound!!.serialize()
)
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ data class SerializedVanguardMessage(
var chat: MutableList<String>,
var actionBar: String,
var title: SerializedMessageTitle,
var bossBar: SerializedMessageBossBar,
var sound: SerializedMessageSound
) : VanguardMessageBag() {

Expand All @@ -46,9 +45,7 @@ data class SerializedVanguardMessage(
}

title.send(audience)
bossBar.send(audience)
sound.send(audience)

}

companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ data class VanguardPlayer(
val knownIps: MutableSet<String> = mutableSetOf(),
val lastKnownName: String? = null,
) {
constructor(uuid: UUID) : this(uuid, mutableSetOf(), mutableSetOf(), null)

val banned: Boolean
get() {
return VanguardCore.instance.punishmentManager.isBanned(this)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down