LobbySystem commit
This commit is contained in:
BIN
.gradle/8.8/checksums/checksums.lock
Normal file
BIN
.gradle/8.8/checksums/checksums.lock
Normal file
Binary file not shown.
BIN
.gradle/8.8/checksums/md5-checksums.bin
Normal file
BIN
.gradle/8.8/checksums/md5-checksums.bin
Normal file
Binary file not shown.
BIN
.gradle/8.8/checksums/sha1-checksums.bin
Normal file
BIN
.gradle/8.8/checksums/sha1-checksums.bin
Normal file
Binary file not shown.
0
.gradle/8.8/dependencies-accessors/gc.properties
Normal file
0
.gradle/8.8/dependencies-accessors/gc.properties
Normal file
BIN
.gradle/8.8/executionHistory/executionHistory.bin
Normal file
BIN
.gradle/8.8/executionHistory/executionHistory.bin
Normal file
Binary file not shown.
BIN
.gradle/8.8/executionHistory/executionHistory.lock
Normal file
BIN
.gradle/8.8/executionHistory/executionHistory.lock
Normal file
Binary file not shown.
BIN
.gradle/8.8/fileChanges/last-build.bin
Normal file
BIN
.gradle/8.8/fileChanges/last-build.bin
Normal file
Binary file not shown.
BIN
.gradle/8.8/fileHashes/fileHashes.bin
Normal file
BIN
.gradle/8.8/fileHashes/fileHashes.bin
Normal file
Binary file not shown.
BIN
.gradle/8.8/fileHashes/fileHashes.lock
Normal file
BIN
.gradle/8.8/fileHashes/fileHashes.lock
Normal file
Binary file not shown.
BIN
.gradle/8.8/fileHashes/resourceHashesCache.bin
Normal file
BIN
.gradle/8.8/fileHashes/resourceHashesCache.bin
Normal file
Binary file not shown.
0
.gradle/8.8/gc.properties
Normal file
0
.gradle/8.8/gc.properties
Normal file
BIN
.gradle/buildOutputCleanup/buildOutputCleanup.lock
Normal file
BIN
.gradle/buildOutputCleanup/buildOutputCleanup.lock
Normal file
Binary file not shown.
2
.gradle/buildOutputCleanup/cache.properties
Normal file
2
.gradle/buildOutputCleanup/cache.properties
Normal file
@@ -0,0 +1,2 @@
|
||||
#Sun Dec 07 20:43:03 CET 2025
|
||||
gradle.version=8.8
|
||||
BIN
.gradle/buildOutputCleanup/outputFiles.bin
Normal file
BIN
.gradle/buildOutputCleanup/outputFiles.bin
Normal file
Binary file not shown.
BIN
.gradle/file-system.probe
Normal file
BIN
.gradle/file-system.probe
Normal file
Binary file not shown.
0
.gradle/vcs-1/gc.properties
Normal file
0
.gradle/vcs-1/gc.properties
Normal file
3
.idea/.gitignore
generated
vendored
Normal file
3
.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
1
.idea/.name
generated
Normal file
1
.idea/.name
generated
Normal file
@@ -0,0 +1 @@
|
||||
LobbySystem
|
||||
6
.idea/compiler.xml
generated
Normal file
6
.idea/compiler.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="21" />
|
||||
</component>
|
||||
</project>
|
||||
16
.idea/gradle.xml
generated
Normal file
16
.idea/gradle.xml
generated
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
</set>
|
||||
</option>
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
25
.idea/jarRepositories.xml
generated
Normal file
25
.idea/jarRepositories.xml
generated
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="MavenRepo" />
|
||||
<option name="name" value="MavenRepo" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="papermc-repo" />
|
||||
<option name="name" value="papermc-repo" />
|
||||
<option name="url" value="https://repo.papermc.io/repository/maven-public/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
||||
7
.idea/misc.xml
generated
Normal file
7
.idea/misc.xml
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="21" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/untitled3.main.iml" filepath="$PROJECT_DIR$/.idea/modules/untitled3.main.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
14
.idea/modules/untitled3.main.iml
generated
Normal file
14
.idea/modules/untitled3.main.iml
generated
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="minecraft" name="Minecraft">
|
||||
<configuration>
|
||||
<autoDetectTypes>
|
||||
<platformType>PAPER</platformType>
|
||||
<platformType>ADVENTURE</platformType>
|
||||
</autoDetectTypes>
|
||||
<projectReimportVersion>1</projectReimportVersion>
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
</module>
|
||||
55
build.gradle
Normal file
55
build.gradle
Normal file
@@ -0,0 +1,55 @@
|
||||
plugins {
|
||||
id 'java'
|
||||
id("xyz.jpenilla.run-paper") version "2.3.1"
|
||||
}
|
||||
|
||||
group = 'yt.quattro'
|
||||
version = '1.0'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
name = "papermc-repo"
|
||||
url = "https://repo.papermc.io/repository/maven-public/"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly("io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT")
|
||||
}
|
||||
|
||||
tasks {
|
||||
runServer {
|
||||
// Configure the Minecraft version for our task.
|
||||
// This is the only required configuration besides applying the plugin.
|
||||
// Your plugin's jar (or shadowJar if present) will be used automatically.
|
||||
minecraftVersion("1.21")
|
||||
}
|
||||
}
|
||||
|
||||
def targetJavaVersion = 21
|
||||
java {
|
||||
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
|
||||
sourceCompatibility = javaVersion
|
||||
targetCompatibility = javaVersion
|
||||
if (JavaVersion.current() < javaVersion) {
|
||||
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
options.encoding = 'UTF-8'
|
||||
|
||||
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
|
||||
options.release.set(targetJavaVersion)
|
||||
}
|
||||
}
|
||||
|
||||
processResources {
|
||||
def props = [version: version]
|
||||
inputs.properties props
|
||||
filteringCharset 'UTF-8'
|
||||
filesMatching('plugin.yml') {
|
||||
expand props
|
||||
}
|
||||
}
|
||||
Binary file not shown.
BIN
build/libs/untitled3-1.0.jar
Normal file
BIN
build/libs/untitled3-1.0.jar
Normal file
Binary file not shown.
4
build/resources/main/config.yml
Normal file
4
build/resources/main/config.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
chickens:
|
||||
"a1b2c3d4-e5f6-7890-abcd-ef1234567890": "Küken123"
|
||||
"123e4567-e89b-12d3-a456-426614174000": "Huhn456"
|
||||
|
||||
8
build/resources/main/plugin.yml
Normal file
8
build/resources/main/plugin.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
name: SenorPolloLobby
|
||||
version: 1.0
|
||||
main: net.senorpollo.lobbysenor.SenorPollo_sLobby
|
||||
api-version: 1.20
|
||||
author: Quattro
|
||||
commands:
|
||||
build:
|
||||
description: "Enter build mode"
|
||||
10
build/resources/main/settings.yml
Normal file
10
build/resources/main/settings.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
# settings.yml
|
||||
# Beispiel: UUID:
|
||||
# spawnAtSpawn: true/false (ob Spieler am Spawn spawnt)
|
||||
|
||||
settings:
|
||||
UUID1:
|
||||
spawnAtSpawn: true
|
||||
UUID2:
|
||||
spawnAtSpawn: false
|
||||
|
||||
Binary file not shown.
BIN
build/tmp/compileJava/previous-compilation-data.bin
Normal file
BIN
build/tmp/compileJava/previous-compilation-data.bin
Normal file
Binary file not shown.
2
build/tmp/jar/MANIFEST.MF
Normal file
2
build/tmp/jar/MANIFEST.MF
Normal file
@@ -0,0 +1,2 @@
|
||||
Manifest-Version: 1.0
|
||||
|
||||
0
gradle.properties
Normal file
0
gradle.properties
Normal file
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
7
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
7
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
249
gradlew
vendored
Normal file
249
gradlew
vendored
Normal file
@@ -0,0 +1,249 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
92
gradlew.bat
vendored
Normal file
92
gradlew.bat
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
1
settings.gradle
Normal file
1
settings.gradle
Normal file
@@ -0,0 +1 @@
|
||||
rootProject.name = 'untitled3'
|
||||
254
src/main/java/net/senorpollo/lobbysenor/SenorPollo_sLobby.java
Normal file
254
src/main/java/net/senorpollo/lobbysenor/SenorPollo_sLobby.java
Normal file
@@ -0,0 +1,254 @@
|
||||
package net.senorpollo.lobbysenor;
|
||||
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.attribute.Attribute;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
import org.bukkit.event.inventory.InventoryType;
|
||||
import org.bukkit.event.player.PlayerDropItemEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public final class SenorPollo_sLobby extends JavaPlugin implements Listener, CommandExecutor {
|
||||
|
||||
private List<UUID> hiddenPlayers = new ArrayList<>();
|
||||
private HashMap<UUID, Long> cooldowns = new HashMap<>();
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
// Setup plugin logic
|
||||
getServer().getPluginManager().registerEvents(this, this);
|
||||
getCommand("build").setExecutor(this);
|
||||
}
|
||||
|
||||
|
||||
private ItemStack createEmptyGlass() {
|
||||
ItemStack glass = new ItemStack(Material.GRAY_STAINED_GLASS_PANE);
|
||||
ItemMeta meta = glass.getItemMeta();
|
||||
meta.setDisplayName(" "); // Leerzeichen, damit kein Name angezeigt wird
|
||||
glass.setItemMeta(meta);
|
||||
return glass;
|
||||
}
|
||||
|
||||
private void fillEmptySlots(Inventory inv) {
|
||||
ItemStack glass = createEmptyGlass();
|
||||
for (int i = 0; i < inv.getSize(); i++) {
|
||||
if (inv.getItem(i) == null) {
|
||||
inv.setItem(i, glass);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void giveStartItems(Player player) {
|
||||
// Clear player inventory
|
||||
player.getInventory().clear();
|
||||
|
||||
// Add items to the player's inventory
|
||||
//player.getInventory().setItem(4, createItem(Material.COMPASS, "§8» §eTeleporter"));
|
||||
player.getInventory().setItem(6, createItem(Material.COMPARATOR, "§8» §cEinstellungen"));
|
||||
player.getInventory().setItem(2, createItem(Material.LIME_DYE, "§8» §aSpieler sichtbar"));
|
||||
|
||||
|
||||
}
|
||||
|
||||
private ItemStack createItem(Material material, String name) {
|
||||
ItemStack item = new ItemStack(material);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.setDisplayName(name);
|
||||
item.setItemMeta(meta);
|
||||
return item;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onPlayerJoin(PlayerJoinEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
giveStartItems(player);
|
||||
player.teleport(new Location(player.getWorld(), 0.5, 68, -2.5, 0, 0 ));
|
||||
player.sendTitle("§eWillkommen", "§7auf §6Senor§fPollo§7!", 10, 70, 20);
|
||||
player.playSound(player.getLocation(), Sound.ENTITY_PLAYER_LEVELUP, 3, 3);
|
||||
player.setGameMode(GameMode.ADVENTURE);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onPlayerInteract(PlayerInteractEvent event) {
|
||||
ItemStack item = event.getItem();
|
||||
if (item != null && item.hasItemMeta() && item.getItemMeta().hasDisplayName()) {
|
||||
Player player = event.getPlayer();
|
||||
String displayName = item.getItemMeta().getDisplayName();
|
||||
switch (displayName) {
|
||||
case "§8» §aSpieler sichtbar":
|
||||
case "§8» §cSpieler versteckt":
|
||||
togglePlayerVisibility(player, item);
|
||||
break;
|
||||
case "§8» §cEinstellungen":
|
||||
openSettingsMenu(player);
|
||||
break;
|
||||
case "§8» §eTeleporter":
|
||||
openTeleportMenu(player);
|
||||
break;
|
||||
case "§8» §dParkour":
|
||||
player.teleport(new Location(player.getWorld(), 12.500, 10.00, 5.500, -50, -10));
|
||||
break;
|
||||
case "§8» §6Gadgets§8 (§cKommt noch§8)":
|
||||
Inventory gadgetMenu = Bukkit.createInventory(null, InventoryType.CHEST, "§8» §6Gadgets");
|
||||
player.openInventory(gadgetMenu);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void togglePlayerVisibility(Player player, ItemStack item) {
|
||||
if (hiddenPlayers.contains(player.getUniqueId())) {
|
||||
hiddenPlayers.remove(player.getUniqueId());
|
||||
item.setType(Material.LIME_DYE);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.setDisplayName("§8» §aSpieler sichtbar");
|
||||
item.setItemMeta(meta);
|
||||
for (Player onlinePlayer : Bukkit.getOnlinePlayers()) {
|
||||
player.showPlayer(this, onlinePlayer);
|
||||
}
|
||||
} else {
|
||||
hiddenPlayers.add(player.getUniqueId());
|
||||
item.setType(Material.GRAY_DYE);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.setDisplayName("§8» §cSpieler versteckt");
|
||||
item.setItemMeta(meta);
|
||||
for (Player onlinePlayer : Bukkit.getOnlinePlayers()) {
|
||||
if (!onlinePlayer.equals(player)) {
|
||||
player.hidePlayer(this, onlinePlayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void openSettingsMenu(Player player) {
|
||||
Inventory settingsMenu = Bukkit.createInventory(null, 27, "§8» §cEinstellungen");
|
||||
|
||||
ItemStack levelDisplayItem = new ItemStack(Material.EXPERIENCE_BOTTLE);
|
||||
ItemMeta meta = levelDisplayItem.getItemMeta();
|
||||
meta.setDisplayName("§8» §eLevelbar");
|
||||
meta.setLore(Collections.singletonList("§8 §cVerstecken §8/ §aSichtbar"));
|
||||
levelDisplayItem.setItemMeta(meta);
|
||||
settingsMenu.setItem(11, levelDisplayItem);
|
||||
|
||||
// Slots auffüllen
|
||||
fillEmptySlots(settingsMenu);
|
||||
|
||||
player.openInventory(settingsMenu);
|
||||
}
|
||||
|
||||
private void openTeleportMenu(Player player) {
|
||||
Inventory teleportMenu = Bukkit.createInventory(null, 54, "§8» §eTeleportationsmenü");
|
||||
|
||||
createServerItem(teleportMenu, Material.ENDER_EYE, "§8» §aSpawn", 13);
|
||||
createServerItem(teleportMenu, Material.GOLDEN_SWORD, "§8» §eChicken Competition", 19);
|
||||
createServerItem(teleportMenu, Material.IRON_PICKAXE, "§8» §cCityBuild", 25);
|
||||
createServerItem(teleportMenu, Material.CLOCK, "§8» §aSpielzeit", 38);
|
||||
createServerItem(teleportMenu, Material.CHEST_MINECART, "§8» §6Onkel Pollo", 40);
|
||||
createServerItem(teleportMenu, Material.EXPERIENCE_BOTTLE, "§8» §aLevel", 42);
|
||||
|
||||
// Slots auffüllen
|
||||
fillEmptySlots(teleportMenu);
|
||||
|
||||
player.openInventory(teleportMenu);
|
||||
}
|
||||
|
||||
|
||||
private void createServerItem(Inventory inventory, Material material, String name, int slot) {
|
||||
ItemStack item = new ItemStack(material);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.setDisplayName(name);
|
||||
item.setItemMeta(meta);
|
||||
inventory.setItem(slot, item);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onInventoryClick(InventoryClickEvent event) {
|
||||
Inventory inventory = event.getClickedInventory();
|
||||
if (inventory != null && event.getView().getTitle().equals("§8» §cEinstellungen")) {
|
||||
event.setCancelled(true);
|
||||
ItemStack clickedItem = event.getCurrentItem();
|
||||
if (clickedItem != null && clickedItem.hasItemMeta() && clickedItem.getItemMeta().hasDisplayName()) {
|
||||
String displayName = clickedItem.getItemMeta().getDisplayName();
|
||||
Player player = (Player) event.getWhoClicked();
|
||||
if (displayName.equals("§8» §eLevelbar")) {
|
||||
player.performCommand("levelhide");
|
||||
}
|
||||
// Hier können weitere Optionen hinzugefügt werden
|
||||
}
|
||||
} else if (event.getView().getTitle().equals("§8» §eTeleportationsmenü")) {
|
||||
event.setCancelled(true);
|
||||
ItemStack clickedItem = event.getCurrentItem();
|
||||
if (clickedItem != null && clickedItem.hasItemMeta() && clickedItem.getItemMeta().hasDisplayName()) {
|
||||
String displayName = clickedItem.getItemMeta().getDisplayName();
|
||||
Player player = (Player) event.getWhoClicked();
|
||||
switch (displayName) {
|
||||
case "§8» §aSpawn":
|
||||
player.teleport(new Location(player.getWorld(), 0.500, 12.25, 0.500, 180, 0 ));
|
||||
player.playSound(player.getLocation(), Sound.ENTITY_ENDERMAN_TELEPORT, 3, 1);
|
||||
break;
|
||||
case "§8» §cCityBuild":
|
||||
player.teleport(new Location(player.getWorld(), -21.500, 10.25, 0.500, 90, -15));
|
||||
player.playSound(player.getLocation(), Sound.ENTITY_ENDERMAN_TELEPORT, 3, 3);
|
||||
break;
|
||||
case "§8» §eChicken Competition":
|
||||
player.teleport(new Location(player.getWorld(), -0, 10.25, -20.5,180, 0 ));
|
||||
player.playSound(player.getLocation(), Sound.ENTITY_ENDERMAN_TELEPORT, 3, 3);
|
||||
break;
|
||||
case "§8» §aSpielzeit":
|
||||
player.teleport(new Location(player.getWorld(), -22.5, 10.25, 33.5,50, 0 ));
|
||||
player.playSound(player.getLocation(), Sound.ENTITY_ENDERMAN_TELEPORT, 3, 3);
|
||||
break;
|
||||
|
||||
case "§8» §aLevel":
|
||||
player.teleport(new Location(player.getWorld(), -25.5, 10.25, -27.5,120, 0 ));
|
||||
player.playSound(player.getLocation(), Sound.ENTITY_ENDERMAN_TELEPORT, 3, 3);
|
||||
break;
|
||||
|
||||
case "§8» §6Onkel Pollo":
|
||||
player.teleport(new Location(player.getWorld(), 3.5, 12.25, 0.5,-145, 0 ));
|
||||
player.playSound(player.getLocation(), Sound.ENTITY_ENDERMAN_TELEPORT, 3, 3);
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onPlayerDropItem(PlayerDropItemEvent event) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
if (cmd.getName().equalsIgnoreCase("build")) {
|
||||
if (sender instanceof Player) {
|
||||
Player player = (Player) sender;
|
||||
if (player.hasPermission("lobby.build")) {
|
||||
player.setGameMode(GameMode.CREATIVE);
|
||||
player.sendMessage("§6Senor§fPollo§8 |§7 Du bist nun im Baumodus.");
|
||||
player.getInventory().clear();
|
||||
player.playSound(player.getLocation(), Sound.ENTITY_PLAYER_LEVELUP, 3, 3);
|
||||
}
|
||||
} else {
|
||||
sender.sendMessage(ChatColor.RED + "§6Senor§fPollo§8 |§7Dieser Befehl kann nur von einem Spieler ausgeführt werden.");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
4
src/main/resources/config.yml
Normal file
4
src/main/resources/config.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
chickens:
|
||||
"a1b2c3d4-e5f6-7890-abcd-ef1234567890": "Küken123"
|
||||
"123e4567-e89b-12d3-a456-426614174000": "Huhn456"
|
||||
|
||||
8
src/main/resources/plugin.yml
Normal file
8
src/main/resources/plugin.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
name: SenorPolloLobby
|
||||
version: 1.0
|
||||
main: net.senorpollo.lobbysenor.SenorPollo_sLobby
|
||||
api-version: 1.20
|
||||
author: Quattro
|
||||
commands:
|
||||
build:
|
||||
description: "Enter build mode"
|
||||
10
src/main/resources/settings.yml
Normal file
10
src/main/resources/settings.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
# settings.yml
|
||||
# Beispiel: UUID:
|
||||
# spawnAtSpawn: true/false (ob Spieler am Spawn spawnt)
|
||||
|
||||
settings:
|
||||
UUID1:
|
||||
spawnAtSpawn: true
|
||||
UUID2:
|
||||
spawnAtSpawn: false
|
||||
|
||||
Reference in New Issue
Block a user