High performance Spigot fork that aims to fix gameplay and mechanics inconsistencies
Go to file
1stGlitch 581b101180
Add world to Entity AddTo/RemoveFrom Events (#10183)
When a plugin listens to the EntityAddToWorld and EntityRemoveFromWorld events, I don't believe there is currently any method of directly obtaining which world the entity was actually added to/removed from. Using event.getEntity().getWorld() works in many cases, but not all. Specifically, when an entity is teleported from one world to another, the location of the entity is updated prior to the removal event being called. This means that when an entity goes through a nether/end portal or is teleported between worlds with a command, a plugin listening to the EntityRemoveFromWorldEvent has no way of determining which world the entity was actually removed from (without relying on other events).

To resolve this, I've added the world as a field in the events along with a getter to retrieve it. I also removed an unused import and made the documentation more clear on the event behaviour when chunks load/unload.
2024-01-23 15:17:14 -05:00
.github [ci skip] Make test results viewable in-browser and downloadable (#10055) 2023-12-19 19:33:46 -08:00
build-data Fixup AsyncPreLoginEvent patches 2024-01-14 13:47:09 +01:00
gradle/wrapper Bump Gradle wrapper to 8.5 2023-12-05 17:58:17 -07:00
licenses [ci skip] add missing final newline (#8659) 2022-12-13 14:16:45 +01:00
paper-api-generator Add mob goal generator (#9980) 2024-01-15 14:36:10 -05:00
Paper-MojangAPI Improve MojangAPI docs and replace @Deprecated with @ApiStatus.Experimental on draft APIs (#8261) 2022-08-07 13:47:43 -07:00
patches Add world to Entity AddTo/RemoveFrom Events (#10183) 2024-01-23 15:17:14 -05:00
scripts [ci skip] Move some disruptive patches back 2024-01-23 15:57:42 +01:00
test-plugin [ci skip] clear out test plugin 2023-08-23 10:05:08 -07:00
work Updated Upstream (Bukkit/CraftBukkit/Spigot) (#10164) 2024-01-14 10:46:04 +01:00
.editorconfig Code Generation for TypedKeys (#9233) 2023-11-22 20:56:28 -08:00
.gitattributes [ci skip] update editorconfig and gitattributes (#9608) 2023-08-22 12:16:03 +10:00
.gitignore Code Generation for TypedKeys (#9233) 2023-11-22 20:56:28 -08:00
.gitmodules Update adventure 2023-12-06 21:24:16 -07:00
build.gradle.kts Updated Upstream (Bukkit/CraftBukkit/Spigot) (#10164) 2024-01-14 10:46:04 +01:00
CONTRIBUTING.md [ci skip] Add more identifying patch comments 2024-01-18 15:56:25 +01:00
gradle.properties 1.20.4 2023-12-07 13:27:28 -07:00
gradlew Update paperweight to 1.5.10 and Gradle to 8.4 (#9957) 2023-11-22 06:27:50 +01:00
gradlew.bat [ci skip] Thank you gradle, very cool 2022-12-09 11:12:15 +01:00
LICENSE.md Allow non-op players to execute the click event callback (#9652) 2023-08-28 13:21:13 +02:00
README.md 1.20.4 2023-12-07 13:27:28 -07:00
settings.gradle.kts Update adventure 2023-12-06 21:24:16 -07:00

Paper Paper Build Status Discord GitHub Sponsors Open Collective

The most widely used, high-performance Minecraft server 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

How To (Plugin Developers)

Repository (for paper-api)

Maven
<repository>
    <id>papermc</id>
    <url>https://repo.papermc.io/repository/maven-public/</url>
</repository>
<dependency>
    <groupId>io.papermc.paper</groupId>
    <artifactId>paper-api</artifactId>
    <version>1.20.4-R0.1-SNAPSHOT</version>
    <scope>provided</scope>
</dependency>
Gradle
repositories {
    maven {
        url = uri("https://repo.papermc.io/repository/maven-public/")
    }
}

dependencies {
    compileOnly("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT")
}

java {
    toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}

How To (Compiling Jar From Source)

To compile Paper, you need JDK 17 and an internet connection.

Clone this repo, run ./gradlew applyPatches, then ./gradlew createReobfBundlerJar from your terminal. You can find the compiled jar in the project root's build/libs directory.

To get a full list of tasks, run ./gradlew tasks.

How To (Pull Request)

See Contributing

Support Us

First of all, thank you for considering helping out, we really appreciate that!

PaperMC has various recurring expenses, mostly related to infrastructure. Paper uses Open Collective via the Open Source Collective fiscal host to manage expenses. Open Collective allows us to be extremely transparent, so you can always see how your donations are used. You can read more about financially supporting PaperMC on our website.

You can find our collective here, or you can donate via GitHub Sponsors here, which will also go towards the collective.

Special Thanks To:

YourKit-Logo

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.

JetBrains, creators of the IntelliJ IDEA, supports Paper with one of their Open Source Licenses. IntelliJ IDEA is the recommended IDE for working with Paper, and most of the Paper team uses it.

All our sponsors!
Sponsor Image