Add option to prevent entities from being moved from plot (#4554)

This commit is contained in:
Hannes Greule
2024-12-22 11:12:10 +01:00
committed by GitHub
parent 198052b7a8
commit 960b7b2a8b
3 changed files with 26 additions and 32 deletions

View File

@ -26,6 +26,7 @@ import org.apache.logging.log4j.Logger;
import java.io.File;
import java.io.PrintWriter;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@ -372,6 +373,7 @@ public class Config {
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.TYPE})
@Documented
public @interface Comment {
String[] value();

View File

@ -651,6 +651,8 @@ public class Settings extends Config {
public static boolean PAPER_LISTENERS = true;
@Comment("Prevent entities from leaving plots")
public static boolean ENTITY_PATHING = true;
@Comment("Prevent entities from leaving plots, even by pushing or pulling")
public static boolean ENTITY_MOVEMENT = false;
@Comment(
"Cancel entity spawns when the chunk is loaded if the PlotArea's mob spawning is off")
public static boolean CANCEL_CHUNK_SPAWN = true;