-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update default configuration and improve /commands command
- Loading branch information
1 parent
e8aecd4
commit 918ab2a
Showing
10 changed files
with
221 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,46 @@ | ||
# Rich Message Announcer | ||
Message announcer, text and web commands with rich text and icons. | ||
Message announcer, text and web commands with rich text options and icons. | ||
|
||
## Commands | ||
- **/commands** - Display a list of permissions (works the same as `/p`) | ||
- **/commands** - Display a list of commands the player has permission for | ||
|
||
## Configuration | ||
```xml | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<RichMessageAnnouncerConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<MessageColor>yellow</MessageColor> | ||
<MessageInterval>180</MessageInterval> | ||
<MessageColor>white</MessageColor> | ||
<MessageIconUrl>https://i.imgur.com/tLPIfuf.png</MessageIconUrl> | ||
<MessageInterval>300</MessageInterval> | ||
<Messages> | ||
<Message Text="Thank You for playing on our server!" IconUrl="https://i.imgur.com/pKphzxH.png" Color="yellow" /> | ||
<Message Text="Check out RestoreMonarchy.com!" IconUrl="https://i.imgur.com/pKphzxH.png" Color="yellow" /> | ||
<Message Text="Welcome! This server uses {b}RichMessageAnnouncer{/b}." IconUrl="https://i.imgur.com/tLPIfuf.png" Color="white" /> | ||
<Message Text="Use {color=#3498db}/commands{/color} to see available commands!" IconUrl="https://i.imgur.com/tLPIfuf.png" Color="white" /> | ||
<Message Text="{size=15}Tip: You can customize these messages in the config.{/size}" IconUrl="https://i.imgur.com/tLPIfuf.png" Color="white" /> | ||
<Message Text="Format examples: {b}Bold{/b}, {color=#e74c3c}Color{/color}, {size=20}Size{/size}" IconUrl="https://i.imgur.com/tLPIfuf.png" Color="white" /> | ||
</Messages> | ||
<TextCommands> | ||
<TextCommand> | ||
<Name>rules</Name> | ||
<Help>Shows rules</Help> | ||
<Color>orange</Color> | ||
<Message>There's no rules, just chill and have fun!</Message> | ||
<IconUrl>https://i.imgur.com/pKphzxH.png</IconUrl> | ||
<Color>white</Color> | ||
<Message>Server Rules:{br}1. {color=#e74c3c}Be respectful{/color}{br}2. {color=#2ecc71}No cheating{/color}{br}3. {color=#f1c40f}Have fun!{/color}</Message> | ||
<IconUrl>https://i.imgur.com/tLPIfuf.png</IconUrl> | ||
</TextCommand> | ||
</TextCommands> | ||
<WebsiteCommands> | ||
<WebCommand> | ||
<Name>web</Name> | ||
<Help>Shows web url</Help> | ||
<Name>website</Name> | ||
<Url>https://restoremonarchy.com</Url> | ||
<Description>Restore Monarchy Website</Description> | ||
</WebCommand> | ||
</WebsiteCommands> | ||
<EnableWelcomeMessage>true</EnableWelcomeMessage> | ||
<WelcomeMessage Text="Welcome to the server!" IconUrl="https://i.imgur.com/pKphzxH.png" Color="yellow" /> | ||
<WelcomeMessage Text="{size=18}Welcome to the server!{/size}{br}Rules: {color=#e74c3c}Be respectful{/color} • {color=#2ecc71}No cheating{/color} • {color=#f1c40f}Have fun!{/color}{br}{color=#3498db}Type /commands for commands{/color}" IconUrl="https://i.imgur.com/tLPIfuf.png" Color="white" /> | ||
</RichMessageAnnouncerConfiguration> | ||
``` | ||
|
||
## Translations | ||
```xml | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Translations xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<Translation Id="Commands" Value="[[b]]Your commands:[[/b]] {0}" /> | ||
</Translations> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System.Xml.Serialization; | ||
|
||
namespace RestoreMonarchy.RichMessageAnnouncer.Models | ||
{ | ||
public sealed class Message | ||
{ | ||
public Message(string text, string iconUrl, string color) | ||
{ | ||
Text = text; | ||
IconUrl = iconUrl; | ||
Color = color; | ||
} | ||
|
||
public Message() { } | ||
|
||
[XmlAttribute] | ||
public string Text { get; set; } | ||
[XmlAttribute] | ||
public string IconUrl { get; set; } | ||
public bool ShouldSerializeIconUrl() => !string.IsNullOrEmpty(IconUrl); | ||
[XmlAttribute] | ||
public string Color { get; set; } | ||
public bool ShouldSerializeColor() => !string.IsNullOrEmpty(Color); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.