File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 33using System . Collections . Generic ;
44using System . Globalization ;
55using System . IO ;
6+ using System . Linq ;
67using System . Reflection ;
8+ using Newtonsoft . Json ;
79using Rocket . Core . Plugins ;
810using Tavstal . TLibrary . Extensions ;
911using Tavstal . TLibrary . Managers ;
@@ -195,7 +197,7 @@ public virtual void CheckPluginFiles()
195197 // Log missing fields
196198 foreach ( var field in Config . GetType ( ) . GetProperties ( ) )
197199 {
198- if ( field . Name == "FileName" || field . Name == "FilePath" )
200+ if ( field . GetCustomAttribute < JsonIgnoreAttribute > ( ) != null )
199201 continue ;
200202
201203 if ( field . GetValue ( Config ) != null )
@@ -206,7 +208,7 @@ public virtual void CheckPluginFiles()
206208
207209 foreach ( var field in Config . GetType ( ) . GetFields ( ) )
208210 {
209- if ( field . Name == "FileName" || field . Name == "FilePath" )
211+ if ( field . GetCustomAttribute < JsonIgnoreAttribute > ( ) != null )
210212 continue ;
211213
212214 if ( field . GetValue ( Config ) != null )
You can’t perform that action at this time.
0 commit comments