11package com .massivecraft .massivecore .store ;
22
3+ import com .massivecraft .massivecore .ConfServer ;
4+ import com .massivecraft .massivecore .MassiveCoreMConf ;
5+ import com .massivecraft .massivecore .util .MUtil ;
36import com .massivecraft .massivecore .xlib .gson .JsonObject ;
47
8+ import java .util .List ;
9+
510// Self referencing generic.
611// http://www.angelikalanger.com/GenericsFAQ/FAQSections/ProgrammingIdioms.html#FAQ206
712public class Entity <E extends Entity <E >> extends EntityInternal <E >
@@ -31,13 +36,20 @@ public String getUniverse()
3136 private volatile transient boolean lastDefault = false ;
3237 public boolean getLastDefault () { return this .lastDefault ; }
3338 public void setLastDefault (boolean lastDefault ) { this .lastDefault = lastDefault ; }
34-
39+
40+ private volatile transient List <StackTraceElement > lastStackTraceChanged ;
41+ public List <StackTraceElement > getLastStackTraceChanged () { return this .lastStackTraceChanged ; }
42+ public void setLastStackTraceChanged (List <StackTraceElement > lastStackTraceChanged ) { this .lastStackTraceChanged = lastStackTraceChanged ; }
43+
3544 public void clearSyncLogFields ()
3645 {
3746 this .lastRaw = null ;
3847 this .lastMtime = 0 ;
3948 this .lastDefault = false ;
49+ this .lastStackTraceChanged = null ;
4050 }
51+
52+
4153
4254 // -------------------------------------------- //
4355 // ATTACH AND DETACH
@@ -62,6 +74,14 @@ public E detach()
6274 // -------------------------------------------- //
6375 // SYNC AND IO ACTIONS
6476 // -------------------------------------------- //
77+
78+ @ Override
79+ public void changed ()
80+ {
81+ super .changed ();
82+ if (!ConfServer .localPollingEnabled || !MassiveCoreMConf .get ().warnOnLocalAlter ) return ;
83+ this .lastStackTraceChanged = MUtil .getStackTrace ();
84+ }
6585
6686 public Modification sync ()
6787 {
0 commit comments