# Einfaches Deploy Script für LevelCraft param( [switch]$SavePassword, [switch]$Build ) Write-Host "🚀 LevelCraft Quick Deploy" -ForegroundColor Green Write-Host "=========================" -ForegroundColor Green # Prüfe ob Passwort bereits gesetzt ist if (-not $env:SERVER_PASSWORD) { Write-Host "⚠️ Server-Passwort nicht gesetzt." -ForegroundColor Yellow if ($SavePassword) { Write-Host "💾 Passwort wird für diese PowerShell Session gespeichert..." -ForegroundColor Cyan } $securePassword = Read-Host "🔐 Server Passwort eingeben" -AsSecureString $env:SERVER_PASSWORD = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($securePassword)) if ($SavePassword) { Write-Host "✅ Passwort gesetzt! Du musst es in dieser Session nicht mehr eingeben." -ForegroundColor Green Write-Host "💡 Tipp: Verwende einfach './quick-deploy.ps1' für weitere Uploads." -ForegroundColor Cyan } } if ($Build) { Write-Host "🔨 Building plugin..." -ForegroundColor Yellow ./gradlew clean build if ($LASTEXITCODE -ne 0) { Write-Host "❌ Build failed!" -ForegroundColor Red exit 1 } } Write-Host "📤 Uploading plugin..." -ForegroundColor Yellow ./gradlew uploadPlugin if ($LASTEXITCODE -eq 0) { Write-Host "✅ Plugin successfully deployed!" -ForegroundColor Green Write-Host "📁 Location: /home/CloudNet/local/templates/develop/default/plugins/LevelCraft.jar" -ForegroundColor Cyan } else { Write-Host "❌ Upload failed!" -ForegroundColor Red }