From b2a22d07dbb7430018ff90b4b30449cd69453b4b Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Sat, 13 Jul 2024 13:43:42 -0700 Subject: [PATCH] Auto compiler + remove unused imports --- .github/workflows/build.yml | 43 +++++++++++++++++++ .../io/github/lncvrt/lncvrtbox/LncvrtBox.java | 2 - 2 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..384fa3a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,43 @@ +name: Java CI with Maven + +on: + push: + branches: [ '*' ] + pull_request: + branches: [ '*' ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up JDK 21 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '21' + + - name: Cache Maven packages + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: Build with Maven + run: mvn clean package + + - name: Run tests with Maven + run: mvn test + + - name: Upload build artifact + uses: actions/upload-artifact@v3 + with: + name: Java Build Artifacts + path: | + target/*.jar + !target/original-*.jar \ No newline at end of file diff --git a/src/main/java/io/github/lncvrt/lncvrtbox/LncvrtBox.java b/src/main/java/io/github/lncvrt/lncvrtbox/LncvrtBox.java index ac239d0..51075fa 100644 --- a/src/main/java/io/github/lncvrt/lncvrtbox/LncvrtBox.java +++ b/src/main/java/io/github/lncvrt/lncvrtbox/LncvrtBox.java @@ -28,10 +28,8 @@ import org.json.simple.parser.ParseException; import org.bukkit.inventory.ItemStack; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.bukkit.BukkitAdapter; -import com.sk89q.worldedit.bukkit.BukkitPlayer; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.regions.CuboidRegion; -import com.sk89q.worldedit.world.block.BlockTypes; import org.bukkit.Bukkit;