geforkt von Mirrors/Paper
fcc6d33590
Related to #4174, #4717. As it stands, `JsonList` throws an NPE on `jsonarray.iterator()` when the reader given is at EOF. This means there is an unintelligible message shown to the player: ``` [16:44:31 ERROR]: Encountered an unexpected exception java.lang.NullPointerException: Cannot invoke "com.google.gson.JsonArray.iterator()" because "jsonarray" is null at net.minecraft.server.v1_16_R2.JsonList.load(JsonList.java:192) ~[patched_1.16.3.jar:git-Paper-248] at net.minecraft.server.v1_16_R2.DedicatedPlayerList.y(SourceFile:95) ~[patched_1.16.3.jar:git-Paper-248] ... ``` This is clearly not understandable to the untrained eye: what is `jsonarray`? What is `DedicatedPlayerList.y`? This rather does a proper exception message: ``` [16:42:59 ERROR]: Encountered an unexpected exception java.lang.NullPointerException: The file "banned-players.json" is either empty or corrupt at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:787) ~[paper-1.16.3.jar:git-Paper-"8e6d90c2d"] at net.minecraft.server.v1_16_R2.JsonList.load(JsonList.java:190) ~[paper-1.16.3.jar:git-Paper-"8e6d90c2d"] at net.minecraft.server.v1_16_R2.DedicatedPlayerList.y(SourceFile:95) ~[paper-1.16.3.jar:git-Paper-"8e6d90c2d"] ... ``` It is still an exception, which server owners may or may not understand, but the message now says exactly what went wrong, and who would've known, now we know what `DedicatedPlayerList.y` is, and we know what file was broken. This is more of a quality of life change, but it is certainly useful to the server owners that come into `#paper-help` and the issue tracker (#4174) to ask for help with unintelligible messages we need to open a patched Paper project to make any sense out of. Check state of jsonarray instead of checkNotNull Co-authored-by: Riley Park <riley.park@meino.net> |
||
---|---|---|
.github | ||
licenses | ||
Paper-MojangAPI | ||
removed | ||
scripts | ||
Spigot-API-Patches | ||
Spigot-Server-Patches | ||
work | ||
.editorconfig | ||
.gitignore | ||
.gitmodules | ||
CONTRIBUTING.md | ||
LICENSE.md | ||
paper | ||
pom.xml | ||
README.md | ||
UPDATE_NOTES.md |
Paper
High performance Spigot fork that aims to fix gameplay and mechanics inconsistencies.
Support and Project Discussion:
How To (Server Admins)
Paperclip is a jar file that you can download and run just like a normal jar file.
Download Paper from our downloads page.
Run the Paperclip jar directly from your server. Just like old times
- Documentation on using Paper: paper.readthedocs.io
- For a sneak peak on upcoming features, see here
How To (Plugin Developers)
- See our API patches here
- See upcoming, pending, and recently added API here
- Paper API javadocs here: papermc.io/javadocs
- Maven Repo (for paper-api):
<repository>
<id>papermc</id>
<url>https://papermc.io/repo/repository/maven-public/</url>
</repository>
- Artifact Information:
<dependency>
<groupId>com.destroystokyo.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.16.5-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
Or alternatively, with Gradle:
- Repository:
repositories {
maven {
url 'https://papermc.io/repo/repository/maven-public/'
}
}
- Artifact:
dependencies {
compileOnly 'com.destroystokyo.paper:paper-api:1.16.5-R0.1-SNAPSHOT'
}
How To (Compiling Jar From Source)
To compile Paper, you need JDK 8, maven, and an internet connection.
Clone this repo, run ./paper jar
from bash, get files.
How To (Pull Request)
See Contributing
Special Thanks To:
YourKit, makers of the outstanding java profiler, support open source projects of all kinds with their full featured Java and .NET application profilers. We thank them for granting Paper an OSS license so that we can make our software the best it can be.