summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-12-12 01:09:43 -0500
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-12-12 01:09:43 -0500
commit59a25a12ffdb90c5a9a3db90be933ca4e76eb64f (patch)
treeada24a3d5366ce695a0b6ba093ec80be45305db8 /src/SMAPI/Framework
parent0e43041777d68b96f110fa38ad7424b855db761a (diff)
downloadSMAPI-59a25a12ffdb90c5a9a3db90be933ca4e76eb64f.tar.gz
SMAPI-59a25a12ffdb90c5a9a3db90be933ca4e76eb64f.tar.bz2
SMAPI-59a25a12ffdb90c5a9a3db90be933ca4e76eb64f.zip
validate interface is public (#409)
Diffstat (limited to 'src/SMAPI/Framework')
-rw-r--r--src/SMAPI/Framework/ModHelpers/ModRegistryHelper.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/ModHelpers/ModRegistryHelper.cs b/src/SMAPI/Framework/ModHelpers/ModRegistryHelper.cs
index 68201d9a..d39c885c 100644
--- a/src/SMAPI/Framework/ModHelpers/ModRegistryHelper.cs
+++ b/src/SMAPI/Framework/ModHelpers/ModRegistryHelper.cs
@@ -72,7 +72,12 @@ namespace StardewModdingAPI.Framework.ModHelpers
// validate
if (!typeof(TInterface).IsInterface)
{
- this.Monitor.Log("Tried to map a mod-provided API into a class; must be an interface.");
+ this.Monitor.Log("Tried to map a mod-provided API to a class; must be a public interface.", LogLevel.Error);
+ return null;
+ }
+ if (!typeof(TInterface).IsPublic)
+ {
+ this.Monitor.Log("Tried to map a mod-provided API to a non-public interface; must be a public interface.", LogLevel.Error);
return null;
}