diff --git a/README.md b/README.md
index 021c3ae9..9d8848b9 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-
+
diff --git a/eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/config/json/EcoJSONConfigWrapper.kt b/eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/config/json/EcoJSONConfigWrapper.kt
index 1e41e6f5..5f382bc6 100644
--- a/eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/config/json/EcoJSONConfigWrapper.kt
+++ b/eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/config/json/EcoJSONConfigWrapper.kt
@@ -4,7 +4,6 @@ import com.google.gson.Gson
import com.google.gson.GsonBuilder
import com.willfp.eco.core.config.interfaces.JSONConfig
import com.willfp.eco.util.StringUtils
-import org.apache.commons.lang.Validate
import java.util.*
import java.util.concurrent.ConcurrentHashMap
@@ -124,8 +123,7 @@ open class EcoJSONConfigWrapper : JSONConfig {
override fun getSubsection(path: String): JSONConfig {
val subsection = getSubsectionOrNull(path)
- Validate.notNull(subsection)
- return subsection!!
+ return subsection ?: EcoJSONConfigSection(emptyMap())
}
override fun getSubsectionOrNull(path: String): JSONConfig? {
diff --git a/eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/config/yaml/EcoYamlConfigWrapper.kt b/eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/config/yaml/EcoYamlConfigWrapper.kt
index 5b60f78e..acdbc8fc 100644
--- a/eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/config/yaml/EcoYamlConfigWrapper.kt
+++ b/eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/config/yaml/EcoYamlConfigWrapper.kt
@@ -2,7 +2,6 @@ package com.willfp.eco.internal.config.yaml
import com.willfp.eco.core.config.interfaces.Config
import com.willfp.eco.util.StringUtils
-import org.apache.commons.lang.Validate
import org.bukkit.configuration.ConfigurationSection
import org.bukkit.configuration.file.YamlConfiguration
import java.io.StringReader
@@ -52,8 +51,7 @@ open class EcoYamlConfigWrapper : Config {
override fun getSubsection(path: String): Config {
val subsection = getSubsectionOrNull(path)
- Validate.notNull(subsection)
- return subsection!!
+ return subsection ?: EcoYamlConfigSection(YamlConfiguration())
}
override fun getSubsectionOrNull(path: String): Config? {
diff --git a/eco-core/core-plugin/build.gradle b/eco-core/core-plugin/build.gradle
index 4f40ad74..87cdaa93 100644
--- a/eco-core/core-plugin/build.gradle
+++ b/eco-core/core-plugin/build.gradle
@@ -20,13 +20,13 @@ dependencies {
compileOnly 'com.github.TechFortress:GriefPrevention:16.17.1'
compileOnly 'com.massivecraft:Factions:1.6.9.5-U0.5.10'
compileOnly 'com.github.cryptomorin:kingdoms:1.10.14'
- compileOnly 'com.github.TownyAdvanced:Towny:0.97.2.5'
- compileOnly 'com.github.angeschossen:LandsAPI:4.7.3'
+ compileOnly 'com.github.TownyAdvanced:Towny:0.97.2.6'
+ compileOnly 'com.github.angeschossen:LandsAPI:5.15.2'
compileOnly 'fr.neatmonster:nocheatplus:3.16.1-SNAPSHOT'
compileOnly 'com.github.jiangdashao:matrix-api-repo:317d4635fd'
compileOnly 'com.gmail.nossr50.mcMMO:mcMMO:2.1.202'
compileOnly 'me.clip:placeholderapi:2.10.10'
- compileOnly 'com.willfp:Oraxen:e1f4003d8d'
+ compileOnly 'com.github.oraxen:oraxen:bd81ace154'
compileOnly 'com.github.brcdev-minecraft:shopgui-api:2.2.0'
compileOnly 'com.github.LoneDev6:API-ItemsAdder:2.4.7'
compileOnly 'com.arcaniax:HeadDatabase-API:1.3.0'
diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/spigot/integrations/antigrief/AntigriefLands.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/spigot/integrations/antigrief/AntigriefLands.kt
index 6ae0cf5b..724de7f1 100644
--- a/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/spigot/integrations/antigrief/AntigriefLands.kt
+++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/spigot/integrations/antigrief/AntigriefLands.kt
@@ -3,7 +3,6 @@ package com.willfp.eco.spigot.integrations.antigrief
import com.willfp.eco.core.EcoPlugin
import com.willfp.eco.core.integrations.antigrief.AntigriefWrapper
import me.angeschossen.lands.api.integration.LandsIntegration
-import me.angeschossen.lands.api.role.enums.RoleSetting
import org.bukkit.Location
import org.bukkit.block.Block
import org.bukkit.entity.LivingEntity
@@ -15,41 +14,32 @@ class AntigriefLands(private val plugin: EcoPlugin) : AntigriefWrapper {
player: Player,
block: Block
): Boolean {
- val area = landsIntegration.getAreaByLoc(block.location)
- return area?.canSetting(player, RoleSetting.BLOCK_BREAK, false) ?: true
+ val area = landsIntegration.getAreaByLoc(block.location) ?: return true
+ return area.isTrusted(player.uniqueId)
}
override fun canCreateExplosion(
player: Player,
location: Location
): Boolean {
- val area = landsIntegration.getAreaByLoc(location)
- return area?.canSetting(player, RoleSetting.BLOCK_IGNITE, false) ?: true
+ val area = landsIntegration.getAreaByLoc(location) ?: return true
+ return area.isTrusted(player.uniqueId)
}
override fun canPlaceBlock(
player: Player,
block: Block
): Boolean {
- val area = landsIntegration.getAreaByLoc(block.location)
- return area?.canSetting(player, RoleSetting.BLOCK_PLACE, false) ?: true
+ val area = landsIntegration.getAreaByLoc(block.location) ?: return true
+ return area.isTrusted(player.uniqueId)
}
override fun canInjure(
player: Player,
victim: LivingEntity
): Boolean {
- val area = landsIntegration.getAreaByLoc(victim.location)
- if (victim is Player) {
- if (area != null) {
- return area.canSetting(player, RoleSetting.ATTACK_PLAYER, false)
- }
- } else {
- if (area != null) {
- return area.canSetting(player, RoleSetting.ATTACK_ANIMAL, false)
- }
- }
- return true
+ val area = landsIntegration.getAreaByLoc(victim.location) ?: return true
+ return area.isTrusted(player.uniqueId)
}
override fun getPluginName(): String {
diff --git a/gradle.properties b/gradle.properties
index 733ae936..baeb0d22 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,2 +1,2 @@
-version = 6.11.0
+version = 6.11.1
plugin-name = eco
\ No newline at end of file