Compare commits
No commits in common. "Testing" and "1.2.1b2" have entirely different histories.
@ -1,61 +0,0 @@
|
|||||||
name: Build and Release Minecraft Plugin
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- testing
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-and-release:
|
|
||||||
runs-on: self-hosted
|
|
||||||
|
|
||||||
steps:
|
|
||||||
# Repository auschecken
|
|
||||||
- name: Checkout Repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
# Java 17 installieren
|
|
||||||
- name: Set up Java 17
|
|
||||||
uses: actions/setup-java@v3
|
|
||||||
with:
|
|
||||||
java-version: '17'
|
|
||||||
distribution: 'temurin'
|
|
||||||
|
|
||||||
# Maven installieren
|
|
||||||
- name: Install Maven
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y maven
|
|
||||||
|
|
||||||
# Plugin-Version aus plugin.yml auslesen
|
|
||||||
- name: Extract Plugin Version
|
|
||||||
id: extract_version
|
|
||||||
run: |
|
|
||||||
VERSION=$(grep '^version:' src/main/resources/plugin.yml | awk '{print $2}')
|
|
||||||
echo "PLUGIN_VERSION=$VERSION" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
# Projekt mit Maven bauen
|
|
||||||
- name: Build with Maven
|
|
||||||
run: mvn clean package
|
|
||||||
|
|
||||||
# JAR-Datei umbenennen
|
|
||||||
- name: Rename JAR File
|
|
||||||
run: |
|
|
||||||
mv target/*.jar target/BetterMinecraft-${{ env.PLUGIN_VERSION }}-b.jar
|
|
||||||
|
|
||||||
# Artefakt hochladen
|
|
||||||
- name: Upload Artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: BetterMinecraft-${{ env.PLUGIN_VERSION }}-b.jar
|
|
||||||
path: target/BetterMinecraft-${{ env.PLUGIN_VERSION }}-b.jar
|
|
||||||
|
|
||||||
# Release erstellen
|
|
||||||
- name: Create Release
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
|
||||||
files: target/BetterMinecraft-${{ env.PLUGIN_VERSION }}-b.jar
|
|
||||||
tag_name: ${{ env.PLUGIN_VERSION }}
|
|
||||||
release_name: Release ${{ env.PLUGIN_VERSION }}
|
|
||||||
draft: false
|
|
||||||
prerelease: true
|
|
65
.gitea/workflows/release.yml.disabled
Normal file
65
.gitea/workflows/release.yml.disabled
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
name: Build and Release Minecraft Plugin
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Java 17
|
||||||
|
uses: actions/setup-java@v2
|
||||||
|
with:
|
||||||
|
java-version: '17'
|
||||||
|
distribution: 'adopt' # Verwenden Sie 'adopt' für Java 17
|
||||||
|
|
||||||
|
- name: Update Apt
|
||||||
|
run: apt update -y
|
||||||
|
|
||||||
|
- name: Update CA certificates
|
||||||
|
run: apt-get install --reinstall ca-certificates -y
|
||||||
|
|
||||||
|
- name: Install Maven
|
||||||
|
run: apt install maven -y
|
||||||
|
|
||||||
|
- name: Build with Maven
|
||||||
|
run: mvn clean install
|
||||||
|
|
||||||
|
- name: Upload Artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: BetterMinecraft-stable.jar
|
||||||
|
path: target/BetterMinecraft-stable.jar
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Get letzte Release-Version
|
||||||
|
id: get_version
|
||||||
|
run: echo "::set-output name=version::$(git describe --tags --abbrev=0 || echo '0.0.0')"
|
||||||
|
|
||||||
|
- name: Incrementiere Version
|
||||||
|
id: increment_version
|
||||||
|
run: |
|
||||||
|
IFS='.' read -ra VERSION <<< "${{ steps.get_version.outputs.version }}"
|
||||||
|
MAJOR="${VERSION[0]}"
|
||||||
|
MINOR="${VERSION[1]}"
|
||||||
|
PATCH="${VERSION[2]}"
|
||||||
|
echo "::set-output name=major::$(($MAJOR + 1))"
|
||||||
|
echo "::set-output name=minor::$(($MINOR + 1))"
|
||||||
|
echo "::set-output name=patch::$(($PATCH + 1))"
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
id: create_release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
target/BetterMinecraft-stable.jar
|
||||||
|
tag_name: ${{ steps.increment_version.outputs.major }}.${{ steps.increment_version.outputs.minor }}.${{ steps.increment_version.outputs.patch }}
|
||||||
|
release_name: Release ${{ steps.increment_version.outputs.major }}.${{ steps.increment_version.outputs.minor }}.${{ steps.increment_version.outputs.patch }}
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
65
.gitea/workflows/release.yml.off
Normal file
65
.gitea/workflows/release.yml.off
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
name: Build and Release Minecraft Plugin
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- Release
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Java 17
|
||||||
|
uses: actions/setup-java@v2
|
||||||
|
with:
|
||||||
|
java-version: '17'
|
||||||
|
distribution: 'adopt' # Verwenden Sie 'adopt' für Java 17
|
||||||
|
|
||||||
|
- name: Update Apt
|
||||||
|
run: apt update -y
|
||||||
|
|
||||||
|
- name: Update CA certificates
|
||||||
|
run: apt-get install --reinstall ca-certificates -y
|
||||||
|
|
||||||
|
- name: Install Maven
|
||||||
|
run: apt install maven -y
|
||||||
|
|
||||||
|
- name: Build with Maven
|
||||||
|
run: mvn clean install
|
||||||
|
|
||||||
|
- name: Upload Artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: BetterMinecraft-stable.jar
|
||||||
|
path: target/BetterMinecraft-stable.jar
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Get letzte Release-Version
|
||||||
|
id: get_version
|
||||||
|
run: echo "::set-output name=version::$(git describe --tags --abbrev=0 || echo '0.0.0')"
|
||||||
|
|
||||||
|
- name: Incrementiere Version
|
||||||
|
id: increment_version
|
||||||
|
run: |
|
||||||
|
IFS='.' read -ra VERSION <<< "${{ steps.get_version.outputs.version }}"
|
||||||
|
MAJOR="${VERSION[0]}"
|
||||||
|
MINOR="${VERSION[1]}"
|
||||||
|
PATCH="${VERSION[2]}"
|
||||||
|
echo "::set-output name=major::$(($MAJOR + 1))"
|
||||||
|
echo "::set-output name=minor::$(($MINOR + 1))"
|
||||||
|
echo "::set-output name=patch::$(($PATCH + 1))"
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
id: create_release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
target/BetterMinecraft-stable.jar
|
||||||
|
tag_name: ${{ steps.increment_version.outputs.major }}.${{ steps.increment_version.outputs.minor }}.${{ steps.increment_version.outputs.patch }}
|
||||||
|
release_name: Release ${{ steps.increment_version.outputs.major }}.${{ steps.increment_version.outputs.minor }}.${{ steps.increment_version.outputs.patch }}
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
@ -1,60 +0,0 @@
|
|||||||
name: Build and Release Minecraft Plugin
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- Testing
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-and-release:
|
|
||||||
|
|
||||||
steps:
|
|
||||||
# Repository auschecken
|
|
||||||
- name: Checkout Repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
# Java 17 installieren
|
|
||||||
- name: Set up Java 17
|
|
||||||
uses: actions/setup-java@v3
|
|
||||||
with:
|
|
||||||
java-version: '17'
|
|
||||||
distribution: 'temurin'
|
|
||||||
|
|
||||||
# Maven installieren
|
|
||||||
- name: Install Maven
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y maven
|
|
||||||
|
|
||||||
# Plugin-Version aus plugin.yml auslesen
|
|
||||||
- name: Extract Plugin Version
|
|
||||||
id: extract_version
|
|
||||||
run: |
|
|
||||||
VERSION=$(grep '^version:' src/main/resources/plugin.yml | awk '{print $2}')
|
|
||||||
echo "PLUGIN_VERSION=$VERSION" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
# Projekt mit Maven bauen
|
|
||||||
- name: Build with Maven
|
|
||||||
run: mvn clean package
|
|
||||||
|
|
||||||
# JAR-Datei umbenennen
|
|
||||||
- name: Rename JAR File
|
|
||||||
run: |
|
|
||||||
mv target/*.jar target/BetterMinecraft-${{ env.PLUGIN_VERSION }}-b.jar
|
|
||||||
|
|
||||||
# Artefakt hochladen
|
|
||||||
- name: Upload Artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: BetterMinecraft-${{ env.PLUGIN_VERSION }}-b.jar
|
|
||||||
path: target/BetterMinecraft-${{ env.PLUGIN_VERSION }}-b.jar
|
|
||||||
|
|
||||||
# Release erstellen
|
|
||||||
- name: Create Release
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
|
||||||
files: target/BetterMinecraft-${{ env.PLUGIN_VERSION }}-b.jar
|
|
||||||
tag_name: ${{ env.PLUGIN_VERSION }}
|
|
||||||
release_name: Release ${{ env.PLUGIN_VERSION }}
|
|
||||||
draft: false
|
|
||||||
prerelease: true
|
|
@ -1 +0,0 @@
|
|||||||
testtesttesttrest
|
|
@ -1,2 +0,0 @@
|
|||||||
+ added system type changelog
|
|
||||||
+ added custom type changelog
|
|
@ -36,12 +36,9 @@ public class replanting {
|
|||||||
target.getLocation().getWorld().dropItem(loc, new ItemStack(item[0]));
|
target.getLocation().getWorld().dropItem(loc, new ItemStack(item[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (amount.length > 1) {
|
for(int i = 0; i < amount[1]; i++) {
|
||||||
for (int i = 0; i < amount[1]; i++) {
|
target.getLocation().getWorld().dropItem(loc, new ItemStack(item[1]));
|
||||||
target.getLocation().getWorld().dropItem(loc, new ItemStack(item[1]));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
crop.setAge(0);
|
crop.setAge(0);
|
||||||
target.setBlockData(crop);
|
target.setBlockData(crop);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package de.steev.bm.Listener;
|
package de.steev.bm.Listener;
|
||||||
|
|
||||||
|
import de.steev.bm.BetterMinecraft;
|
||||||
import de.steev.bm.Manager.GameManager;
|
import de.steev.bm.Manager.GameManager;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
@ -48,4 +49,5 @@ public class BedListener implements Listener {
|
|||||||
this.gameManager.getPlugin().playerInBed = 0;
|
this.gameManager.getPlugin().playerInBed = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user