summaryrefslogtreecommitdiff
path: root/src/SMAPI/Events
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI/Events')
-rw-r--r--src/SMAPI/Events/AssetReadyEventArgs.cs2
-rw-r--r--src/SMAPI/Events/AssetRequestedEventArgs.cs14
-rw-r--r--src/SMAPI/Events/AssetsInvalidatedEventArgs.cs2
-rw-r--r--src/SMAPI/Events/BuildingListChangedEventArgs.cs2
-rw-r--r--src/SMAPI/Events/ButtonPressedEventArgs.cs2
-rw-r--r--src/SMAPI/Events/ButtonReleasedEventArgs.cs2
-rw-r--r--src/SMAPI/Events/ButtonsChangedEventArgs.cs2
-rw-r--r--src/SMAPI/Events/ChangeType.cs15
-rw-r--r--src/SMAPI/Events/ChestInventoryChangedEventArgs.cs2
-rw-r--r--src/SMAPI/Events/CursorMovedEventArgs.cs2
-rw-r--r--src/SMAPI/Events/DebrisListChangedEventArgs.cs2
-rw-r--r--src/SMAPI/Events/FurnitureListChangedEventArgs.cs2
-rw-r--r--src/SMAPI/Events/IContentEvents.cs2
-rw-r--r--src/SMAPI/Events/IDisplayEvents.cs2
-rw-r--r--src/SMAPI/Events/IGameLoopEvents.cs2
-rw-r--r--src/SMAPI/Events/IInputEvents.cs2
-rw-r--r--src/SMAPI/Events/IModEvents.cs2
-rw-r--r--src/SMAPI/Events/IMultiplayerEvents.cs2
-rw-r--r--src/SMAPI/Events/IPlayerEvents.cs2
-rw-r--r--src/SMAPI/Events/ISpecialisedEvents.cs2
-rw-r--r--src/SMAPI/Events/IWorldEvents.cs2
-rw-r--r--src/SMAPI/Events/InventoryChangedEventArgs.cs2
-rw-r--r--src/SMAPI/Events/ItemStackSizeChange.cs2
-rw-r--r--src/SMAPI/Events/LargeTerrainFeatureListChangedEventArgs.cs2
-rw-r--r--src/SMAPI/Events/LevelChangedEventArgs.cs2
-rw-r--r--src/SMAPI/Events/LocaleChangedEventArgs.cs2
-rw-r--r--src/SMAPI/Events/LocationListChangedEventArgs.cs2
-rw-r--r--src/SMAPI/Events/MenuChangedEventArgs.cs16
-rw-r--r--src/SMAPI/Events/ModMessageReceivedEventArgs.cs6
-rw-r--r--src/SMAPI/Events/NpcListChangedEventArgs.cs2
-rw-r--r--src/SMAPI/Events/ObjectListChangedEventArgs.cs2
-rw-r--r--src/SMAPI/Events/PeerConnectedEventArgs.cs2
-rw-r--r--src/SMAPI/Events/PeerContextReceivedEventArgs.cs2
-rw-r--r--src/SMAPI/Events/PeerDisconnectedEventArgs.cs2
-rw-r--r--src/SMAPI/Events/RenderedActiveMenuEventArgs.cs2
-rw-r--r--src/SMAPI/Events/RenderedEventArgs.cs2
-rw-r--r--src/SMAPI/Events/RenderedHudEventArgs.cs2
-rw-r--r--src/SMAPI/Events/RenderedWorldEventArgs.cs2
-rw-r--r--src/SMAPI/Events/RenderingActiveMenuEventArgs.cs2
-rw-r--r--src/SMAPI/Events/RenderingEventArgs.cs2
-rw-r--r--src/SMAPI/Events/RenderingHudEventArgs.cs2
-rw-r--r--src/SMAPI/Events/RenderingWorldEventArgs.cs2
-rw-r--r--src/SMAPI/Events/TerrainFeatureListChangedEventArgs.cs2
-rw-r--r--src/SMAPI/Events/WarpedEventArgs.cs2
44 files changed, 17 insertions, 114 deletions
diff --git a/src/SMAPI/Events/AssetReadyEventArgs.cs b/src/SMAPI/Events/AssetReadyEventArgs.cs
index 19e5a9df..2c308f18 100644
--- a/src/SMAPI/Events/AssetReadyEventArgs.cs
+++ b/src/SMAPI/Events/AssetReadyEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
namespace StardewModdingAPI.Events
diff --git a/src/SMAPI/Events/AssetRequestedEventArgs.cs b/src/SMAPI/Events/AssetRequestedEventArgs.cs
index 3c51c95d..3bcf83b9 100644
--- a/src/SMAPI/Events/AssetRequestedEventArgs.cs
+++ b/src/SMAPI/Events/AssetRequestedEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework.Graphics;
@@ -19,7 +17,7 @@ namespace StardewModdingAPI.Events
private readonly IModMetadata Mod;
/// <summary>Get the mod metadata for a content pack, if it's a valid content pack for the mod.</summary>
- private readonly Func<IModMetadata, string, string, IModMetadata> GetOnBehalfOf;
+ private readonly Func<IModMetadata, string?, string, IModMetadata?> GetOnBehalfOf;
/*********
@@ -51,7 +49,7 @@ namespace StardewModdingAPI.Events
/// <param name="dataType">The requested data type.</param>
/// <param name="nameWithoutLocale">The <paramref name="name"/> with any locale codes stripped.</param>
/// <param name="getOnBehalfOf">Get the mod metadata for a content pack, if it's a valid content pack for the mod.</param>
- internal AssetRequestedEventArgs(IModMetadata mod, IAssetName name, IAssetName nameWithoutLocale, Type dataType, Func<IModMetadata, string, string, IModMetadata> getOnBehalfOf)
+ internal AssetRequestedEventArgs(IModMetadata mod, IAssetName name, IAssetName nameWithoutLocale, Type dataType, Func<IModMetadata, string?, string, IModMetadata?> getOnBehalfOf)
{
this.Mod = mod;
this.Name = name;
@@ -71,7 +69,7 @@ namespace StardewModdingAPI.Events
/// <item>Each asset can logically only have one initial instance. If multiple loads apply at the same time, SMAPI will use the <paramref name="priority"/> parameter to decide what happens. If you're making changes to the existing asset instead of replacing it, you should use <see cref="Edit"/> instead to avoid those limitations and improve mod compatibility.</item>
/// </list>
/// </remarks>
- public void LoadFrom(Func<object> load, AssetLoadPriority priority, string onBehalfOf = null)
+ public void LoadFrom(Func<object> load, AssetLoadPriority priority, string? onBehalfOf = null)
{
this.LoadOperations.Add(
new AssetLoadOperation(
@@ -95,13 +93,15 @@ namespace StardewModdingAPI.Events
/// </list>
/// </remarks>
public void LoadFromModFile<TAsset>(string relativePath, AssetLoadPriority priority)
+ where TAsset : notnull
{
this.LoadOperations.Add(
new AssetLoadOperation(
mod: this.Mod,
priority: priority,
onBehalfOf: null,
- _ => this.Mod.Mod.Helper.ModContent.Load<TAsset>(relativePath))
+ _ => this.Mod.Mod!.Helper.ModContent.Load<TAsset>(relativePath)
+ )
);
}
@@ -116,7 +116,7 @@ namespace StardewModdingAPI.Events
/// <item>You can apply any number of edits to the asset. Each edit will be applied on top of the previous one (i.e. it'll see the merged asset from all previous edits as its input).</item>
/// </list>
/// </remarks>
- public void Edit(Action<IAssetData> apply, AssetEditPriority priority = AssetEditPriority.Default, string onBehalfOf = null)
+ public void Edit(Action<IAssetData> apply, AssetEditPriority priority = AssetEditPriority.Default, string? onBehalfOf = null)
{
this.EditOperations.Add(
new AssetEditOperation(
diff --git a/src/SMAPI/Events/AssetsInvalidatedEventArgs.cs b/src/SMAPI/Events/AssetsInvalidatedEventArgs.cs
index bd0df598..614cdf49 100644
--- a/src/SMAPI/Events/AssetsInvalidatedEventArgs.cs
+++ b/src/SMAPI/Events/AssetsInvalidatedEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
diff --git a/src/SMAPI/Events/BuildingListChangedEventArgs.cs b/src/SMAPI/Events/BuildingListChangedEventArgs.cs
index ba9574cc..74f37710 100644
--- a/src/SMAPI/Events/BuildingListChangedEventArgs.cs
+++ b/src/SMAPI/Events/BuildingListChangedEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using System.Collections.Generic;
using System.Linq;
diff --git a/src/SMAPI/Events/ButtonPressedEventArgs.cs b/src/SMAPI/Events/ButtonPressedEventArgs.cs
index 94684513..1b30fd23 100644
--- a/src/SMAPI/Events/ButtonPressedEventArgs.cs
+++ b/src/SMAPI/Events/ButtonPressedEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using StardewModdingAPI.Framework.Input;
diff --git a/src/SMAPI/Events/ButtonReleasedEventArgs.cs b/src/SMAPI/Events/ButtonReleasedEventArgs.cs
index 6ff3727d..40ec1cc1 100644
--- a/src/SMAPI/Events/ButtonReleasedEventArgs.cs
+++ b/src/SMAPI/Events/ButtonReleasedEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using StardewModdingAPI.Framework.Input;
diff --git a/src/SMAPI/Events/ButtonsChangedEventArgs.cs b/src/SMAPI/Events/ButtonsChangedEventArgs.cs
index c63d34e6..a5e87735 100644
--- a/src/SMAPI/Events/ButtonsChangedEventArgs.cs
+++ b/src/SMAPI/Events/ButtonsChangedEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using System.Collections.Generic;
using System.Linq;
diff --git a/src/SMAPI/Events/ChangeType.cs b/src/SMAPI/Events/ChangeType.cs
deleted file mode 100644
index 0fc717df..00000000
--- a/src/SMAPI/Events/ChangeType.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-namespace StardewModdingAPI.Events
-{
- /// <summary>Indicates how an inventory item changed.</summary>
- public enum ChangeType
- {
- /// <summary>The entire stack was removed.</summary>
- Removed,
-
- /// <summary>The entire stack was added.</summary>
- Added,
-
- /// <summary>The stack size changed.</summary>
- StackChange
- }
-}
diff --git a/src/SMAPI/Events/ChestInventoryChangedEventArgs.cs b/src/SMAPI/Events/ChestInventoryChangedEventArgs.cs
index bc8ac0c0..4b4c4210 100644
--- a/src/SMAPI/Events/ChestInventoryChangedEventArgs.cs
+++ b/src/SMAPI/Events/ChestInventoryChangedEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using System.Collections.Generic;
using StardewValley;
diff --git a/src/SMAPI/Events/CursorMovedEventArgs.cs b/src/SMAPI/Events/CursorMovedEventArgs.cs
index f3e7513b..43ff90ce 100644
--- a/src/SMAPI/Events/CursorMovedEventArgs.cs
+++ b/src/SMAPI/Events/CursorMovedEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
namespace StardewModdingAPI.Events
diff --git a/src/SMAPI/Events/DebrisListChangedEventArgs.cs b/src/SMAPI/Events/DebrisListChangedEventArgs.cs
index 56b1f30a..61b7590a 100644
--- a/src/SMAPI/Events/DebrisListChangedEventArgs.cs
+++ b/src/SMAPI/Events/DebrisListChangedEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using System.Collections.Generic;
using System.Linq;
diff --git a/src/SMAPI/Events/FurnitureListChangedEventArgs.cs b/src/SMAPI/Events/FurnitureListChangedEventArgs.cs
index cda1b6cc..683f4620 100644
--- a/src/SMAPI/Events/FurnitureListChangedEventArgs.cs
+++ b/src/SMAPI/Events/FurnitureListChangedEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using System.Collections.Generic;
using System.Linq;
diff --git a/src/SMAPI/Events/IContentEvents.cs b/src/SMAPI/Events/IContentEvents.cs
index 109f9753..d537db70 100644
--- a/src/SMAPI/Events/IContentEvents.cs
+++ b/src/SMAPI/Events/IContentEvents.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
namespace StardewModdingAPI.Events
diff --git a/src/SMAPI/Events/IDisplayEvents.cs b/src/SMAPI/Events/IDisplayEvents.cs
index b8b89120..dbf8d90f 100644
--- a/src/SMAPI/Events/IDisplayEvents.cs
+++ b/src/SMAPI/Events/IDisplayEvents.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using StardewValley;
diff --git a/src/SMAPI/Events/IGameLoopEvents.cs b/src/SMAPI/Events/IGameLoopEvents.cs
index 52bac3f8..6855737b 100644
--- a/src/SMAPI/Events/IGameLoopEvents.cs
+++ b/src/SMAPI/Events/IGameLoopEvents.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
namespace StardewModdingAPI.Events
diff --git a/src/SMAPI/Events/IInputEvents.cs b/src/SMAPI/Events/IInputEvents.cs
index 01ceb224..081c40c0 100644
--- a/src/SMAPI/Events/IInputEvents.cs
+++ b/src/SMAPI/Events/IInputEvents.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
namespace StardewModdingAPI.Events
diff --git a/src/SMAPI/Events/IModEvents.cs b/src/SMAPI/Events/IModEvents.cs
index a1aacbce..2603961b 100644
--- a/src/SMAPI/Events/IModEvents.cs
+++ b/src/SMAPI/Events/IModEvents.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
namespace StardewModdingAPI.Events
{
/// <summary>Manages access to events raised by SMAPI.</summary>
diff --git a/src/SMAPI/Events/IMultiplayerEvents.cs b/src/SMAPI/Events/IMultiplayerEvents.cs
index c50eaf04..af9b5f17 100644
--- a/src/SMAPI/Events/IMultiplayerEvents.cs
+++ b/src/SMAPI/Events/IMultiplayerEvents.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
namespace StardewModdingAPI.Events
diff --git a/src/SMAPI/Events/IPlayerEvents.cs b/src/SMAPI/Events/IPlayerEvents.cs
index 9d18bfad..81e17b1a 100644
--- a/src/SMAPI/Events/IPlayerEvents.cs
+++ b/src/SMAPI/Events/IPlayerEvents.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
namespace StardewModdingAPI.Events
diff --git a/src/SMAPI/Events/ISpecialisedEvents.cs b/src/SMAPI/Events/ISpecialisedEvents.cs
index 0ec5bf54..bf70956d 100644
--- a/src/SMAPI/Events/ISpecialisedEvents.cs
+++ b/src/SMAPI/Events/ISpecialisedEvents.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
namespace StardewModdingAPI.Events
diff --git a/src/SMAPI/Events/IWorldEvents.cs b/src/SMAPI/Events/IWorldEvents.cs
index 785dfa8f..c023e1f0 100644
--- a/src/SMAPI/Events/IWorldEvents.cs
+++ b/src/SMAPI/Events/IWorldEvents.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
namespace StardewModdingAPI.Events
diff --git a/src/SMAPI/Events/InventoryChangedEventArgs.cs b/src/SMAPI/Events/InventoryChangedEventArgs.cs
index 58c0ff8f..40cd4128 100644
--- a/src/SMAPI/Events/InventoryChangedEventArgs.cs
+++ b/src/SMAPI/Events/InventoryChangedEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using System.Collections.Generic;
using StardewValley;
diff --git a/src/SMAPI/Events/ItemStackSizeChange.cs b/src/SMAPI/Events/ItemStackSizeChange.cs
index 5d0986aa..35369be2 100644
--- a/src/SMAPI/Events/ItemStackSizeChange.cs
+++ b/src/SMAPI/Events/ItemStackSizeChange.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using StardewValley;
namespace StardewModdingAPI.Events
diff --git a/src/SMAPI/Events/LargeTerrainFeatureListChangedEventArgs.cs b/src/SMAPI/Events/LargeTerrainFeatureListChangedEventArgs.cs
index aedb0e46..59d79f0f 100644
--- a/src/SMAPI/Events/LargeTerrainFeatureListChangedEventArgs.cs
+++ b/src/SMAPI/Events/LargeTerrainFeatureListChangedEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using System.Collections.Generic;
using System.Linq;
diff --git a/src/SMAPI/Events/LevelChangedEventArgs.cs b/src/SMAPI/Events/LevelChangedEventArgs.cs
index 3beb9fd5..c7303603 100644
--- a/src/SMAPI/Events/LevelChangedEventArgs.cs
+++ b/src/SMAPI/Events/LevelChangedEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using StardewModdingAPI.Enums;
using StardewValley;
diff --git a/src/SMAPI/Events/LocaleChangedEventArgs.cs b/src/SMAPI/Events/LocaleChangedEventArgs.cs
index 015e7ec8..09d3f6e5 100644
--- a/src/SMAPI/Events/LocaleChangedEventArgs.cs
+++ b/src/SMAPI/Events/LocaleChangedEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using LanguageCode = StardewValley.LocalizedContentManager.LanguageCode;
diff --git a/src/SMAPI/Events/LocationListChangedEventArgs.cs b/src/SMAPI/Events/LocationListChangedEventArgs.cs
index 055463dd..1ebb3e2d 100644
--- a/src/SMAPI/Events/LocationListChangedEventArgs.cs
+++ b/src/SMAPI/Events/LocationListChangedEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using System.Collections.Generic;
using System.Linq;
diff --git a/src/SMAPI/Events/MenuChangedEventArgs.cs b/src/SMAPI/Events/MenuChangedEventArgs.cs
index 362accec..c37fd216 100644
--- a/src/SMAPI/Events/MenuChangedEventArgs.cs
+++ b/src/SMAPI/Events/MenuChangedEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using StardewValley.Menus;
@@ -11,20 +9,20 @@ namespace StardewModdingAPI.Events
/*********
** Accessors
*********/
- /// <summary>The previous menu.</summary>
- public IClickableMenu OldMenu { get; }
+ /// <summary>The previous menu, if any.</summary>
+ public IClickableMenu? OldMenu { get; }
- /// <summary>The current menu.</summary>
- public IClickableMenu NewMenu { get; }
+ /// <summary>The current menu, if any.</summary>
+ public IClickableMenu? NewMenu { get; }
/*********
** Public methods
*********/
/// <summary>Construct an instance.</summary>
- /// <param name="oldMenu">The previous menu.</param>
- /// <param name="newMenu">The current menu.</param>
- internal MenuChangedEventArgs(IClickableMenu oldMenu, IClickableMenu newMenu)
+ /// <param name="oldMenu">The previous menu, if any.</param>
+ /// <param name="newMenu">The current menu, if any.</param>
+ internal MenuChangedEventArgs(IClickableMenu? oldMenu, IClickableMenu? newMenu)
{
this.OldMenu = oldMenu;
this.NewMenu = newMenu;
diff --git a/src/SMAPI/Events/ModMessageReceivedEventArgs.cs b/src/SMAPI/Events/ModMessageReceivedEventArgs.cs
index 671bdf38..84a27d18 100644
--- a/src/SMAPI/Events/ModMessageReceivedEventArgs.cs
+++ b/src/SMAPI/Events/ModMessageReceivedEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using StardewModdingAPI.Framework.Networking;
using StardewModdingAPI.Toolkit.Serialization;
@@ -47,8 +45,10 @@ namespace StardewModdingAPI.Events
/// <summary>Read the message data into the given model type.</summary>
/// <typeparam name="TModel">The message model type.</typeparam>
public TModel ReadAs<TModel>()
+ where TModel : notnull
{
- return this.Message.Data.ToObject<TModel>(this.JsonHelper.GetSerializer());
+ return this.Message.Data.ToObject<TModel>(this.JsonHelper.GetSerializer())
+ ?? throw new InvalidOperationException($"Can't read empty mod message data as a {typeof(TModel).FullName} value.");
}
}
}
diff --git a/src/SMAPI/Events/NpcListChangedEventArgs.cs b/src/SMAPI/Events/NpcListChangedEventArgs.cs
index fb6dc1c5..3a37f1e7 100644
--- a/src/SMAPI/Events/NpcListChangedEventArgs.cs
+++ b/src/SMAPI/Events/NpcListChangedEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using System.Collections.Generic;
using System.Linq;
diff --git a/src/SMAPI/Events/ObjectListChangedEventArgs.cs b/src/SMAPI/Events/ObjectListChangedEventArgs.cs
index b1a636aa..b21d2867 100644
--- a/src/SMAPI/Events/ObjectListChangedEventArgs.cs
+++ b/src/SMAPI/Events/ObjectListChangedEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using System.Collections.Generic;
using System.Linq;
diff --git a/src/SMAPI/Events/PeerConnectedEventArgs.cs b/src/SMAPI/Events/PeerConnectedEventArgs.cs
index 3d11a3b5..bfaa2bd3 100644
--- a/src/SMAPI/Events/PeerConnectedEventArgs.cs
+++ b/src/SMAPI/Events/PeerConnectedEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
namespace StardewModdingAPI.Events
diff --git a/src/SMAPI/Events/PeerContextReceivedEventArgs.cs b/src/SMAPI/Events/PeerContextReceivedEventArgs.cs
index 35a4b20d..151a295c 100644
--- a/src/SMAPI/Events/PeerContextReceivedEventArgs.cs
+++ b/src/SMAPI/Events/PeerContextReceivedEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
namespace StardewModdingAPI.Events
diff --git a/src/SMAPI/Events/PeerDisconnectedEventArgs.cs b/src/SMAPI/Events/PeerDisconnectedEventArgs.cs
index 0675b8fe..8517988a 100644
--- a/src/SMAPI/Events/PeerDisconnectedEventArgs.cs
+++ b/src/SMAPI/Events/PeerDisconnectedEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
namespace StardewModdingAPI.Events
diff --git a/src/SMAPI/Events/RenderedActiveMenuEventArgs.cs b/src/SMAPI/Events/RenderedActiveMenuEventArgs.cs
index 3da0b4b4..efd4163b 100644
--- a/src/SMAPI/Events/RenderedActiveMenuEventArgs.cs
+++ b/src/SMAPI/Events/RenderedActiveMenuEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using Microsoft.Xna.Framework.Graphics;
using StardewValley;
diff --git a/src/SMAPI/Events/RenderedEventArgs.cs b/src/SMAPI/Events/RenderedEventArgs.cs
index e8beaaac..d6341b19 100644
--- a/src/SMAPI/Events/RenderedEventArgs.cs
+++ b/src/SMAPI/Events/RenderedEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using Microsoft.Xna.Framework.Graphics;
using StardewValley;
diff --git a/src/SMAPI/Events/RenderedHudEventArgs.cs b/src/SMAPI/Events/RenderedHudEventArgs.cs
index b25ecd4c..46e89013 100644
--- a/src/SMAPI/Events/RenderedHudEventArgs.cs
+++ b/src/SMAPI/Events/RenderedHudEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using Microsoft.Xna.Framework.Graphics;
using StardewValley;
diff --git a/src/SMAPI/Events/RenderedWorldEventArgs.cs b/src/SMAPI/Events/RenderedWorldEventArgs.cs
index a99d6ab3..56145381 100644
--- a/src/SMAPI/Events/RenderedWorldEventArgs.cs
+++ b/src/SMAPI/Events/RenderedWorldEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using Microsoft.Xna.Framework.Graphics;
using StardewValley;
diff --git a/src/SMAPI/Events/RenderingActiveMenuEventArgs.cs b/src/SMAPI/Events/RenderingActiveMenuEventArgs.cs
index 3e3f3258..103f56df 100644
--- a/src/SMAPI/Events/RenderingActiveMenuEventArgs.cs
+++ b/src/SMAPI/Events/RenderingActiveMenuEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using Microsoft.Xna.Framework.Graphics;
using StardewValley;
diff --git a/src/SMAPI/Events/RenderingEventArgs.cs b/src/SMAPI/Events/RenderingEventArgs.cs
index 8f6b3557..5acbef09 100644
--- a/src/SMAPI/Events/RenderingEventArgs.cs
+++ b/src/SMAPI/Events/RenderingEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using Microsoft.Xna.Framework.Graphics;
using StardewValley;
diff --git a/src/SMAPI/Events/RenderingHudEventArgs.cs b/src/SMAPI/Events/RenderingHudEventArgs.cs
index 87269b90..84c96ecd 100644
--- a/src/SMAPI/Events/RenderingHudEventArgs.cs
+++ b/src/SMAPI/Events/RenderingHudEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using Microsoft.Xna.Framework.Graphics;
using StardewValley;
diff --git a/src/SMAPI/Events/RenderingWorldEventArgs.cs b/src/SMAPI/Events/RenderingWorldEventArgs.cs
index 2fc9964f..d0d44789 100644
--- a/src/SMAPI/Events/RenderingWorldEventArgs.cs
+++ b/src/SMAPI/Events/RenderingWorldEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using Microsoft.Xna.Framework.Graphics;
using StardewValley;
diff --git a/src/SMAPI/Events/TerrainFeatureListChangedEventArgs.cs b/src/SMAPI/Events/TerrainFeatureListChangedEventArgs.cs
index 77a73102..cdf1e6dc 100644
--- a/src/SMAPI/Events/TerrainFeatureListChangedEventArgs.cs
+++ b/src/SMAPI/Events/TerrainFeatureListChangedEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using System.Collections.Generic;
using System.Linq;
diff --git a/src/SMAPI/Events/WarpedEventArgs.cs b/src/SMAPI/Events/WarpedEventArgs.cs
index 92a8ea77..9afe4a4e 100644
--- a/src/SMAPI/Events/WarpedEventArgs.cs
+++ b/src/SMAPI/Events/WarpedEventArgs.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using StardewValley;