AlvinSoft.UnturnedAnnouncements 2.0.5

dotnet add package AlvinSoft.UnturnedAnnouncements --version 2.0.5
                    
NuGet\Install-Package AlvinSoft.UnturnedAnnouncements -Version 2.0.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AlvinSoft.UnturnedAnnouncements" Version="2.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AlvinSoft.UnturnedAnnouncements" Version="2.0.5" />
                    
Directory.Packages.props
<PackageReference Include="AlvinSoft.UnturnedAnnouncements" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AlvinSoft.UnturnedAnnouncements --version 2.0.5
                    
#r "nuget: AlvinSoft.UnturnedAnnouncements, 2.0.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AlvinSoft.UnturnedAnnouncements@2.0.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AlvinSoft.UnturnedAnnouncements&version=2.0.5
                    
Install as a Cake Addin
#tool nuget:?package=AlvinSoft.UnturnedAnnouncements&version=2.0.5
                    
Install as a Cake Tool

AlvinSoft Unturned Announcements

An OpenMod Unturned plugin for join/leave/death/ban messages and announcements. Allows multiple strings per announcement/message type, and selects randomly.

Config

Use config.yaml to enable which announcements you want to use.

Join announcements

Set join_announcements:enable to true, to enable announcements when a player has successfully joined the server. Reload the plugin if the server is running. Set join_announcements:color to a HEX color code (e.g. #FF0000) to change the color of the join announcement.

Leave announcements

Set leave_announcements:enable to true, to enable announcements when a player has successfully left the server. Reload the plugin if the server is running. Set leave_announcements:color to a HEX color code (e.g. #00FF00) to change the color of the leave announcement.

Death announcements

Set death_announcements:enable to true, to enable announcements when a player has died. Reload the plugin if the server is running. Set death_announcements:color to a HEX color code (e.g. #00FF00) to change the color of the death announcement.

Ban announcements

Set ban_announcements:enable to true, to enable announcements when a player is banned. You can also set ban_announcements:include_reason or ban_announcements:include_duration to include the reason or duration of the ban in the announcement accordingly. Reload the plugin if the server is running. The duration (given in seconds) is humanized using the nuget package Humanizer. Installing Humanizer always throws when the plugin loads, because there are locales included that Mono doesn't support. Instead, install Humanizer.Core which includes the 'en-US' locale. If you need additional locales, install Humanizer.Core.xx (e.g. Humanizer.Core.fr), and specify it in the config under locale.

Translations

Most announcement types can have as many strings as desired. Number the strings starting with 0 (0-indexed) and don't leave out any numbers.

DO do this:

join_announcements:
    0: "{Player} has joined the server!"
    1: "{Player} is now online!"
    2: "{Player} has entered the game!"

DON'T do this:

join_announcements:
    1: "{Player} has joined the server!"
    2: "{Player} is now online!"
    3: "{Player} has entered the game!"

ALSO DON'T do this:

join_announcements:
    1: "{Player} has joined the server!"
    3: "{Player} is now online!"
    4: "{Player} has entered the game!"

A wrong numbering will not cause the plugin to throw, but in the worst case will cause the plugin to ignore all strings. The only thing that will cause the plugin to throw, is enabling an announcement type and not having provided a translation for an event, when it happens. Enabling the announcement type assumes you want to use it.

join_announcements and leave_announcements only allow the {Player} placeholder, which is replaced with the player's name. death_announcements allows {Player} and {Killer}, which are replaced with the player's name and the killer's name respectively. ban_announcements allows {Player}, {Reason}, and {Duration}, which are replaced with the player's name, the reason for the ban, and the duration of the ban respectively, depending on the config settings. The {Reason} and {Duration} placeholders are only available if ban_announcements:include_reason or ban_announcements:include_duration is set to true in the config.

Contact

I know Unturned plugins can be a 'pain in the ahh' to get working, especially because of the missing/half-ahhed documentation. So feel free to contact me anytime on Discord if you have any questions or suggestions. My Discord is m0ment and my email is alvin.szoke@gmail.com.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.