@@ -14,6 +14,7 @@ public final class ConfigHandler extends AbstractConfigHandler {
1414 private static final String PATH_WARNING = "chat_warning" ;
1515 private static final String PATH_ON_CREATION = "activate.on_creation" ;
1616 private static final String PATH_ON_READ = "activate.on_read" ;
17+ private static final String PATH_ON_CREATIVE_INVENTORY = "activate.on_creative_inventory" ;
1718 private static final String PATH_DEBUG = "log_debug" ;
1819
1920 private static final List <String > DEF_FILTER = Arrays .asList (
@@ -38,6 +39,7 @@ public final class ConfigHandler extends AbstractConfigHandler {
3839 private List <String > chatWarning ;
3940 private boolean onCreation ;
4041 private boolean onRead ;
42+ private boolean onCreativeInventory ;
4143 private boolean debug ;
4244
4345 public ConfigHandler (@ NotNull final Plugin plugin ) {
@@ -67,6 +69,8 @@ protected void loadData() {
6769
6870 onRead = config .getBoolean (PATH_ON_READ );
6971
72+ onCreativeInventory = config .getBoolean (PATH_ON_CREATIVE_INVENTORY );
73+
7074 debug = config .getBoolean (PATH_DEBUG );
7175 }
7276
@@ -75,6 +79,7 @@ protected void addDefaults() {
7579 config .addDefault (PATH_FILTER , DEF_FILTER );
7680 config .addDefault (PATH_WARNING , DEF_WARNING );
7781 config .addDefault (PATH_ON_CREATION , true );
82+ config .addDefault (PATH_ON_CREATIVE_INVENTORY , true );
7883 config .addDefault (PATH_ON_READ , false );
7984 config .addDefault (PATH_DEBUG , false );
8085 }
@@ -97,6 +102,10 @@ public boolean isOnRead() {
97102 return onRead ;
98103 }
99104
105+ public boolean isOnCreativeInventory () {
106+ return onCreativeInventory ;
107+ }
108+
100109 public boolean isDebug () {
101110 return debug ;
102111 }
0 commit comments