Skip to content

Commit

Permalink
Release 2.6.2 (#367)
Browse files Browse the repository at this point in the history
  • Loading branch information
rainbowdashlabs authored May 8, 2024
2 parents ef2b940 + d2c7e89 commit fbeeeab
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 36 deletions.
1 change: 1 addition & 0 deletions .github/workflows/publish_to_nexus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- feature/*
- release/*
- fix/*
- deps/*

jobs:
build:
Expand Down
8 changes: 6 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

group = "de.eldoria"
version = "2.6.1"
version = "2.6.2"

var publishModules = setOf("schematicbrushreborn-api",
"schematicbrushreborn-core",
Expand Down Expand Up @@ -67,7 +67,7 @@ allprojects {
}
compileOnly(libs.fawe.bukkit)

testImplementation(platform("org.junit:junit-bom:5.10.1"))
testImplementation(platform("org.junit:junit-bom:5.10.2"))
testImplementation("org.junit.jupiter", "junit-jupiter")
testImplementation(testlibs.mockbukkit)
testImplementation(libs.worldedit) {
Expand All @@ -79,6 +79,10 @@ allprojects {
testImplementation(libs.fawe.bukkit)
}

publishData {
useInternalEldoNexusRepos()
}

tasks {
compileJava {
options.encoding = "UTF-8"
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
20 changes: 10 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
6 changes: 3 additions & 3 deletions schematicbrushreborn-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ dependencies {
compileOnly(libs.jackson.yaml)
compileOnly(libs.adventure.bukkit)
compileOnly(libs.adventure.minimessage)
compileOnly("org.apache.logging.log4j", "log4j-slf4j2-impl", "2.22.1")
compileOnly("org.apache.logging.log4j", "log4j-core", "2.22.1")
compileOnly("org.apache.logging.log4j", "log4j-slf4j2-impl", "2.23.1")
compileOnly("org.apache.logging.log4j", "log4j-core", "2.23.1")

testImplementation(project(":schematicbrushreborn-api"))
testImplementation(libs.jetbrains.annotations)
testImplementation("org.mockito", "mockito-core", "5.8.0")
testImplementation("org.mockito", "mockito-core", "5.11.0")
testImplementation(libs.jackson.databind)
}
publishData {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import de.eldoria.eldoutilities.utils.TextUtil;
import de.eldoria.schematicbrush.SchematicBrushRebornImpl;
import de.eldoria.schematicbrush.config.Configuration;
import de.eldoria.schematicbrush.config.sections.SchematicSource;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

Expand Down Expand Up @@ -76,15 +77,17 @@ public void reload() {

path = path.replace("\\", "/");

logger.info("Loading Schematics from " + path);

var load = source.isRelative() ? Paths.get(root, path) : Paths.get(path);
loadSchematics(load);
loadSchematics(load, source);
}
}

private void loadSchematics(Path schematicFolder) {
private void loadSchematics(Path schematicFolder, SchematicSource source) {
// fail silently if this folder does not exist.
if (!schematicFolder.toFile().exists()) {
logger.config(schematicFolder.toString() + " does not exist. Skipping.");
logger.config(schematicFolder + " does not exist. Skipping.");
return;
}

Expand Down Expand Up @@ -115,7 +118,7 @@ private void loadSchematics(Path schematicFolder) {

// Build schematic references
for (var file : directoryData.get().files()) {
addSchematic(file.toPath());
addSchematic(file.toPath(), source);
}
logger.log(Level.CONFIG, "Loaded " + directoryData.get().files().size() + "schematics from " + path.toString());
}
Expand All @@ -132,17 +135,30 @@ public void removeSchematic(File file) {
}
}

public void addSchematic(Path file) {
var directory = file.getParent();
public void addSchematic(Path path, SchematicSource source) {
try {
importSchematic(path, source);
} catch (Exception e) {
logger.log(Level.WARNING, "Could not load schematic " + path.toString() + ".", e);
}
}

var sourceForPath = configuration.schematicConfig().getSourceForPath(directory);
public void addSchematic(Path path) {
try {
var sourceForPath = configuration.schematicConfig().getSourceForPath(path.getParent());

if (sourceForPath.isEmpty()) {
logger.log(Level.CONFIG, "File " + directory + " is not part of a source");
return;
if (sourceForPath.isEmpty()) {
logger.log(Level.CONFIG, "File " + path.getParent() + " is not part of a source");
return;
}
importSchematic(path, sourceForPath.get());
} catch (Exception e) {
logger.log(Level.WARNING, "Could not load schematic " + path.toString() + ".", e);
}
}

var source = sourceForPath.get();
private void importSchematic(Path path, SchematicSource source) {
var directory = path.getParent();

if (source.isExcluded(directory)) {
logger.log(Level.CONFIG, "Directory " + directory + "is excluded.");
Expand Down Expand Up @@ -175,9 +191,9 @@ public void addSchematic(Path file) {

Schematic schematic;
try {
schematic = Schematic.of(file);
schematic = Schematic.of(path);
} catch (InvalidClipboardFormatException e) {
logger.log(Level.WARNING, "Format of " + file + " is invalid.");
logger.log(Level.WARNING, "Format of " + path + " is invalid.");
return;
}

Expand Down
2 changes: 1 addition & 1 deletion schematicbrushreborn-paper/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ bukkit {
register("schematicbrush") {
description = "Create and use schematic brushes"
aliases = listOf("sbr", "schbr", "schembrush")
permission = "schematicbrush.use"
permission = "schematicbrush.brush.use"
}

register("schematicbrushsettings") {
Expand Down
12 changes: 6 additions & 6 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ dependencyResolutionManagement {

// adventure
library("adventure-bukkit", "net.kyori:adventure-platform-bukkit:4.3.2")
library("adventure-minimessage", "net.kyori:adventure-text-minimessage:4.15.0")
library("adventure-minimessage", "net.kyori:adventure-text-minimessage:4.17.0")
// utilities
library("eldoutil-legacy", "de.eldoria:eldo-util:1.14.4")
library("eldoutil-jackson", "de.eldoria.util:jackson-configuration:2.0.3")
library("eldoutil-jackson", "de.eldoria.util:jackson-configuration:2.0.6")
library("messageblocker", "de.eldoria:messageblocker:1.1.2")
// misc
library("jetbrains-annotations", "org.jetbrains:annotations:24.1.0")
Expand All @@ -45,14 +45,14 @@ dependencyResolutionManagement {
library("paper-v17", "io.papermc.paper:paper-api:1.17.1-R0.1-SNAPSHOT")
library("spigot-v16", "io.papermc.paper:paper-api:1.17.1-R0.1-SNAPSHOT")
// world edit
library("worldedit", "com.sk89q.worldedit:worldedit-bukkit:7.2.18")
version("fawe", "2.8.4")
library("worldedit", "com.sk89q.worldedit:worldedit-bukkit:7.3.0")
version("fawe", "2.9.2")
library("fawe-core", "com.fastasyncworldedit","FastAsyncWorldEdit-Core").versionRef("fawe")
library("fawe-bukkit", "com.fastasyncworldedit","FastAsyncWorldEdit-Bukkit").versionRef("fawe")

// plugins
plugin("publishdata", "de.chojo.publishdata").version("1.3.0")
plugin("spotless", "com.diffplug.spotless").version("6.24.0")
plugin("publishdata", "de.chojo.publishdata").version("1.4.0")
plugin("spotless", "com.diffplug.spotless").version("6.25.0")
plugin("shadow", "com.github.johnrengelman.shadow").version("8.1.1")
plugin("pluginyml-bukkit", "net.minecrell.plugin-yml.bukkit").version("0.6.0")
//plugin("pluginyml-paper","net.minecrell.plugin-yml.paper").version( "0.5.3")
Expand Down

0 comments on commit fbeeeab

Please sign in to comment.