Compare commits

..

7 Commits

Author SHA1 Message Date
ZockerKatze
ee1bf25731 blablablabl added plugin.yml something idk
All checks were successful
Maven Build / build (push) Successful in 2m9s
2025-05-16 10:38:11 +02:00
ZockerKatze
37a01e1ca4 build test
All checks were successful
Maven Build / build (push) Successful in 10m39s
2025-05-12 07:29:13 +02:00
rattatwinko
bb558bab48 test 5
Some checks failed
Maven Build / build (push) Failing after 10m31s
now with a building script
2025-05-10 15:43:08 +02:00
rattatwinko
39c516f5dd test 4
Some checks failed
Maven Build / build (push) Failing after 10m34s
2025-05-09 17:40:07 +02:00
rattatwinko
2d7c942c32 test 4
Some checks failed
Maven Build / build (push) Has been cancelled
2025-05-09 17:32:17 +02:00
rattatwinko
2906ae06e7 test 3
Some checks failed
Maven Build / build (push) Failing after 9m45s
2025-05-09 17:21:30 +02:00
rattatwinko
e850574324 testing new building systema 2
Some checks failed
Build MOTD / build (push) Has been cancelled
2025-05-09 17:11:55 +02:00
8 changed files with 122 additions and 27 deletions

View File

@@ -1,26 +0,0 @@
name: Java CI with Maven
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
cache: 'maven'
- name: Install Maven
run: |
sudo apt-get update -qq
sudo apt-get install -y maven
mvn --version
- name: Build with Maven
run: mvn -B -T 1C -Ddependency.cache=true -Dmaven.artifact.threads=8 -Dkotlin.compiler.incremental=true clean package

View File

@@ -0,0 +1,55 @@
name: Maven Build
on:
push:
branches: [ main, master, dev ]
pull_request:
branches: [ main, master ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '21'
cache: 'maven'
- name: Install Maven
run: |
if ! command -v mvn &> /dev/null; then
echo "Maven not found, installing..."
sudo apt-get update
sudo apt-get install -y maven
fi
mvn --version
- name: Debug Info
run: |
echo "Current workspace directory: $GITHUB_WORKSPACE"
echo "Current directory: $(pwd)"
echo "Project structure:"
find . -type f -name "*.kt" | sort
find . -type f -name "pom.xml"
echo "Maven version: $(mvn --version)"
- name: Build MOTD (MOTD)
run: |
echo "Building MOTD"
echo "Current directory: $(pwd)"
# Run Maven build directly using the POM file path
mvn -B clean package -f "$GITHUB_WORKSPACE/pom.xml" -Dmaven.compiler.failOnError=true
- name: Upload MOTD artifact
uses: actions/upload-artifact@v3
with:
name: MOTD
path: target/MOTD-*.jar
if-no-files-found: error

10
build.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
# Direct build script for Maven project
echo "Current directory: $(pwd)"
echo "Building project with Maven..."
# Run Maven build using the exact pom.xml location
mvn clean package -f "$(pwd)/pom.xml"
echo "Build complete. JAR file should be in target/ directory."

46
debug_build.sh Executable file
View File

@@ -0,0 +1,46 @@
#!/bin/bash
# Debug script for build issues
echo "=== Environment Information ==="
echo "Current directory: $(pwd)"
echo "Java version:"
java -version
echo ""
echo "Maven version:"
mvn --version
echo ""
echo "=== Project structure ==="
find . -type f -name "*.kt" | sort
find . -type f -name "pom.xml"
echo ""
echo "=== Debugging build for MOTD ==="
echo "Changing to directory: "
cd
echo "Current directory: $(pwd)"
echo "Checking for POM file:"
ls -la pom.xml
echo "Checking Kotlin source files:"
find . -type f -name "*.kt" | sort
echo "Compiling Kotlin sources:"
mvn compile
echo "Checking for MOTDGuiHandler class:"
find . -type f -name "MOTDGuiHandler.kt"
grep -r "MOTDGuiHandler" --include="*.kt" .
echo ""
echo "Checking package structure:"
find ./src -type d | sort
echo ""
echo "Checking import statements in MOTDCommand.kt:"
grep -r "import" --include="MOTDCommand.kt" .
echo ""
cd ..

View File

@@ -166,6 +166,14 @@ class MOTD : JavaPlugin() {
} }
// Update the server MOTD with the next quote // Update the server MOTD with the next quote
/*
Asshole piece of crap function that doesnt work very well
Fuck this fucking piece of crap
rattatwinko - 16.5.2025 10:21:37
*/
fun updateServerMOTD() { fun updateServerMOTD() {
if (quotes.isEmpty()) { if (quotes.isEmpty()) {
logger.warning("No quotes available for MOTD") logger.warning("No quotes available for MOTD")

View File

@@ -1,5 +1,6 @@
package org.server_info.MOTD package org.server_info.MOTD
import MOTDGuiHandler
import org.bukkit.ChatColor import org.bukkit.ChatColor
import org.bukkit.command.Command import org.bukkit.command.Command
import org.bukkit.command.CommandExecutor import org.bukkit.command.CommandExecutor

View File

@@ -12,6 +12,7 @@ import java.util.*
import org.bukkit.conversations.* import org.bukkit.conversations.*
import org.bukkit.entity.Player import org.bukkit.entity.Player
@Suppress("DEPRECATION")
class MOTDGuiHandler(private val plugin: MOTD) : Listener { class MOTDGuiHandler(private val plugin: MOTD) : Listener {
private val editingSessions = HashMap<UUID, EditSession>() private val editingSessions = HashMap<UUID, EditSession>()

View File

@@ -3,7 +3,7 @@ version: 1.0-SNAPSHOT
main: org.server_info.MOTD.MOTD main: org.server_info.MOTD.MOTD
api-version: 1.19 api-version: 1.19
description: Sets the server MOTD to random quotes from config with GUI management description: Sets the server MOTD to random quotes from config with GUI management
author: YourName author: rattatwinko
commands: commands:
motd: motd:
description: Control the MOTD quote plugin description: Control the MOTD quote plugin