Compare commits
4 Commits
0aa098ae8f
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 1566419f85 | |||
| ef2352d381 | |||
| cf9326c2a5 | |||
| b73352fe5b |
@@ -168,3 +168,6 @@ gradle-app.setting
|
||||
*.hprof
|
||||
|
||||
# End of https://www.toptal.com/developers/gitignore/api/java,intellij,gradle
|
||||
|
||||
### run-paper test server ###
|
||||
run/
|
||||
|
||||
@@ -1,2 +1,79 @@
|
||||
# PixelBlocks
|
||||
|
||||
**Design and build your own custom Minecraft blocks. In Minecraft.**
|
||||
|
||||
*No resource packs. No client mods. 100% server-side.*
|
||||
|
||||
PixelBlocks is a Paper plugin that lets players create their own blocks: place a pixel block, walk inside it, and build its appearance pixel by pixel in a dedicated building dimension. Every block placed inside becomes one pixel of the custom block (16×16×16 by default), just like a Minecraft block texture, but in 3D and made of real blocks. Since everything is rendered with vanilla display entities, custom blocks are visible to every player instantly: nothing to install, nothing to download.
|
||||
|
||||
## Why PixelBlocks?
|
||||
|
||||
- **Custom blocks without mods or resource packs:** everything is rendered with vanilla display entities; clients need nothing installed.
|
||||
- **Portable builds:** break a pixel block and it drops as an item, contents included. Place it somewhere else, give it away, or collect them.
|
||||
- **Real block feel:** the design is rendered in the world with real block models, including correct rotations and orientations, scaled down to a single block.
|
||||
- **Ownership built in:** the first player to place an empty pixel block becomes its owner; editing and breaking can be restricted to owners via config.
|
||||
- **Made for vanilla, survival and SMP servers:** pixel blocks are earned in-game through a late-game crafting recipe that players discover naturally, no commands or admin intervention needed. Ownership protection keeps builds safe on multiplayer servers, and nothing about vanilla gameplay changes for players who don't use the feature.
|
||||
|
||||
## How it works
|
||||
|
||||
1. Craft a pixel block and place it anywhere in the world.
|
||||
2. Right-click it to enter its building dimension: a floating grass platform with a marked build area and an exit portal.
|
||||
3. Build the block's look inside the marked area, pixel by pixel. Leave through the portal (or `/pixelblocks exit`) and the placed block now shows your design.
|
||||
4. Break the block to pick it up. Item and design travel together.
|
||||
|
||||
The building dimensions are fully protected: no mob spawns, no explosions, no redstone contraptions escaping the build area, no liquids flowing out, and players cannot open containers that don't belong there.
|
||||
|
||||
## Crafting
|
||||
|
||||
The recipe unlocks for a player as soon as they click a Heart of the Sea or an End Crystal in their inventory.
|
||||
|
||||
| | | |
|
||||
|---|---|---|
|
||||
| Glass | End Crystal | Glass |
|
||||
| Diamond Block | Heart of the Sea | Diamond Block |
|
||||
| Grass Block | Grass Block | Grass Block |
|
||||
|
||||
## Requirements & installation
|
||||
|
||||
- Paper 1.21+
|
||||
- Java 21
|
||||
|
||||
Drop `PixelBlocks-<version>-all.jar` into your server's `plugins/` folder and start the server. Config and storage are created on first start.
|
||||
|
||||
## Commands
|
||||
|
||||
Root command: `/pixelblocks` (alias `/pb`), players only.
|
||||
|
||||
| Command | Description | Permission | Default |
|
||||
|---|---|---|---|
|
||||
| `/pixelblocks create` | Creates a pixel block at your position | `pixelblocks.command.create` | op |
|
||||
| `/pixelblocks give [uuid]` | Gives a pixel block item, optionally with a fixed UUID (e.g. to restore a lost item for an existing block) | `pixelblocks.command.give` | op |
|
||||
| `/pixelblocks exit` | Leaves the pixel block you are currently in | `pixelblocks.command.exit` | everyone |
|
||||
| `/pixelblocks destroyall` | Destroys **all** pixel blocks on the server (bypasses ownership) | `pixelblocks.command.destroyall` | op |
|
||||
|
||||
## Configuration
|
||||
|
||||
`plugins/PixelBlocks/config.yml`:
|
||||
|
||||
| Key | Default | Meaning |
|
||||
|---|---|---|
|
||||
| `pixelsPerBlock` | `16` | Edge length of the build area in blocks (= resolution of the miniature) |
|
||||
| `onlyBreakableByOwners` | `false` | Only the owner may break a pixel block |
|
||||
| `onlyEditableByOwners` | `true` | Only the owner may enter and edit a pixel block |
|
||||
|
||||
**Note:** don't change `pixelsPerBlock` once pixel blocks exist, because existing build dimensions and the miniature scale would no longer match.
|
||||
|
||||
## Data & backups
|
||||
|
||||
- `plugins/PixelBlocks/blocks.db`: SQLite database with pixel block metadata (owner, position, orientation).
|
||||
- `plugins/PixelBlocks/worlds/<block-uuid>/`: one world per pixel block containing its build contents.
|
||||
|
||||
Back up both to preserve all pixel blocks.
|
||||
|
||||
## Building from source
|
||||
|
||||
```bash
|
||||
gradle build
|
||||
```
|
||||
|
||||
The plugin jar ends up in `build/libs/` as `PixelBlocks-<version>-all.jar`. To copy it to a local test server automatically, set `testServerPluginsDir=/path/to/server/plugins` in `gradle.properties` and run `gradle copyJarToTestServer`.
|
||||
|
||||
+10
-10
@@ -1,6 +1,7 @@
|
||||
plugins {
|
||||
id 'java'
|
||||
id 'com.gradleup.shadow' version '8.3.1'
|
||||
id 'com.gradleup.shadow' version '9.6.1'
|
||||
id 'xyz.jpenilla.run-paper' version '3.0.2'
|
||||
}
|
||||
|
||||
group = 'eu.mhsl.minecraft'
|
||||
@@ -22,24 +23,18 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly "io.papermc.paper:paper-api:1.21.10-R0.1-SNAPSHOT"
|
||||
compileOnly "io.papermc.paper:paper-api:26.2.build.65-beta"
|
||||
implementation "co.aikar:taskchain-bukkit:3.7.2"
|
||||
}
|
||||
|
||||
def targetJavaVersion = 21
|
||||
java {
|
||||
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
|
||||
sourceCompatibility = javaVersion
|
||||
targetCompatibility = javaVersion
|
||||
if (JavaVersion.current() < javaVersion) {
|
||||
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
|
||||
}
|
||||
toolchain.languageVersion = JavaLanguageVersion.of(25)
|
||||
}
|
||||
|
||||
processResources {
|
||||
def props = [version: version]
|
||||
inputs.properties props
|
||||
filteringCharset 'UTF-8'
|
||||
filteringCharset = 'UTF-8'
|
||||
filesMatching('plugin.yml') {
|
||||
expand props
|
||||
}
|
||||
@@ -56,5 +51,10 @@ shadowJar {
|
||||
relocate 'co.aikar.taskchain', 'eu.mhsl.minecraft.pixelblocks.taskchain'
|
||||
}
|
||||
|
||||
runServer {
|
||||
minecraftVersion '26.2'
|
||||
systemProperty 'com.mojang.eula.agree', 'true'
|
||||
}
|
||||
|
||||
jar.dependsOn shadowJar
|
||||
copyJarToTestServer.dependsOn jar
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
# PixelBlocks
|
||||
|
||||
**Design and build your own custom Minecraft blocks. In Minecraft.**
|
||||
|
||||
*No resource packs. No client mods. 100% server-side.*
|
||||
|
||||

|
||||
|
||||
PixelBlocks lets your players create their own blocks: place a pixel block, walk inside it, and build its appearance pixel by pixel in a dedicated building dimension. Every block placed inside becomes one pixel of the custom block (16×16×16 by default), just like a Minecraft block texture, but in 3D and made of real blocks.
|
||||
|
||||
Since everything is rendered with vanilla display entities, custom blocks are visible to every player instantly: nothing to install, nothing to download.
|
||||
|
||||
## ✨ Why PixelBlocks?
|
||||
|
||||
- **Custom blocks without mods or resource packs:** everything is rendered with vanilla display entities; clients need nothing installed.
|
||||
- **Portable builds:** break a pixel block and it drops as an item, contents included. Place it somewhere else, give it away, or collect them.
|
||||
- **Real block feel:** the design is rendered in the world with real block models, including correct rotations and orientations, scaled down to a single block.
|
||||
- **Ownership built in:** the first player to place an empty pixel block becomes its owner; editing and breaking can be restricted to owners via config.
|
||||
- **Made for vanilla, survival and SMP servers:** pixel blocks are earned in-game through a late-game crafting recipe that players discover naturally, no commands or admin intervention needed.
|
||||
- **Localized:** English and German out of the box, following each player's client language.
|
||||
|
||||
## 🧭 How it works
|
||||
|
||||
1. Craft a pixel block and place it anywhere in the world.
|
||||
2. Right-click it to enter its building dimension: a floating grass platform with a marked build area and an exit portal.
|
||||
3. Build the block's look inside the marked area, pixel by pixel. Leave through the portal (or `/pixelblocks exit`) and the placed block now shows your design.
|
||||
4. Break the block to pick it up. Item and design travel together.
|
||||
|
||||
The building dimensions are fully protected: no mob spawns, no explosions, no redstone contraptions escaping the build area, no liquids flowing out, and players cannot open containers that don't belong there.
|
||||
|
||||
## 🛠️ Crafting
|
||||
|
||||
The recipe unlocks for a player as soon as they click a Heart of the Sea or an End Crystal in their inventory.
|
||||
|
||||

|
||||
|
||||
| | | |
|
||||
|---|---|---|
|
||||
| Glass | End Crystal | Glass |
|
||||
| Diamond Block | Heart of the Sea | Diamond Block |
|
||||
| Grass Block | Grass Block | Grass Block |
|
||||
|
||||
## ⌨️ Commands & permissions
|
||||
|
||||
Root command: `/pixelblocks` (alias `/pb`)
|
||||
|
||||
| Command | Description | Permission | Default |
|
||||
|---|---|---|---|
|
||||
| `/pixelblocks create` | Creates a pixel block at your position | `pixelblocks.command.create` | op |
|
||||
| `/pixelblocks give [uuid]` | Gives a pixel block item | `pixelblocks.command.give` | op |
|
||||
| `/pixelblocks exit` | Leaves the current pixel block | `pixelblocks.command.exit` | everyone |
|
||||
| `/pixelblocks destroyall` | Destroys all pixel blocks | `pixelblocks.command.destroyall` | op |
|
||||
|
||||
## ⚙️ Configuration
|
||||
|
||||
```yaml
|
||||
pixelsPerBlock: 16 # resolution of the miniature (don't change once blocks exist)
|
||||
onlyBreakableByOwners: false # only the owner may break a pixel block
|
||||
onlyEditableByOwners: true # only the owner may enter and edit a pixel block
|
||||
```
|
||||
|
||||
## 📦 Requirements
|
||||
|
||||
- Paper 1.21 or newer (built against the latest release)
|
||||
- Java 21+ (Java 25 for current Paper versions)
|
||||
|
||||
## 🔗 Links
|
||||
|
||||
- [Source code](https://mhsl.eu/gitea/Minecraft/PixelBlocks)
|
||||
- Found a bug or have an idea? Open an issue in the repository!
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 156 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.2 MiB |
Vendored
BIN
Binary file not shown.
+7
-1
@@ -1 +1,7 @@
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@@ -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/subprojects/plugins/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" "$@"
|
||||
Vendored
+92
@@ -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.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
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
|
||||
@@ -52,6 +52,7 @@ public final class Main extends JavaPlugin {
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
Translations.register();
|
||||
Main.taskFactory = BukkitTaskChainFactory.create(this);
|
||||
getLogger().info("Start constructing blocks from Database...");
|
||||
database.loadPixelBlocks();
|
||||
@@ -94,6 +95,7 @@ public final class Main extends JavaPlugin {
|
||||
Bukkit.getOnlinePlayers().forEach(QuitWhileInPixelBlockListener::kickPlayerOutOfWorld);
|
||||
taskFactory.shutdown(5, TimeUnit.SECONDS);
|
||||
database.close();
|
||||
Translations.unregister();
|
||||
}
|
||||
|
||||
public static Main plugin() {
|
||||
|
||||
@@ -17,6 +17,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
@@ -52,7 +53,7 @@ public class PixelBlockItem {
|
||||
return new BlockInfo(blockId, ownerId);
|
||||
}
|
||||
|
||||
public static @NotNull ItemStack getBlockAsItem(@NotNull PixelBlock block) {
|
||||
public static @NotNull ItemStack getBlockAsItem(@NotNull PixelBlock block, @NotNull Locale locale) {
|
||||
String ownerName = Optional.ofNullable(Bukkit.getOfflinePlayer(block.getOwnerUUID()).getName()).orElseGet(() -> block.getOwnerUUID().toString());
|
||||
|
||||
ItemStack itemStack = HeadUtil.getCustomTextureHead(itemTexture);
|
||||
@@ -60,10 +61,10 @@ public class PixelBlockItem {
|
||||
meta.setMaxStackSize(1);
|
||||
meta.getPersistentDataContainer().set(idProperty, PersistentDataType.STRING, block.getBlockUUID().toString());
|
||||
meta.getPersistentDataContainer().set(ownerProperty, PersistentDataType.STRING, block.getOwnerUUID().toString());
|
||||
meta.displayName(Component.text("Pixelblock von " + ownerName));
|
||||
meta.displayName(Translations.render(Component.translatable("pixelblocks.item.name.owned", Component.text(ownerName)), locale));
|
||||
meta.lore(List.of(
|
||||
Component.text(ownerName + " ist der Besitzer dieses Blocks."),
|
||||
Component.text("Klicke auf den gesetzten Block, um diesen zu bearbeiten!"),
|
||||
Translations.render(Component.translatable("pixelblocks.item.lore.owner", Component.text(ownerName)), locale),
|
||||
Translations.render(Component.translatable("pixelblocks.item.lore.edit-hint"), locale),
|
||||
Component.text(block.getBlockUUID().toString()).color(NamedTextColor.DARK_GRAY)
|
||||
));
|
||||
itemStack.setItemMeta(meta);
|
||||
@@ -72,13 +73,17 @@ public class PixelBlockItem {
|
||||
}
|
||||
|
||||
public static @NotNull ItemStack getEmptyPixelBlock() {
|
||||
return getEmptyPixelBlock(Translations.defaultLocale);
|
||||
}
|
||||
|
||||
public static @NotNull ItemStack getEmptyPixelBlock(@NotNull Locale locale) {
|
||||
ItemStack item = HeadUtil.getCustomTextureHead(itemTexture);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.setMaxStackSize(1);
|
||||
meta.displayName(Component.text("Leerer Pixelblock"));
|
||||
meta.displayName(Translations.render(Component.translatable("pixelblocks.item.name.empty"), locale));
|
||||
meta.lore(List.of(
|
||||
Component.text("Der erste Spieler, der den Block platziert wird zum Besitzer des Blocks."),
|
||||
Component.text("Klicke auf den gesetzten Block, um diesen zu bearbeiten!")
|
||||
Translations.render(Component.translatable("pixelblocks.item.lore.first-placer"), locale),
|
||||
Translations.render(Component.translatable("pixelblocks.item.lore.edit-hint"), locale)
|
||||
));
|
||||
meta.getPersistentDataContainer().set(idProperty, PersistentDataType.STRING, emptyBlockUUID.toString());
|
||||
item.setItemMeta(meta);
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package eu.mhsl.minecraft.pixelblocks;
|
||||
|
||||
import net.kyori.adventure.key.Key;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.translation.GlobalTranslator;
|
||||
import net.kyori.adventure.translation.TranslationStore;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
public class Translations {
|
||||
public static final Locale defaultLocale = Locale.ENGLISH;
|
||||
private static final List<Locale> supportedLocales = List.of(Locale.ENGLISH, Locale.GERMAN);
|
||||
|
||||
private static TranslationStore.StringBased<MessageFormat> store;
|
||||
|
||||
public static void register() {
|
||||
store = TranslationStore.messageFormat(Key.key("pixelblocks", "translations"));
|
||||
store.defaultLocale(defaultLocale);
|
||||
for(Locale locale : supportedLocales) {
|
||||
ResourceBundle bundle = ResourceBundle.getBundle("i18n.messages", locale, Translations.class.getClassLoader());
|
||||
store.registerAll(locale, bundle, true);
|
||||
}
|
||||
GlobalTranslator.translator().addSource(store);
|
||||
}
|
||||
|
||||
public static void unregister() {
|
||||
if(store != null) GlobalTranslator.translator().removeSource(store);
|
||||
}
|
||||
|
||||
// Für Texte, die persistiert werden (z. B. Item-Namen) und daher nicht
|
||||
// automatisch pro Empfänger übersetzt werden können
|
||||
public static @NotNull Component render(@NotNull Component component, @NotNull Locale locale) {
|
||||
return GlobalTranslator.render(component, locale);
|
||||
}
|
||||
}
|
||||
@@ -12,13 +12,13 @@ import java.util.UUID;
|
||||
|
||||
public class CreateSubCommand extends SubCommand {
|
||||
public CreateSubCommand() {
|
||||
super("create", "pixelblocks.command.create", "Erstellt einen neuen Pixelblock an deiner Position.");
|
||||
super("create", "pixelblocks.command.create", "pixelblocks.command.create.description");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(@NotNull Player player, @NotNull String[] args) {
|
||||
if(PixelBlockWorld.isPixelWorld(player.getWorld())) {
|
||||
player.sendMessage(Component.text("Pixelblöcke können nicht innerhalb anderer Pixelblöcke erstellt werden.", NamedTextColor.RED));
|
||||
player.sendMessage(Component.translatable("pixelblocks.error.create-inside").color(NamedTextColor.RED));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,13 +11,13 @@ import java.util.List;
|
||||
|
||||
public class DestroyAllSubCommand extends SubCommand {
|
||||
public DestroyAllSubCommand() {
|
||||
super("destroyall", "pixelblocks.command.destroyall", "Zerstört alle Pixelblöcke auf dem Server.");
|
||||
super("destroyall", "pixelblocks.command.destroyall", "pixelblocks.command.destroyall.description");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(@NotNull Player player, @NotNull String[] args) {
|
||||
List<PixelBlock> blocksToDestroy = List.copyOf(Main.pixelBlocks);
|
||||
blocksToDestroy.forEach(pixelBlock -> pixelBlock.destroy(player, true));
|
||||
player.sendMessage(Component.text(String.format("%d Pixelblöcke werden zerstört.", blocksToDestroy.size()), NamedTextColor.GREEN));
|
||||
player.sendMessage(Component.translatable("pixelblocks.command.destroyall.success", Component.text(blocksToDestroy.size())).color(NamedTextColor.GREEN));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,19 +9,19 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ExitSubCommand extends SubCommand {
|
||||
public ExitSubCommand() {
|
||||
super("exit", "pixelblocks.command.exit", "Verlässt den Pixelblock, in dem du dich befindest.");
|
||||
super("exit", "pixelblocks.command.exit", "pixelblocks.command.exit.description");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(@NotNull Player player, @NotNull String[] args) {
|
||||
if(!PixelBlockWorld.isPixelWorld(player.getWorld())) {
|
||||
player.sendMessage(Component.text("Du befindest dich nicht in einem Pixelblock.", NamedTextColor.RED));
|
||||
player.sendMessage(Component.translatable("pixelblocks.error.not-in-pixelblock").color(NamedTextColor.RED));
|
||||
return;
|
||||
}
|
||||
|
||||
PixelBlock pixelBlock = PixelBlock.getPixelBlockFromBlockWorld(player.getWorld());
|
||||
if(pixelBlock == null) {
|
||||
player.sendMessage(Component.text("Dieser Pixelblock konnte nicht gefunden werden.", NamedTextColor.RED));
|
||||
player.sendMessage(Component.translatable("pixelblocks.error.block-not-found").color(NamedTextColor.RED));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.util.UUID;
|
||||
|
||||
public class GiveSubCommand extends SubCommand {
|
||||
public GiveSubCommand() {
|
||||
super("give", "pixelblocks.command.give", "Gibt dir ein Pixelblock-Item, optional mit fester UUID.");
|
||||
super("give", "pixelblocks.command.give", "pixelblocks.command.give.description");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -24,16 +24,16 @@ public class GiveSubCommand extends SubCommand {
|
||||
try {
|
||||
blockId = UUID.fromString(args[0]);
|
||||
} catch(IllegalArgumentException e) {
|
||||
player.sendMessage(Component.text(String.format("'%s' ist keine gültige UUID.", args[0]), NamedTextColor.RED));
|
||||
player.sendMessage(Component.translatable("pixelblocks.error.invalid-uuid", Component.text(args[0])).color(NamedTextColor.RED));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
ItemStack item = PixelBlockItem.getEmptyPixelBlock();
|
||||
ItemStack item = PixelBlockItem.getEmptyPixelBlock(player.locale());
|
||||
PixelBlockItem.setBlockId(item, blockId);
|
||||
|
||||
player.getInventory().addItem(item);
|
||||
player.sendMessage(Component.text(String.format("Pixelblock '%s' erhalten.", blockId), NamedTextColor.GREEN));
|
||||
player.sendMessage(Component.translatable("pixelblocks.command.give.success", Component.text(blockId.toString())).color(NamedTextColor.GREEN));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -25,7 +25,7 @@ public class PixelBlocksCommand implements CommandExecutor, TabCompleter {
|
||||
@Override
|
||||
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
|
||||
if(!(sender instanceof Player player)) {
|
||||
sender.sendMessage(Component.text("Dieser Befehl kann nur von Spielern ausgeführt werden.", NamedTextColor.RED));
|
||||
sender.sendMessage(Component.translatable("pixelblocks.command.players-only").color(NamedTextColor.RED));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ public class PixelBlocksCommand implements CommandExecutor, TabCompleter {
|
||||
}
|
||||
|
||||
if(!player.hasPermission(subCommand.get().permission())) {
|
||||
player.sendMessage(Component.text("Dazu hast du keine Berechtigung.", NamedTextColor.RED));
|
||||
player.sendMessage(Component.translatable("pixelblocks.command.no-permission").color(NamedTextColor.RED));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -68,12 +68,13 @@ public class PixelBlocksCommand implements CommandExecutor, TabCompleter {
|
||||
}
|
||||
|
||||
private void sendUsage(@NotNull Player player) {
|
||||
player.sendMessage(Component.text("PixelBlocks-Befehle:", NamedTextColor.GOLD));
|
||||
player.sendMessage(Component.translatable("pixelblocks.command.usage.header").color(NamedTextColor.GOLD));
|
||||
this.subCommands.stream()
|
||||
.filter(sub -> player.hasPermission(sub.permission()))
|
||||
.forEach(sub -> player.sendMessage(Component.text()
|
||||
.append(Component.text("/pixelblocks " + sub.name(), NamedTextColor.YELLOW))
|
||||
.append(Component.text(" - " + sub.description(), NamedTextColor.GRAY))
|
||||
.append(Component.text(" - ", NamedTextColor.GRAY))
|
||||
.append(Component.translatable(sub.descriptionKey()).color(NamedTextColor.GRAY))
|
||||
.build()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,12 +8,12 @@ import java.util.List;
|
||||
public abstract class SubCommand {
|
||||
private final String name;
|
||||
private final String permission;
|
||||
private final String description;
|
||||
private final String descriptionKey;
|
||||
|
||||
protected SubCommand(@NotNull String name, @NotNull String permission, @NotNull String description) {
|
||||
protected SubCommand(@NotNull String name, @NotNull String permission, @NotNull String descriptionKey) {
|
||||
this.name = name;
|
||||
this.permission = permission;
|
||||
this.description = description;
|
||||
this.descriptionKey = descriptionKey;
|
||||
}
|
||||
|
||||
public final @NotNull String name() {
|
||||
@@ -24,8 +24,8 @@ public abstract class SubCommand {
|
||||
return permission;
|
||||
}
|
||||
|
||||
public final @NotNull String description() {
|
||||
return description;
|
||||
public final @NotNull String descriptionKey() {
|
||||
return descriptionKey;
|
||||
}
|
||||
|
||||
public abstract void execute(@NotNull Player player, @NotNull String[] args);
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
package eu.mhsl.minecraft.pixelblocks.listeners;
|
||||
|
||||
import eu.mhsl.minecraft.pixelblocks.PixelBlockItem;
|
||||
import eu.mhsl.minecraft.pixelblocks.Translations;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.inventory.CraftItemEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.UUID;
|
||||
|
||||
public class CraftPixelBlockListener implements Listener {
|
||||
@@ -17,6 +20,9 @@ public class CraftPixelBlockListener implements Listener {
|
||||
PixelBlockItem.BlockInfo info = PixelBlockItem.getBlockInfo(result);
|
||||
if(info == null || !info.id().equals(PixelBlockItem.emptyBlockUUID)) return;
|
||||
|
||||
PixelBlockItem.setBlockId(result, UUID.randomUUID());
|
||||
Locale locale = event.getWhoClicked() instanceof Player player ? player.locale() : Translations.defaultLocale;
|
||||
ItemStack localizedResult = PixelBlockItem.getEmptyPixelBlock(locale);
|
||||
PixelBlockItem.setBlockId(localizedResult, UUID.randomUUID());
|
||||
event.getInventory().setResult(localizedResult);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,13 +24,13 @@ public class PlacePixelBlockListener implements Listener {
|
||||
|
||||
World playerWorld = event.getPlayer().getWorld();
|
||||
if(PixelBlockWorld.isPixelWorld(playerWorld)) {
|
||||
event.getPlayer().sendMessage(Component.text("In Pixelblöcken kann kein Pixelblock platziert werden.", NamedTextColor.RED));
|
||||
event.getPlayer().sendMessage(Component.translatable("pixelblocks.error.place-inside").color(NamedTextColor.RED));
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if(PixelBlock.exists(info.id())) {
|
||||
event.getPlayer().sendMessage(Component.text("Dieser Pixelblock existiert bereits in der Welt!", NamedTextColor.RED));
|
||||
event.getPlayer().sendMessage(Component.translatable("pixelblocks.error.already-exists").color(NamedTextColor.RED));
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -14,8 +14,8 @@ import org.bukkit.entity.Item;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.Vector;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
@@ -124,7 +124,7 @@ public class PixelBlock {
|
||||
|
||||
public void enterBlock(@NotNull Player player) {
|
||||
if(Main.configuration().onlyEditableByOwner() && !player.getUniqueId().equals(ownerUUID)) {
|
||||
player.sendMessage(Component.text("Dieser Pixelblock gehört nicht dir!", NamedTextColor.RED));
|
||||
player.sendMessage(Component.translatable("pixelblocks.error.not-owner").color(NamedTextColor.RED));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -171,13 +171,13 @@ public class PixelBlock {
|
||||
public void destroy(Player destroyedBy, boolean force) {
|
||||
if(!this.isAccessible) return;
|
||||
if(!force && Main.configuration().onlyBreakableByOwner() && !destroyedBy.getUniqueId().equals(ownerUUID)) {
|
||||
destroyedBy.sendMessage(Component.text("Dieser Pixelblock gehört nicht dir!", NamedTextColor.RED));
|
||||
destroyedBy.sendMessage(Component.translatable("pixelblocks.error.not-owner").color(NamedTextColor.RED));
|
||||
return;
|
||||
}
|
||||
|
||||
Location returnLocation = this.getReturnLocation();
|
||||
this.pixelWorld.getPlayersInWorld().forEach(p -> {
|
||||
p.sendMessage(Component.text("Der Pixelblock wurde von einem anderen Spieler abgebaut!", NamedTextColor.RED));
|
||||
p.sendMessage(Component.translatable("pixelblocks.info.destroyed-by-other").color(NamedTextColor.RED));
|
||||
p.teleport(returnLocation);
|
||||
});
|
||||
|
||||
@@ -193,7 +193,7 @@ public class PixelBlock {
|
||||
this.removeEntities();
|
||||
World world = this.pixelBlockLocation.getWorld();
|
||||
world.playSound(this.pixelBlockLocation, Sound.BLOCK_COPPER_BULB_BREAK, 1.0F, 2.0F);
|
||||
world.dropItem(this.getPixelBlockLocation().add(new Vector(0.5, 0.5, 0.5)), PixelBlockItem.getBlockAsItem(this));
|
||||
world.dropItem(this.getPixelBlockLocation().add(new Vector(0.5, 0.5, 0.5)), PixelBlockItem.getBlockAsItem(this, destroyedBy.locale()));
|
||||
})
|
||||
.execute();
|
||||
|
||||
|
||||
@@ -152,12 +152,12 @@ public class PixelBlockWorld {
|
||||
World world = Bukkit.createWorld(worldCreator);
|
||||
Objects.requireNonNull(world);
|
||||
|
||||
world.setGameRule(GameRule.RANDOM_TICK_SPEED, 0);
|
||||
world.setGameRule(GameRule.DO_FIRE_TICK, false);
|
||||
world.setGameRule(GameRule.DO_MOB_SPAWNING, false);
|
||||
world.setGameRule(GameRule.DO_WEATHER_CYCLE, false);
|
||||
world.setGameRule(GameRule.DO_VINES_SPREAD, false);
|
||||
world.setGameRule(GameRule.DO_DAYLIGHT_CYCLE, false);
|
||||
world.setGameRule(GameRules.RANDOM_TICK_SPEED, 0);
|
||||
world.setGameRule(GameRules.FIRE_SPREAD_RADIUS_AROUND_PLAYER, 0);
|
||||
world.setGameRule(GameRules.SPAWN_MOBS, false);
|
||||
world.setGameRule(GameRules.ADVANCE_WEATHER, false);
|
||||
world.setGameRule(GameRules.SPREAD_VINES, false);
|
||||
world.setGameRule(GameRules.ADVANCE_TIME, false);
|
||||
|
||||
WorldBorder worldBorder = world.getWorldBorder();
|
||||
worldBorder.setCenter(getBuildOrigin().add((double) pixelsPerBlock / 2, 0, (double) pixelsPerBlock / 2));
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
pixelblocks.command.players-only=Dieser Befehl kann nur von Spielern ausgeführt werden.
|
||||
pixelblocks.command.no-permission=Dazu hast du keine Berechtigung.
|
||||
pixelblocks.command.usage.header=PixelBlocks-Befehle:
|
||||
pixelblocks.command.create.description=Erstellt einen neuen Pixelblock an deiner Position.
|
||||
pixelblocks.command.give.description=Gibt dir ein Pixelblock-Item, optional mit fester UUID.
|
||||
pixelblocks.command.give.success=Pixelblock '{0}' erhalten.
|
||||
pixelblocks.command.exit.description=Verlässt den Pixelblock, in dem du dich befindest.
|
||||
pixelblocks.command.destroyall.description=Zerstört alle Pixelblöcke auf dem Server.
|
||||
pixelblocks.command.destroyall.success={0} Pixelblöcke werden zerstört.
|
||||
pixelblocks.error.not-owner=Dieser Pixelblock gehört nicht dir!
|
||||
pixelblocks.error.create-inside=Pixelblöcke können nicht innerhalb anderer Pixelblöcke erstellt werden.
|
||||
pixelblocks.error.place-inside=In Pixelblöcken kann kein Pixelblock platziert werden.
|
||||
pixelblocks.error.already-exists=Dieser Pixelblock existiert bereits in der Welt!
|
||||
pixelblocks.error.invalid-uuid='{0}' ist keine gültige UUID.
|
||||
pixelblocks.error.not-in-pixelblock=Du befindest dich nicht in einem Pixelblock.
|
||||
pixelblocks.error.block-not-found=Dieser Pixelblock konnte nicht gefunden werden.
|
||||
pixelblocks.info.destroyed-by-other=Der Pixelblock wurde von einem anderen Spieler abgebaut!
|
||||
pixelblocks.item.name.owned=Pixelblock von {0}
|
||||
pixelblocks.item.name.empty=Leerer Pixelblock
|
||||
pixelblocks.item.lore.owner={0} ist der Besitzer dieses Blocks.
|
||||
pixelblocks.item.lore.edit-hint=Klicke auf den gesetzten Block, um diesen zu bearbeiten!
|
||||
pixelblocks.item.lore.first-placer=Der erste Spieler, der den Block platziert, wird zum Besitzer des Blocks.
|
||||
@@ -0,0 +1,22 @@
|
||||
pixelblocks.command.players-only=This command can only be used by players.
|
||||
pixelblocks.command.no-permission=You don't have permission to do that.
|
||||
pixelblocks.command.usage.header=PixelBlocks commands:
|
||||
pixelblocks.command.create.description=Creates a new pixel block at your position.
|
||||
pixelblocks.command.give.description=Gives you a pixel block item, optionally with a fixed UUID.
|
||||
pixelblocks.command.give.success=Received pixel block '{0}'.
|
||||
pixelblocks.command.exit.description=Leaves the pixel block you are currently in.
|
||||
pixelblocks.command.destroyall.description=Destroys all pixel blocks on the server.
|
||||
pixelblocks.command.destroyall.success={0} pixel blocks are being destroyed.
|
||||
pixelblocks.error.not-owner=This pixel block does not belong to you!
|
||||
pixelblocks.error.create-inside=Pixel blocks cannot be created inside other pixel blocks.
|
||||
pixelblocks.error.place-inside=Pixel blocks cannot be placed inside pixel blocks.
|
||||
pixelblocks.error.already-exists=This pixel block already exists in the world!
|
||||
pixelblocks.error.invalid-uuid='{0}' is not a valid UUID.
|
||||
pixelblocks.error.not-in-pixelblock=You are not inside a pixel block.
|
||||
pixelblocks.error.block-not-found=This pixel block could not be found.
|
||||
pixelblocks.info.destroyed-by-other=The pixel block was destroyed by another player!
|
||||
pixelblocks.item.name.owned=Pixel block of {0}
|
||||
pixelblocks.item.name.empty=Empty pixel block
|
||||
pixelblocks.item.lore.owner={0} is the owner of this block.
|
||||
pixelblocks.item.lore.edit-hint=Click the placed block to edit it!
|
||||
pixelblocks.item.lore.first-placer=The first player to place this block becomes its owner.
|
||||
Reference in New Issue
Block a user