@@ -17,11 +17,13 @@ public final class Config {
1717 private static boolean movementCheck ;
1818 private static boolean includeLeashed ;
1919 private static boolean includeLeashedInterdimensional ;
20+ private static boolean teleportMountedEntities ;
2021 private static Path ignoresPath ;
2122 private static boolean debug ;
2223
2324 private static synchronized void assertInitialized () {
24- if (!initialized ) throw new IllegalStateException ("Config access prior to initialization!" );
25+ if (!initialized )
26+ throw new IllegalStateException ("Config access prior to initialization!" );
2527 }
2628
2729 public static synchronized void load (Plugin plugin ) {
@@ -37,13 +39,13 @@ public static synchronized void load(Plugin plugin) {
3739 config .addDefault ("movement-check" , false );
3840 config .addDefault ("include-leashed" , true );
3941 config .addDefault ("include-leashed-interdimensional" , false );
42+ config .addDefault ("teleport-mounted-entities" , true );
4043 config .addDefault ("ignores-path" , Ignores .defaultPath .apply (plugin ));
4144 config .addDefault ("debug" , false );
4245 config .addDefault ("bStats" , true );
4346 config .options ().copyDefaults (true );
4447 plugin .saveConfig ();
4548
46-
4749 allowMultiTargetRequest = config .getBoolean ("allow-multi-target-request" );
4850
4951 if (config .getInt ("request-timeout-seconds" ) < 10 ) {
@@ -80,7 +82,9 @@ public static synchronized void load(Plugin plugin) {
8082
8183 includeLeashedInterdimensional = config .getBoolean ("include-leashed-interdimensional" );
8284
83- //noinspection DataFlowIssue
85+ teleportMountedEntities = config .getBoolean ("teleport-mounted-entities" );
86+
87+ // noinspection DataFlowIssue
8488 if (config .getString ("ignores-path" ) == null || config .getString ("ignores-path" ).isBlank ()) {
8589 config .set ("ignores-path" , Ignores .defaultPath .apply (plugin ));
8690 plugin .saveConfig ();
@@ -90,7 +94,7 @@ public static synchronized void load(Plugin plugin) {
9094 config .set ("ignores-path" , Ignores .defaultPath .apply (plugin ));
9195 plugin .saveConfig ();
9296 }
93- //noinspection DataFlowIssue
97+ // noinspection DataFlowIssue
9498 ignoresPath = Path .of (config .getString ("ignores-path" ));
9599
96100 debug = config .getBoolean ("debug" );
@@ -148,6 +152,11 @@ public static boolean includeLeashedInterdimensional() {
148152 return includeLeashedInterdimensional ;
149153 }
150154
155+ public static boolean teleportMountedEntities () {
156+ assertInitialized ();
157+ return teleportMountedEntities ;
158+ }
159+
151160 public static Path ignoresPath () {
152161 assertInitialized ();
153162 return ignoresPath ;
0 commit comments