diff --git a/config.yml b/config.yml index 13cdb69..bb0f2e5 100644 --- a/config.yml +++ b/config.yml @@ -74,6 +74,55 @@ world: generate: true islands: true +### Protection Settings ### +protection: + # Allow pistons to push outside of the protected area (maybe to make bridges) + allow-piston-push: true + + # Restrict Wither and other flying mobs. + # Any flying mobs that exit the island space where they were spawned will be removed. + # Includes blaze and ghast. + restrict-flying-mobs: true + + # Invincible visitors. List of damages that will not affect visitors. + # Make list blank if visitors should receive all damages + invincible-visitors: + - BLOCK_EXPLOSION + - CONTACT + - CUSTOM + - DROWNING + - ENTITY_ATTACK + - ENTITY_EXPLOSION + - FALL + - FALLING_BLOCK + - FIRE + - FIRE_TICK + - LAVA + - LIGHTNING + - MAGIC + - POISON + - PROJECTILE + - STARVATION + - SUFFOCATION + - THORNS + - WITHER + - DRAGON_BREATH + - FLY_INTO_WALL + - HOT_FLOOR + - CRAMMING + - VOID + + # Visitor banned commands: Visitors to islands cannot use these commands + visitor-banned-commands: + - spawner + - spawnmob + + # PVP cooldown in seconds. Players cannot toggle PVP off and on until this timeout + toggle-pvp-cooldown: 60 + + # TODO + flags: [] + ### Island Settings ### island: # Default chest items diff --git a/src/main/java/bskyblock/addon/acidisland/AISettings.java b/src/main/java/bskyblock/addon/acidisland/AISettings.java index 28635db..eb2e19a 100644 --- a/src/main/java/bskyblock/addon/acidisland/AISettings.java +++ b/src/main/java/bskyblock/addon/acidisland/AISettings.java @@ -10,6 +10,7 @@ import org.bukkit.entity.EntityType; import org.bukkit.inventory.ItemStack; import org.bukkit.potion.PotionEffectType; +import us.tastybento.bskyblock.api.configuration.ConfigComment; import us.tastybento.bskyblock.api.configuration.ConfigEntry; import us.tastybento.bskyblock.api.configuration.StoreAt; import us.tastybento.bskyblock.api.configuration.WorldSettings; @@ -116,6 +117,13 @@ public class AISettings implements DataObject, WorldSettings { @ConfigEntry(path = "acid.damage.protection.full-armor") private boolean fullArmorProtection; + + // Invincible visitor settings + @ConfigComment("Invincible visitors. List of damages that will not affect visitors.") + @ConfigComment("Make list blank if visitors should receive all damages") + @ConfigEntry(path = "protection.invincible-visitors") + private List ivSettings = new ArrayList<>(); + // --------------------------------------------- /* ISLAND */ @@ -184,6 +192,7 @@ public class AISettings implements DataObject, WorldSettings { private boolean useOwnGenerator; + public List getAcidDamageType() { return acidEffects; } @@ -862,5 +871,21 @@ public class AISettings implements DataObject, WorldSettings { this.fullArmorProtection = fullArmorProtection; } + /** + * Invincible visitor settings + * @return the ivSettings + */ + @Override + public List getIvSettings() { + return ivSettings; + } + + /** + * @param ivSettings the ivSettings to set + */ + public void setIvSettings(List ivSettings) { + this.ivSettings = ivSettings; + } + }