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 3
3
using System . Collections . Generic ;
4
4
using System . Globalization ;
5
5
using System . IO ;
6
+ using System . Linq ;
6
7
using System . Reflection ;
8
+ using Newtonsoft . Json ;
7
9
using Rocket . Core . Plugins ;
8
10
using Tavstal . TLibrary . Extensions ;
9
11
using Tavstal . TLibrary . Managers ;
@@ -195,7 +197,7 @@ public virtual void CheckPluginFiles()
195
197
// Log missing fields
196
198
foreach ( var field in Config . GetType ( ) . GetProperties ( ) )
197
199
{
198
- if ( field . Name == "FileName" || field . Name == "FilePath" )
200
+ if ( field . GetCustomAttribute < JsonIgnoreAttribute > ( ) != null )
199
201
continue ;
200
202
201
203
if ( field . GetValue ( Config ) != null )
@@ -206,7 +208,7 @@ public virtual void CheckPluginFiles()
206
208
207
209
foreach ( var field in Config . GetType ( ) . GetFields ( ) )
208
210
{
209
- if ( field . Name == "FileName" || field . Name == "FilePath" )
211
+ if ( field . GetCustomAttribute < JsonIgnoreAttribute > ( ) != null )
210
212
continue ;
211
213
212
214
if ( field . GetValue ( Config ) != null )
You can’t perform that action at this time.
0 commit comments