Compare commits
30 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ebc1a18a1 | ||
|
|
db20bed6e0 | ||
|
|
0826da6cfc | ||
|
|
6d8fce3462 | ||
|
|
eedb1404b6 | ||
|
|
299abe4568 | ||
|
|
98e1f19145 | ||
|
|
424e2ff43d | ||
|
|
3a899226a3 | ||
|
|
8336eee892 | ||
|
|
a48f756582 | ||
|
|
2aa463d083 | ||
|
|
ea833de9f7 | ||
|
|
3c0822310d | ||
|
|
d5cbc1d497 | ||
|
|
c912ad1c9c | ||
|
|
752f38ef25 | ||
|
|
a5525ab332 | ||
|
|
1b442f400d | ||
|
|
3c9c0bcef4 | ||
|
|
3a7a938e7f | ||
|
|
32c17aa3ae | ||
|
|
e451732876 | ||
|
|
53f81c0a03 | ||
|
|
f60d91c5f3 | ||
|
|
a9bdca56a5 | ||
|
|
3516d5881e | ||
|
|
95cecc2b2a | ||
|
|
f276026972 | ||
|
|
d2c6cc0d2e |
8
.github/workflows/java-ci.yml
vendored
8
.github/workflows/java-ci.yml
vendored
@@ -14,11 +14,11 @@ jobs:
|
||||
id: vars
|
||||
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
||||
|
||||
- name: Set up JDK 16
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: 16
|
||||
distribution: 'temurin'
|
||||
java-version: 17
|
||||
|
||||
- name: Setup build cache
|
||||
uses: actions/cache@v2.1.6
|
||||
@@ -28,7 +28,7 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
|
||||
- run: ./gradlew build
|
||||
- run: ./gradlew build --full-stacktrace
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
|
||||
6
.github/workflows/publish-release.yml
vendored
6
.github/workflows/publish-release.yml
vendored
@@ -12,11 +12,11 @@ jobs:
|
||||
- name: Checkout latest code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up JDK 16
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: 16
|
||||
distribution: 'temurin'
|
||||
java-version: 17
|
||||
|
||||
- name: Setup build cache
|
||||
uses: actions/cache@v2.1.6
|
||||
|
||||
@@ -21,4 +21,4 @@
|
||||
|
||||
## Other
|
||||
- All drops **must** be sent through a DropQueue - calls to World#dropItem will get your PR rejected.
|
||||
- eco is built with java 16.
|
||||
- eco is built with java 17.
|
||||
@@ -12,6 +12,7 @@ dependencies {
|
||||
implementation(project(":eco-core:core-backend"))
|
||||
implementation(project(":eco-core:core-nms:v1_16_R3"))
|
||||
implementation(project(path = ":eco-core:core-nms:v1_17_R1", configuration = "reobf"))
|
||||
implementation(project(":eco-core:core-nms:v1_18_R1"))
|
||||
}
|
||||
|
||||
allprojects {
|
||||
@@ -25,6 +26,9 @@ allprojects {
|
||||
mavenLocal()
|
||||
maven("https://jitpack.io")
|
||||
|
||||
// CustomCrafting
|
||||
maven("https://maven.wolfyscript.com/repository/public/")
|
||||
|
||||
// SuperiorSkyblock2
|
||||
maven("https://repo.bg-software.com/repository/api/")
|
||||
|
||||
@@ -65,6 +69,11 @@ allprojects {
|
||||
// Test
|
||||
testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.1")
|
||||
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.1")
|
||||
|
||||
// Adventure
|
||||
compileOnly("net.kyori:adventure-api:4.9.3")
|
||||
compileOnly("net.kyori:adventure-text-serializer-gson:4.9.3")
|
||||
compileOnly("net.kyori:adventure-text-serializer-legacy:4.9.3")
|
||||
}
|
||||
|
||||
tasks.withType<JavaCompile> {
|
||||
@@ -93,8 +102,8 @@ allprojects {
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_16
|
||||
targetCompatibility = JavaVersion.VERSION_16
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
|
||||
@@ -9,9 +9,6 @@ dependencies {
|
||||
// Adventure
|
||||
compileOnly 'net.kyori:adventure-platform-bukkit:4.0.0'
|
||||
compileOnly 'net.kyori:adventure-text-minimessage:4.1.0-SNAPSHOT'
|
||||
compileOnly 'net.kyori:adventure-api:4.9.2'
|
||||
compileOnly 'net.kyori:adventure-text-serializer-gson:4.9.2'
|
||||
compileOnly 'net.kyori:adventure-text-serializer-legacy:4.9.2'
|
||||
|
||||
// Other
|
||||
compileOnly 'org.spigotmc:spigot-api:1.17.1-R0.1-SNAPSHOT'
|
||||
|
||||
@@ -41,11 +41,19 @@ public class Prerequisite {
|
||||
"Requires server to have vault"
|
||||
);
|
||||
|
||||
/**
|
||||
* Requires the server to be running 1.18.
|
||||
*/
|
||||
public static final Prerequisite HAS_1_18 = new Prerequisite(
|
||||
() -> ProxyConstants.NMS_VERSION.contains("18"),
|
||||
"Requires server to be running 1.18+"
|
||||
);
|
||||
|
||||
/**
|
||||
* Requires the server to be running 1.17.
|
||||
*/
|
||||
public static final Prerequisite HAS_1_17 = new Prerequisite(
|
||||
() -> ProxyConstants.NMS_VERSION.contains("17"),
|
||||
() -> ProxyConstants.NMS_VERSION.contains("17") || HAS_1_18.isMet(),
|
||||
"Requires server to be running 1.17+"
|
||||
);
|
||||
|
||||
|
||||
@@ -16,4 +16,40 @@ public class ConfigYml extends YamlBaseConfig {
|
||||
public ConfigYml(@NotNull final EcoPlugin plugin) {
|
||||
super("config", true, plugin);
|
||||
}
|
||||
|
||||
/**
|
||||
* Config.yml.
|
||||
*
|
||||
* @param plugin The plugin.
|
||||
* @param removeUnused Remove unused.
|
||||
*/
|
||||
public ConfigYml(@NotNull final EcoPlugin plugin,
|
||||
final boolean removeUnused) {
|
||||
super("config", removeUnused, plugin);
|
||||
}
|
||||
|
||||
/**
|
||||
* Config.yml.
|
||||
*
|
||||
* @param plugin The plugin.
|
||||
* @param name The config name.
|
||||
*/
|
||||
public ConfigYml(@NotNull final EcoPlugin plugin,
|
||||
@NotNull final String name) {
|
||||
super(name, true, plugin);
|
||||
}
|
||||
|
||||
/**
|
||||
* Config.yml.
|
||||
*
|
||||
* @param plugin The plugin.
|
||||
* @param name The config name.
|
||||
* @param removeUnused Remove unused.
|
||||
*/
|
||||
public ConfigYml(@NotNull final EcoPlugin plugin,
|
||||
@NotNull final String name,
|
||||
final boolean removeUnused) {
|
||||
super(name, removeUnused, plugin);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -70,14 +70,14 @@ public interface FastItemStack {
|
||||
*
|
||||
* @param hideFlags The flags.
|
||||
*/
|
||||
void addItemFlags(ItemFlag... hideFlags);
|
||||
void addItemFlags(@NotNull ItemFlag... hideFlags);
|
||||
|
||||
/**
|
||||
* Remove ItemFlags.
|
||||
*
|
||||
* @param hideFlags The flags.
|
||||
*/
|
||||
void removeItemFlags(ItemFlag... hideFlags);
|
||||
void removeItemFlags(@NotNull ItemFlag... hideFlags);
|
||||
|
||||
/**
|
||||
* Get the ItemFlags.
|
||||
@@ -92,7 +92,7 @@ public interface FastItemStack {
|
||||
* @param flag The flag.
|
||||
* @return If the flag is present.
|
||||
*/
|
||||
boolean hasItemFlag(ItemFlag flag);
|
||||
boolean hasItemFlag(@NotNull ItemFlag flag);
|
||||
|
||||
/**
|
||||
* Get the Bukkit ItemStack again.
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.willfp.eco.core.recipe.recipes;
|
||||
import com.willfp.eco.core.Eco;
|
||||
import com.willfp.eco.core.EcoPlugin;
|
||||
import com.willfp.eco.core.PluginDependent;
|
||||
import com.willfp.eco.core.Prerequisite;
|
||||
import com.willfp.eco.core.items.TestableItem;
|
||||
import com.willfp.eco.core.recipe.Recipes;
|
||||
import com.willfp.eco.core.recipe.parts.EmptyTestableItem;
|
||||
@@ -112,6 +113,12 @@ public final class ShapedCraftingRecipe extends PluginDependent<EcoPlugin> imple
|
||||
displayedRecipe.setIngredient(character, new RecipeChoice.ExactChoice(item));
|
||||
}
|
||||
|
||||
if (Prerequisite.HAS_1_18.isMet()) {
|
||||
if (Bukkit.getServer().getRecipe(this.getKey()) != null) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Bukkit.getServer().addRecipe(shapedRecipe);
|
||||
Bukkit.getServer().addRecipe(displayedRecipe);
|
||||
}
|
||||
|
||||
@@ -82,13 +82,12 @@ public final class PlayerUtils {
|
||||
* @return The player name.
|
||||
*/
|
||||
public static String getSavedDisplayName(@NotNull final OfflinePlayer player) {
|
||||
PlayerProfile profile = PlayerProfile.load(player);
|
||||
|
||||
if (player instanceof Player onlinePlayer) {
|
||||
profile.write(PLAYER_NAME_KEY, onlinePlayer.getDisplayName());
|
||||
return onlinePlayer.getDisplayName();
|
||||
updateSavedDisplayName(onlinePlayer);
|
||||
}
|
||||
|
||||
PlayerProfile profile = PlayerProfile.load(player);
|
||||
|
||||
String saved = profile.read(PLAYER_NAME_KEY);
|
||||
|
||||
if (saved.equals(PLAYER_NAME_KEY.getDefaultValue())) {
|
||||
|
||||
@@ -4,7 +4,7 @@ buildscript {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31"
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,14 +16,14 @@ subprojects {
|
||||
|
||||
dependencies {
|
||||
compileOnly project(":eco-api")
|
||||
compileOnly 'org.jetbrains.kotlin:kotlin-stdlib:1.5.31'
|
||||
compileOnly 'org.jetbrains.kotlin:kotlin-stdlib:1.6.0'
|
||||
}
|
||||
|
||||
compileKotlin {
|
||||
kotlinOptions {
|
||||
jvmTarget = "16"
|
||||
jvmTarget = "17"
|
||||
}
|
||||
targetCompatibility = JavaVersion.VERSION_16
|
||||
sourceCompatibility = JavaVersion.VERSION_16
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
}
|
||||
@@ -74,7 +74,8 @@ class EcoProxyFactory(
|
||||
companion object {
|
||||
val SUPPORTED_VERSIONS = listOf(
|
||||
"v1_16_R3",
|
||||
"v1_17_R1"
|
||||
"v1_17_R1",
|
||||
"v1_18_R1"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
group 'com.willfp'
|
||||
version rootProject.version
|
||||
|
||||
subprojects {
|
||||
dependencies {
|
||||
compileOnly project(':eco-core:core-proxy')
|
||||
compileOnly project(':eco-core:core-plugin')
|
||||
compileOnly project(':eco-core:core-backend')
|
||||
}
|
||||
}
|
||||
12
eco-core/core-nms/build.gradle.kts
Normal file
12
eco-core/core-nms/build.gradle.kts
Normal file
@@ -0,0 +1,12 @@
|
||||
group = "com.willfp"
|
||||
version = rootProject.version
|
||||
|
||||
subprojects {
|
||||
dependencies {
|
||||
compileOnly(project(":eco-core:core-proxy"))
|
||||
compileOnly(project(":eco-core:core-plugin"))
|
||||
compileOnly(project(":eco-core:core-backend"))
|
||||
// libraries.minecraft.net machine broke
|
||||
compileOnly("com.github.Mojang:brigadier:1.0.18")
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,4 @@ version rootProject.version
|
||||
|
||||
dependencies {
|
||||
compileOnly 'org.spigotmc:spigot:1.16.5-R0.1-SNAPSHOT'
|
||||
compileOnly 'net.kyori:adventure-api:4.9.1'
|
||||
compileOnly 'net.kyori:adventure-text-serializer-gson:4.8.1'
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id("io.papermc.paperweight.userdev") version "1.1.14"
|
||||
id("io.papermc.paperweight.userdev") version "1.2.0"
|
||||
}
|
||||
|
||||
group = "com.willfp"
|
||||
@@ -7,8 +7,6 @@ version = rootProject.version
|
||||
|
||||
dependencies {
|
||||
paperDevBundle("1.17.1-R0.1-SNAPSHOT")
|
||||
compileOnly("net.kyori:adventure-api:4.9.1")
|
||||
compileOnly("net.kyori:adventure-text-serializer-gson:4.8.1")
|
||||
}
|
||||
|
||||
tasks {
|
||||
|
||||
6
eco-core/core-nms/v1_18_R1/build.gradle.kts
Normal file
6
eco-core/core-nms/v1_18_R1/build.gradle.kts
Normal file
@@ -0,0 +1,6 @@
|
||||
group = "com.willfp"
|
||||
version = rootProject.version
|
||||
|
||||
dependencies {
|
||||
implementation(files("./impl.jar"))
|
||||
}
|
||||
BIN
eco-core/core-nms/v1_18_R1/impl.jar
Normal file
BIN
eco-core/core-nms/v1_18_R1/impl.jar
Normal file
Binary file not shown.
@@ -7,9 +7,6 @@ dependencies {
|
||||
exclude group: 'net.kyori', module: 'adventure-api'
|
||||
}
|
||||
compileOnly 'net.kyori:adventure-platform-bukkit:4.0.0'
|
||||
compileOnly 'net.kyori:adventure-api:4.9.2'
|
||||
compileOnly 'net.kyori:adventure-text-serializer-gson:4.9.2'
|
||||
compileOnly 'net.kyori:adventure-text-serializer-legacy:4.9.2'
|
||||
compileOnly 'org.apache.maven:maven-artifact:3.8.1'
|
||||
compileOnly 'com.google.code.gson:gson:2.8.8'
|
||||
compileOnly 'org.spigotmc:spigot-api:1.17.1-R0.1-SNAPSHOT'
|
||||
@@ -42,6 +39,7 @@ dependencies {
|
||||
compileOnly 'com.google.guava:guava:31.0.1-jre'
|
||||
compileOnly 'com.iridium:IridiumSkyblock:3.1.2'
|
||||
compileOnly 'com.github.WillFP:CrashClaim:1.0.19'
|
||||
compileOnly 'com.wolfyscript.wolfyutilities:wolfyutilities:1.7.8.1'
|
||||
|
||||
// CombatLogX V10 + NewbieHelper Expansion
|
||||
compileOnly 'com.SirBlobman.combatlogx:CombatLogX-API:10.0.0.0-SNAPSHOT'
|
||||
|
||||
@@ -254,7 +254,7 @@ abstract class EcoSpigotPlugin : EcoPlugin(
|
||||
GUIListener(this),
|
||||
ArrowDataListener(this),
|
||||
ArmorChangeEventListeners(this),
|
||||
DataListener(),
|
||||
DataListener(this),
|
||||
PlayerBlockListener(this)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.willfp.eco.internal.spigot.data
|
||||
|
||||
import com.willfp.eco.core.Eco
|
||||
import com.willfp.eco.core.EcoPlugin
|
||||
import com.willfp.eco.util.PlayerUtils
|
||||
import org.bukkit.event.EventHandler
|
||||
import org.bukkit.event.Listener
|
||||
@@ -8,16 +9,19 @@ import org.bukkit.event.player.PlayerJoinEvent
|
||||
import org.bukkit.event.player.PlayerLoginEvent
|
||||
import org.bukkit.event.player.PlayerQuitEvent
|
||||
|
||||
class DataListener : Listener {
|
||||
class DataListener(
|
||||
private val plugin: EcoPlugin
|
||||
) : Listener {
|
||||
@EventHandler
|
||||
fun onLeave(event: PlayerQuitEvent) {
|
||||
PlayerUtils.updateSavedDisplayName(event.player)
|
||||
Eco.getHandler().playerProfileHandler.unloadPlayer(event.player.uniqueId)
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
fun onJoin(event: PlayerJoinEvent) {
|
||||
plugin.scheduler.runLater({
|
||||
PlayerUtils.updateSavedDisplayName(event.player)
|
||||
}, 5)
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
||||
@@ -23,6 +23,7 @@ import org.jetbrains.exposed.sql.select
|
||||
import org.jetbrains.exposed.sql.transactions.transaction
|
||||
import org.jetbrains.exposed.sql.update
|
||||
import java.util.UUID
|
||||
import java.util.concurrent.Callable
|
||||
import java.util.concurrent.Executors
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
@@ -114,13 +115,21 @@ class MySQLDataHandler(
|
||||
}
|
||||
|
||||
override fun <T> read(uuid: UUID, key: NamespacedKey): T? {
|
||||
val doRead = Callable<T?> {
|
||||
var value: T? = null
|
||||
transaction {
|
||||
val player = getPlayer(uuid)
|
||||
value = player[getColumn(key.toString())] as T?
|
||||
}
|
||||
|
||||
return value
|
||||
return@Callable value
|
||||
}
|
||||
|
||||
return if (Eco.getHandler().ecoPlugin.configYml.getBool("mysql.async-reads")) {
|
||||
executor.submit(doRead).get()
|
||||
} else {
|
||||
doRead.call()
|
||||
}
|
||||
}
|
||||
|
||||
object Players : UUIDTable("eco_players")
|
||||
|
||||
@@ -2,14 +2,15 @@ package com.willfp.eco.internal.spigot.integrations.antigrief
|
||||
|
||||
import com.bgsoftware.superiorskyblock.api.SuperiorSkyblockAPI
|
||||
import com.bgsoftware.superiorskyblock.api.enums.HitActionResult
|
||||
import com.bgsoftware.superiorskyblock.api.island.Island
|
||||
import com.bgsoftware.superiorskyblock.api.island.IslandPrivilege
|
||||
import com.bgsoftware.superiorskyblock.api.key.Key
|
||||
import com.bgsoftware.superiorskyblock.api.wrappers.SuperiorPlayer
|
||||
import com.willfp.eco.core.integrations.antigrief.AntigriefWrapper
|
||||
import org.bukkit.Location
|
||||
import org.bukkit.Material
|
||||
import org.bukkit.block.Block
|
||||
import org.bukkit.entity.Animals
|
||||
import org.bukkit.entity.LivingEntity
|
||||
import org.bukkit.entity.Monster
|
||||
import org.bukkit.entity.Player
|
||||
import org.bukkit.entity.*
|
||||
|
||||
class AntigriefSuperiorSkyblock2 : AntigriefWrapper {
|
||||
override fun getPluginName(): String {
|
||||
@@ -17,11 +18,42 @@ class AntigriefSuperiorSkyblock2 : AntigriefWrapper {
|
||||
}
|
||||
|
||||
override fun canBreakBlock(player: Player, block: Block): Boolean {
|
||||
if (SuperiorSkyblockAPI.getPlayer(player).hasBypassModeEnabled()) {
|
||||
val island: Island? =
|
||||
SuperiorSkyblockAPI.getIslandAt(block.location)
|
||||
|
||||
val superiorPlayer: SuperiorPlayer =
|
||||
SuperiorSkyblockAPI.getPlayer(player)
|
||||
|
||||
if (island == null) {
|
||||
if (!superiorPlayer.hasBypassModeEnabled() && SuperiorSkyblockAPI.getSuperiorSkyblock().grid
|
||||
.isIslandsWorld(player.world)
|
||||
) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
return SuperiorSkyblockAPI.getPlayer(player).hasPermission(IslandPrivilege.getByName("Break"))
|
||||
|| SuperiorSkyblockAPI.getPlayer(player).hasPermission(IslandPrivilege.getByName("BREAK"))
|
||||
|
||||
val blockType = block.type
|
||||
|
||||
val islandPermission: IslandPrivilege =
|
||||
if (blockType == Material.SPAWNER) IslandPrivilege.getByName("SPAWNER_BREAK") else IslandPrivilege.getByName("BREAK")
|
||||
|
||||
if (!island.hasPermission(superiorPlayer, islandPermission)) {
|
||||
return false
|
||||
}
|
||||
|
||||
if (SuperiorSkyblockAPI.getSuperiorSkyblock().settings.valuableBlocks
|
||||
.contains(Key.of(block)) &&
|
||||
!island.hasPermission(superiorPlayer, IslandPrivilege.getByName("VALUABLE_BREAK"))
|
||||
) {
|
||||
return false
|
||||
}
|
||||
|
||||
if (!island.isInsideRange(block.location)) {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
override fun canCreateExplosion(player: Player, location: Location): Boolean {
|
||||
@@ -32,11 +64,29 @@ class AntigriefSuperiorSkyblock2 : AntigriefWrapper {
|
||||
}
|
||||
|
||||
override fun canPlaceBlock(player: Player, block: Block): Boolean {
|
||||
if (SuperiorSkyblockAPI.getPlayer(player).hasBypassModeEnabled()) {
|
||||
val island: Island? =
|
||||
SuperiorSkyblockAPI.getIslandAt(block.location)
|
||||
|
||||
val superiorPlayer: SuperiorPlayer =
|
||||
SuperiorSkyblockAPI.getPlayer(player)
|
||||
|
||||
if (island == null) {
|
||||
if (!superiorPlayer.hasBypassModeEnabled() && SuperiorSkyblockAPI.getSuperiorSkyblock().grid.isIslandsWorld(superiorPlayer.world)
|
||||
) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
return SuperiorSkyblockAPI.getPlayer(player).hasPermission(IslandPrivilege.getByName("Place"))
|
||||
|| SuperiorSkyblockAPI.getPlayer(player).hasPermission(IslandPrivilege.getByName("PLACE"))
|
||||
|
||||
if (!island.hasPermission(superiorPlayer, IslandPrivilege.getByName("BUILD"))) {
|
||||
return false
|
||||
}
|
||||
|
||||
if (!island.isInsideRange(block.location)) {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
override fun canInjure(player: Player, victim: LivingEntity): Boolean {
|
||||
@@ -45,13 +95,14 @@ class AntigriefSuperiorSkyblock2 : AntigriefWrapper {
|
||||
}
|
||||
return when (victim) {
|
||||
is Player -> SuperiorSkyblockAPI.getPlayer(player).canHit(SuperiorSkyblockAPI.getPlayer(victim)).equals(HitActionResult.SUCCESS)
|
||||
is Animals -> {
|
||||
return SuperiorSkyblockAPI.getPlayer(player).hasPermission(IslandPrivilege.getByName("ANIMAL_DAMAGE"))
|
||||
else -> {
|
||||
val island: Island? = SuperiorSkyblockAPI.getSuperiorSkyblock().grid.getIslandAt(victim.location)
|
||||
val islandPermission = if (victim is Monster) IslandPrivilege.getByName("MONSTER_DAMAGE") else IslandPrivilege.getByName("ANIMAL_DAMAGE")
|
||||
if (island != null ) {
|
||||
return island.hasPermission(player, islandPermission)
|
||||
}
|
||||
return true
|
||||
}
|
||||
is Monster -> {
|
||||
return SuperiorSkyblockAPI.getPlayer(player).hasPermission(IslandPrivilege.getByName("MONSTER_DAMAGE"))
|
||||
}
|
||||
else -> true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,8 @@ mysql:
|
||||
# very high numbers can cause issues with OS configuration. If writes are taking
|
||||
# too long, increase this value.
|
||||
threads: 2
|
||||
# If read operations should be ran in the thread pool. Runs on main thread by default.
|
||||
async-reads: false
|
||||
host: localhost
|
||||
port: 3306
|
||||
database: database
|
||||
|
||||
@@ -41,12 +41,11 @@ softdepend:
|
||||
libraries:
|
||||
- 'org.reflections:reflections:0.9.12'
|
||||
- 'org.apache.maven:maven-artifact:3.0.3'
|
||||
- 'org.jetbrains.kotlin:kotlin-stdlib:1.5.31'
|
||||
- 'org.jetbrains.kotlin:kotlin-stdlib:1.6.0'
|
||||
- 'net.kyori:adventure-platform-bukkit:4.0.0'
|
||||
- 'net.kyori:adventure-api:4.9.2'
|
||||
- 'net.kyori:adventure-text-serializer-gson:4.9.2'
|
||||
- 'net.kyori:adventure-text-serializer-legacy:4.9.2'
|
||||
- 'org.jetbrains.kotlin:kotlin-stdlib:1.5.21'
|
||||
- 'net.kyori:adventure-api:4.9.3'
|
||||
- 'net.kyori:adventure-text-serializer-gson:4.9.3'
|
||||
- 'net.kyori:adventure-text-serializer-legacy:4.9.3'
|
||||
- 'org.jetbrains.exposed:exposed-core:0.36.2'
|
||||
- 'org.jetbrains.exposed:exposed-dao:0.36.2'
|
||||
- 'org.jetbrains.exposed:exposed-jdbc:0.36.2'
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
version = 6.13.13
|
||||
version = 6.14.0
|
||||
plugin-name = eco
|
||||
@@ -1,6 +1,6 @@
|
||||
jdk: openjdk16
|
||||
jdk: openjdk17
|
||||
before_install:
|
||||
- source "$HOME/.sdkman/bin/sdkman-init.sh"
|
||||
- sdk update
|
||||
- sdk install java 16.0.1-open
|
||||
- sdk use java 16.0.1-open
|
||||
- sdk install java 17.0.1-tem
|
||||
- sdk use java 17.0.1-tem
|
||||
@@ -13,6 +13,7 @@ include(":eco-core")
|
||||
include(":eco-core:core-nms")
|
||||
include(":eco-core:core-nms:v1_16_R3")
|
||||
include(":eco-core:core-nms:v1_17_R1")
|
||||
include(":eco-core:core-nms:v1_18_R1")
|
||||
include(":eco-core:core-proxy")
|
||||
include(":eco-core:core-plugin")
|
||||
include(":eco-core:core-backend")
|
||||
Reference in New Issue
Block a user