48 Commits

Author SHA1 Message Date
Steev 2879109f59 .gitea/workflows/test.yml aktualisiert 2024-12-27 04:26:14 +01:00
Steev 50477bbace .gitea/workflows/release.yml aktualisiert 2024-12-27 04:25:10 +01:00
Steev 12813cdc13 .gitea/workflows/test-release.yml aktualisiert 2024-12-27 04:24:00 +01:00
Steev 149c81dce0 .gitea/workflows/release.yml aktualisiert 2024-12-27 04:23:28 +01:00
Steev ca3a3de361 .gitea/workflows/test-release.yml aktualisiert
Build and Release Minecraft Plugin / build-and-release (pull_request) Failing after 58s
2024-12-27 04:20:28 +01:00
Steev 881a303196 .gitea/workflows/test-release.yml aktualisiert
Build and Release Minecraft Plugin / build-and-release (pull_request) Successful in 2m30s
2024-12-27 04:14:05 +01:00
Steev 68191b79c5 .gitea/workflows/test-release.yml aktualisiert
Build and Release Minecraft Plugin / build-and-release (pull_request) Failing after 57s
2024-12-27 04:11:47 +01:00
Steev 9e6d61f20d .gitea/workflows/test-release.yml aktualisiert
Build and Release Minecraft Plugin / build-and-release (pull_request) Failing after 54s
2024-12-27 04:08:47 +01:00
Steev 7807364a98 .gitea/workflows/test-release.yml aktualisiert
Build and Release Minecraft Plugin / build-and-release (pull_request) Failing after 2m16s
2024-12-27 04:05:33 +01:00
Steev ee4567c5d0 .gitea/workflows/test-release.yml aktualisiert 2024-12-27 04:04:55 +01:00
Steev 51ad4f64a5 .gitea/workflows/test-release.yml aktualisiert
Build and Release Minecraft Plugin / build-and-release (pull_request) Failing after 53s
2024-12-27 04:03:05 +01:00
Steev ffcdcabf8a .gitea/workflows/test-release.yml aktualisiert
Build and Release Minecraft Plugin / build-and-release (pull_request) Has been cancelled
2024-12-27 04:02:16 +01:00
Steev a16500904c .gitea/workflows/test-release.yml aktualisiert 2024-12-27 04:01:25 +01:00
Steev dfccc5567a .gitea/workflows/test.md aktualisiert 2024-12-27 03:56:58 +01:00
Steev 5b622cc85c .gitea/workflows/test-release.yml aktualisiert 2024-12-27 03:53:29 +01:00
Steev 839b9f6acb .gitea/workflows/test-release.yml aktualisiert 2024-12-27 03:50:01 +01:00
Steev e54b14c833 .gitea/workflows/test-release.yml aktualisiert 2024-12-27 03:46:07 +01:00
Steev 360b4562a5 .gitea/workflows/test-release.yml aktualisiert 2024-12-27 03:43:50 +01:00
Steev b576aa55b7 .gitea/workflows/test.md aktualisiert 2024-12-27 03:40:15 +01:00
Steev fd8b3ab94d .gitea/workflows/test-release.yml aktualisiert 2024-12-27 03:38:19 +01:00
Steev 113f0ce247 .gitea/workflows/test-release.yml aktualisiert 2024-12-27 03:37:35 +01:00
Steev 00c3c3d653 .gitea/workflows/test-release.yml aktualisiert 2024-12-27 03:28:54 +01:00
Steev 79a41180bc .gitea/workflows/test-release.yml aktualisiert 2024-12-27 03:27:42 +01:00
Steev aa023d46bb .gitea/workflows/test.md aktualisiert 2024-12-27 03:24:36 +01:00
Steev 2521e32411 .gitea/workflows/test.md hinzugefügt 2024-12-27 03:17:23 +01:00
Steev d786e9de94 .gitea/workflows/test-release.yml aktualisiert 2024-12-27 03:15:23 +01:00
Steev b5566c4d4e .gitea/workflows/test-release.yml aktualisiert 2024-12-27 03:14:31 +01:00
Steev 807150d83e .gitea/workflows/test-release.yml aktualisiert 2024-12-27 03:13:29 +01:00
Steev 3315017b82 .gitea/workflows/test-release.yml aktualisiert 2024-12-27 03:11:51 +01:00
Steev b0accb96cc .gitea/workflows/test-release.yml aktualisiert 2024-12-27 03:10:51 +01:00
Steev 1e4bbe5d55 .gitea/workflows/test-release.yml aktualisiert 2024-12-27 03:09:50 +01:00
Steev b05e054bd7 Merge branch 'Testing' into main 2024-12-27 03:07:13 +01:00
Steev 2ef476372f .gitea/workflows/test-release.yml aktualisiert 2024-12-27 03:07:00 +01:00
Steev 385886c7f5 .gitea/workflows/release.yml.off gelöscht 2024-12-27 03:06:21 +01:00
Steev ef5c81d7cc Merge pull request 'testing workflow' (#43) from main into Testing
Reviewed-on: Steev/betterminecraft#43
2024-12-27 03:05:54 +01:00
Steev 5628dfb459 Merge pull request 'Testing workflow' (#42) from Testing into main
Reviewed-on: Steev/betterminecraft#42
2024-12-27 03:05:04 +01:00
Steev dbbb60280b .gitea/workflows/test-release.yml hinzugefügt 2024-12-27 03:03:59 +01:00
Steev 750042d7a9 .gitea/workflows/release.yml aktualisiert 2024-12-27 03:02:42 +01:00
Steev 1bac43b3fe changelog.txt hinzugefügt 2024-12-27 02:42:16 +01:00
Steev 02856bc49a Merge pull request 'fixed bug that prevented plants from resetting age' (#32) from config_support into Testing
Reviewed-on: Steev/betterminecraft#32
2023-10-07 03:28:45 +02:00
Steev d9cfdb218e fixed bug that prevented plants from resetting age 2023-10-07 03:26:54 +02:00
Steev 300a1bf67c Merge pull request 'config_support' (#31) from config_support into Testing
Reviewed-on: Steev/betterminecraft#31
2023-10-07 03:12:49 +02:00
Steev 6ac6455f2d added config support 2023-10-07 03:09:28 +02:00
Steev 0fe5ce24a8 README.md aktualisiert 2023-10-04 19:09:02 +02:00
Steev 137a39e430 README.md aktualisiert 2023-10-04 19:08:46 +02:00
Steev 8c83b7ddb6 README.md aktualisiert 2023-10-04 19:07:10 +02:00
Steev 63ffe0fe2b HOTFIX: changed plugin.yml main class 2023-10-04 18:37:07 +02:00
Steev 6743f297b2 HOTFIX: changed false material from WOOL -> WHITE_WOOL 2023-10-04 18:33:21 +02:00
18 changed files with 204 additions and 151 deletions
+60
View File
@@ -0,0 +1,60 @@
name: Build and Release Minecraft Plugin
on:
push:
branches:
- Resting
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: false
-65
View File
@@ -1,65 +0,0 @@
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
View File
@@ -1,65 +0,0 @@
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
View File
@@ -0,0 +1 @@
testtesttesttrest
+60
View File
@@ -0,0 +1,60 @@
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
+24
View File
@@ -1,3 +1,27 @@
# betterminecraft
sandboxplugin to fix mojang fuckups
you can use my code when you link this repo and name the author
# Contribution
## contribute by code
In order to contribute you need to do the following things
1. Create an issue with the changes you want to add
2. Wait for your feature to be approved
3. Fork the Project and make a branch with the features name
4. make a pull request from your project to the testing branch (pr's to any other branch will be removed)
Now your contribution is in testing where people can start using it as beta on their own servers and report back issues
Once the testing phase is over and now reports come in the feature will be pulled to release from which it then gets its own downloadable release created
## contribute with requests
if you want a certain feature in my plugin write an issue with the enhancement label
you issue should follow this structure
### Feature request
**Name:** how should the feature be named
**Version:** when would you like the feature to be implemented (this might differ from actual implementation)
**Description:** get creative and technical what do you want this feature to do. Your description even might contain pseudo code if you want to provide such
Your feature now can be reviewed by the community and be disscussed uppon and maybe changed to fit the plugin
once it is approved it will be given a releaes milestone and its own feature branch from where it then will continue on the development proccess
+2
View File
@@ -0,0 +1,2 @@
+ added system type changelog
+ added custom type changelog
+1
View File
@@ -37,6 +37,7 @@
<directory>${project.basedir}/src/main/resources</directory>
<includes>
<include>plugin.yml</include>
<include>config.yml</include>
</includes>
</resource>
</resources>
@@ -41,6 +41,7 @@ public class BetterMinecraft extends JavaPlugin implements Listener {
this.getLogger().info(prefix + ChatColor.WHITE + "Plugin Startet");
this.getLogger().info(prefix + ChatColor.WHITE + "Initializing Gamemanager");
gameManager = new GameManager(this);
this.saveDefaultConfig();
// Registers Events
this.getLogger().info(prefix + ChatColor.WHITE + "Lade Events");
@@ -17,8 +17,14 @@ public class back implements CommandExecutor {
@Override
public boolean onCommand(CommandSender commandSender, Command command, String s, String[] strings) {
if (!this.gameManager.getConfigManager().GetBool("back_command")) {
commandSender.sendMessage("back command ist nicht aktiv");
return false;
}
Player player = (Player) commandSender.getServer().getPlayer(commandSender.getName());
Location lastDeath;
try {
lastDeath = this.gameManager.getPlugin().getPlayerDataConfig().getLocation(player.getUniqueId() + ".death");
player.teleport(lastDeath);
@@ -27,6 +33,7 @@ public class back implements CommandExecutor {
} catch (Exception ex) {
commandSender.sendMessage("Tot nicht gefunden!");
}
return false;
}
}
@@ -36,9 +36,12 @@ public class replanting {
target.getLocation().getWorld().dropItem(loc, new ItemStack(item[0]));
}
for(int i = 0; i < amount[1]; i++) {
if (amount.length > 1) {
for (int i = 0; i < amount[1]; i++) {
target.getLocation().getWorld().dropItem(loc, new ItemStack(item[1]));
}
}
crop.setAge(0);
target.setBlockData(crop);
}
@@ -1,6 +1,5 @@
package de.steev.bm.Listener;
import de.steev.bm.BetterMinecraft;
import de.steev.bm.Manager.GameManager;
import org.bukkit.Bukkit;
import org.bukkit.World;
@@ -21,7 +20,7 @@ public class BedListener implements Listener {
@EventHandler // Adding to the Player Variable
public void onPlayerBedEnter(PlayerBedEnterEvent event) {
final World world = event.getPlayer().getWorld();
if(world.getTime() >= 13000 || world.getThunderDuration() > 0) {
if(world.getTime() >= 13000 || world.getThunderDuration() > 0 && this.gameManager.getConfigManager().GetBool("improved_bed")) {
this.gameManager.getPlugin().playerInBed++;
// Checks if enough Players (currentSleeping >= OnlinePlayerAmount/2) are Sleeping
if(this.gameManager.getPlugin().playerInBed >= (int)this.gameManager.getPlugin().getServer().getOnlinePlayers().size()/2) {
@@ -49,5 +48,4 @@ public class BedListener implements Listener {
this.gameManager.getPlugin().playerInBed = 0;
}
}
}
@@ -21,7 +21,7 @@ public class InteractListener implements Listener {
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event){
if(event.getAction().equals(Action.RIGHT_CLICK_BLOCK)){
if(event.getAction().equals(Action.RIGHT_CLICK_BLOCK) && this.gameManager.getConfigManager().GetBool("replanting")){
/** the clicked block */
Block target = event.getClickedBlock();
@@ -29,12 +29,12 @@ public class KillListener implements Listener {
int[] amounts;
Material[] drops;
if(event.getEntity() instanceof Player){
if(event.getEntity() instanceof Player && this.gameManager.getConfigManager().GetBool("back_command")){
Location death = ((Player) event.getEntity()).getPlayer().getLocation();
UUID uuid = ((Player) event.getEntity()).getPlayer().getUniqueId();
this.gameManager.getPlugin().getPlayerDataConfig().set("" + uuid + ".death", death);
} else if(event.getEntity() instanceof Animals) {
if(event.getEntity().toString() == "CraftPig"){
if(event.getEntity().toString() == "CraftPig" && this.gameManager.getConfigManager().GetBool("custom_drops")){
amounts = new int[]{ 2,2 };
drops = new Material[]{Material.LEATHER, Material.PORKCHOP};
Death.onAnimalDeath(amounts, drops, this.gameManager.getPlugin(), event);
@@ -0,0 +1,14 @@
package de.steev.bm.Manager;
public class ConfigManager {
private GameManager gameManager;
public ConfigManager(GameManager gameManager) {
this.gameManager = gameManager;
}
public boolean GetBool(String Key){
return gameManager.getPlugin().getConfig().getBoolean(Key);
}
}
@@ -12,6 +12,7 @@ public class GameManager {
private BetterMinecraft plugin;
private RecipyManager recipyManager;
private PlayerManager playerManager;
private ConfigManager configManager;
/**
* initilizes the Gamemanager and all systems beneath it
@@ -26,20 +27,22 @@ public class GameManager {
this.recipyManager = new RecipyManager(this);
this.playerManager = new PlayerManager(this);
this.configManager = new ConfigManager(this);
if (this.configManager.GetBool("custom_recipes")) {
this.plugin.getLogger().info("registring Recipies");
this.plugin.getLogger().info("saddle");
char[] s_ing = { 'L', 'S', 'I', 'W' };
String[] s_rec = { "LLL", "SWS", "I I" };
Material[] s_mat = { Material.LEATHER, Material.STRING, Material.IRON_INGOT, Material.WOOL};
char[] s_ing = {'L', 'S', 'I', 'W'};
String[] s_rec = {"LLL", "SWS", "I I"};
Material[] s_mat = {Material.LEATHER, Material.STRING, Material.IRON_INGOT, Material.WHITE_WOOL};
this.recipyManager.RegisterNew(s_ing, s_mat, s_rec, 1, Material.SADDLE, "Saddle");
this.plugin.getLogger().info("String");
char[] w_ing = { 'W', 'F', };
String[] w_rec = { " W ", "WFW", " W " };
Material[] w_mat = { Material.WHITE_WOOL, Material.FLINT };
char[] w_ing = {'W', 'F',};
String[] w_rec = {" W ", "WFW", " W "};
Material[] w_mat = {Material.WHITE_WOOL, Material.FLINT};
this.recipyManager.RegisterNew(w_ing, w_mat, w_rec, 4, Material.STRING, "String");
}
}
public BetterMinecraft getPlugin(){
@@ -53,5 +56,9 @@ public class GameManager {
public PlayerManager getPlayerManager() {
return playerManager;
}
public ConfigManager getConfigManager() {
return configManager;
}
}
+5
View File
@@ -0,0 +1,5 @@
improved_bed: true
custom_drops: true
custom_recipes: true
replanting: true
back_command: true
+1 -1
View File
@@ -1,5 +1,5 @@
name: BetterMinecraft
main: de.steev.bm.main
main: de.steev.bm.BetterMinecraft
version: 1.0
api-version: 1.17
commands: