Skip to content

Commit d587e41

Browse files
committed
Fix crash with empty MOTD
1 parent 72c673c commit d587e41

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Essentials 1.5.1
2+
* Fixes
3+
- Fixed crash if the MOTD field is empty
4+
15
# Essentials 1.5
26
* Features
37
- Added MOTD

Essentials/EssentialsPlugin.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
namespace Essentials
1919
{
20-
[Plugin("Essentials", "1.5", "cbfdd6ab-4cda-4544-a201-f73efa3d46c0")]
20+
[Plugin("Essentials", "1.5.1", "cbfdd6ab-4cda-4544-a201-f73efa3d46c0")]
2121
public class EssentialsPlugin : TorchPluginBase, IWpfPlugin
2222
{
2323
public EssentialsConfig Config => _config?.Data;
@@ -59,7 +59,7 @@ private void MotdOnce(MyEntity obj)
5959
if (obj is MyCharacter character)
6060
{
6161
var id = character.ControllerInfo?.ControllingIdentityId ?? 0;
62-
if (_motdOnce.Contains(id))
62+
if (string.IsNullOrEmpty(Config.Motd) || _motdOnce.Contains(id))
6363
return;
6464

6565
Torch.Multiplayer.SendMessage(Config.Motd, "MOTD", id);

0 commit comments

Comments
 (0)