From 2e748b1723a5c7aa62c5af060c6697b8e69a899c Mon Sep 17 00:00:00 2001
From: Will FP <38837418+WillFP@users.noreply.github.com>
Date: Tue, 12 Oct 2021 20:12:09 +0100
Subject: [PATCH 1/5] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 021c3ae9..9d8848b9 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-
+
From 8a4a71ebc13e725b895ab2f4856df914601dfff1 Mon Sep 17 00:00:00 2001
From: Auxilor
Date: Fri, 15 Oct 2021 10:24:18 +0100
Subject: [PATCH 2/5] Updated lands integration
---
eco-core/core-plugin/build.gradle | 4 +--
.../integrations/antigrief/AntigriefLands.kt | 26 ++++++-------------
2 files changed, 10 insertions(+), 20 deletions(-)
diff --git a/eco-core/core-plugin/build.gradle b/eco-core/core-plugin/build.gradle
index 4f40ad74..bdb9deb5 100644
--- a/eco-core/core-plugin/build.gradle
+++ b/eco-core/core-plugin/build.gradle
@@ -21,12 +21,12 @@ dependencies {
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.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 {
From 910ad187031b19ae72d2cf1b3a2bda10813a9be6 Mon Sep 17 00:00:00 2001
From: Auxilor
Date: Fri, 15 Oct 2021 10:25:32 +0100
Subject: [PATCH 3/5] Updated towny
---
eco-core/core-plugin/build.gradle | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eco-core/core-plugin/build.gradle b/eco-core/core-plugin/build.gradle
index bdb9deb5..87cdaa93 100644
--- a/eco-core/core-plugin/build.gradle
+++ b/eco-core/core-plugin/build.gradle
@@ -20,7 +20,7 @@ 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.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'
From b60cbfce2c5b6dec274114561e9477076ae5a779 Mon Sep 17 00:00:00 2001
From: Auxilor
Date: Fri, 15 Oct 2021 10:27:44 +0100
Subject: [PATCH 4/5] Fixed unpredicatable config behaviour
---
.../willfp/eco/internal/config/json/EcoJSONConfigWrapper.kt | 4 +---
.../willfp/eco/internal/config/yaml/EcoYamlConfigWrapper.kt | 4 +---
2 files changed, 2 insertions(+), 6 deletions(-)
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? {
From adf6d1c8003d0527891d200550fa46759fa92420 Mon Sep 17 00:00:00 2001
From: Auxilor
Date: Fri, 15 Oct 2021 10:27:58 +0100
Subject: [PATCH 5/5] Updated to 6.11.1
---
gradle.properties | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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