geforkt von Mirrors/Paper
Merge pull request 'Update upstream (and to 1.19.3)' (#5) from upstream into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Reviewed-on: #5
Dieser Commit ist enthalten in:
Commit
93a565905b
107
.github/workflows/build.yml
vendored
107
.github/workflows/build.yml
vendored
@ -1,33 +1,86 @@
|
|||||||
# Here lie dragons!
|
# Here lie dragons!
|
||||||
#
|
#
|
||||||
# Note that there is no artifact step in this script. We do not want Paperclip
|
# This action either builds the server or
|
||||||
# jars to be built for every push & PR; our CI handles pushes to branches, while
|
# builds a paperclip jar to be updated in the body
|
||||||
# PRs can themselves link to Paperclip jars if it is necessary. Official such
|
# of the PR relating to this action.
|
||||||
# PRs will take use of testing builds.
|
|
||||||
|
|
||||||
name: Build Paper
|
name: Build Paper
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- reopened
|
||||||
|
- synchronize
|
||||||
|
- labeled
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
# Only run on PRs if the source branch is on someone else's repo
|
# Run on all label events (won't be duplicated) or all push events or on PR syncs not from the same repo
|
||||||
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
|
if: (github.event_name == 'pull_request' && github.event.action == 'labeled') || github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
java: [17]
|
java: [17]
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.4.0
|
- uses: actions/checkout@v3
|
||||||
- name: JDK ${{ matrix.java }}
|
- name: JDK ${{ matrix.java }}
|
||||||
uses: actions/setup-java@v3.1.0
|
uses: actions/setup-java@v3.6.0
|
||||||
with:
|
with:
|
||||||
java-version: ${{ matrix.java }}
|
java-version: ${{ matrix.java }}
|
||||||
cache: 'gradle'
|
distribution: 'temurin'
|
||||||
distribution: 'temurin'
|
- name: Setup Gradle
|
||||||
- name: Patch and build
|
uses: gradle/gradle-build-action@v2
|
||||||
run: |
|
|
||||||
git config --global user.email "no-reply@github.com"
|
- name: Configure Build
|
||||||
git config --global user.name "Github Actions"
|
uses: actions/github-script@v6
|
||||||
./gradlew applyPatches --stacktrace
|
id: determine
|
||||||
./gradlew build --stacktrace
|
with:
|
||||||
|
script: |
|
||||||
|
const {owner, repo} = context.repo;
|
||||||
|
const event_name = "${{ github.event_name }}";
|
||||||
|
const event = ${{ toJSON(github.event) }};
|
||||||
|
const ref_type = "${{ github.ref_type }}";
|
||||||
|
const ref_name = "${{ github.ref_name }}";
|
||||||
|
const result = {
|
||||||
|
action: "build"
|
||||||
|
};
|
||||||
|
|
||||||
|
if (event_name === "push" && ref_type === "branch") {
|
||||||
|
const {data: pulls} = await github.rest.pulls.list({ owner, repo, head: `${owner}:${ref_name}`, state: "open" });
|
||||||
|
const pull = pulls.find((pr) => !!pr.labels.find((l) => l.name === "build-pr-jar"));
|
||||||
|
if (pull) {
|
||||||
|
result["pr"] = pull.number;
|
||||||
|
result["action"] = "paperclip";
|
||||||
|
core.notice(`This is a push action but to a branch with an open PR with the build paperclip label (${JSON.stringify(result)})`);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
} else if (event_name === "pull_request" && event.pull_request.labels.find((l) => l.name === "build-pr-jar")) {
|
||||||
|
result["pr"] = event.pull_request.number;
|
||||||
|
result["action"] = "paperclip";
|
||||||
|
core.notice(`This is a pull request action with a build paperclip label (${JSON.stringify(result)})`);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
core.notice("This will not build a paperclip jar");
|
||||||
|
return result;
|
||||||
|
|
||||||
|
- name: Apply Patches
|
||||||
|
run: |
|
||||||
|
git config --global user.email "no-reply@github.com"
|
||||||
|
git config --global user.name "Github Actions"
|
||||||
|
./gradlew applyPatches --stacktrace
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: ./gradlew build --stacktrace
|
||||||
|
|
||||||
|
- name: Create Paperclip Jar
|
||||||
|
if: fromJSON(steps.determine.outputs.result).action == 'paperclip'
|
||||||
|
run: ./gradlew createReobfPaperclipJar --stacktrace
|
||||||
|
|
||||||
|
- name: Upload Paperclip Jar
|
||||||
|
if: fromJSON(steps.determine.outputs.result).action == 'paperclip'
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: paper-${{ fromJSON(steps.determine.outputs.result).pr }}
|
||||||
|
path: build/libs/paper-paperclip-*-reobf.jar
|
||||||
|
14
.github/workflows/close_invalid_prs.yml
vendored
Normale Datei
14
.github/workflows/close_invalid_prs.yml
vendored
Normale Datei
@ -0,0 +1,14 @@
|
|||||||
|
name: Close invalid PRs
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
types: [ opened ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run:
|
||||||
|
if: ${{ github.repository != github.event.pull_request.head.repo.full_name && github.head_ref == 'master' }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: superbrothers/close-pull-request@v3
|
||||||
|
with:
|
||||||
|
comment: "Please do not open pull requests from the `master` branch, create a new branch instead."
|
76
.github/workflows/pr_comment.yml
vendored
Normale Datei
76
.github/workflows/pr_comment.yml
vendored
Normale Datei
@ -0,0 +1,76 @@
|
|||||||
|
# This workflow run on the completion of the
|
||||||
|
# build workflow but only does anything if the
|
||||||
|
# triggering workflow uploaded an artifact.
|
||||||
|
#
|
||||||
|
# Do note that it is then the trigger workflow that
|
||||||
|
# determines if this will update the PR text body. All
|
||||||
|
# this workflow does is check if an uploaded artifact
|
||||||
|
# exists and there is a PR tied to the previous workflow.
|
||||||
|
|
||||||
|
name: Comment on pull request
|
||||||
|
on:
|
||||||
|
workflow_run:
|
||||||
|
workflows: ['Build Paper']
|
||||||
|
types: [completed]
|
||||||
|
jobs:
|
||||||
|
pr_comment:
|
||||||
|
if: github.event.workflow_run.conclusion == 'success'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/github-script@v6
|
||||||
|
with:
|
||||||
|
# This snippet is public-domain, taken from
|
||||||
|
# https://github.com/oprypin/nightly.link/blob/master/.github/workflows/pr-comment.yml
|
||||||
|
# Modified extensively by Machine_Maker
|
||||||
|
script: |
|
||||||
|
async function updatePR(owner, repo, issue_number, purpose, body) {
|
||||||
|
const { data } = await github.rest.issues.get({ owner, repo, issue_number });
|
||||||
|
core.debug(JSON.stringify(data, null, 2));
|
||||||
|
|
||||||
|
const marker = `<!-- bot: ${purpose} -->`;
|
||||||
|
|
||||||
|
let new_body = data.body ? data.body.trim().split(marker)[0].trim() : "";
|
||||||
|
new_body += `\n${marker}\n---\n${body}`;
|
||||||
|
|
||||||
|
core.info(`Updating the text body of PR #${issue_number} in ${owner}/${repo}`);
|
||||||
|
await github.rest.issues.update({ owner, repo, issue_number, body: new_body });
|
||||||
|
}
|
||||||
|
|
||||||
|
const { owner, repo } = context.repo;
|
||||||
|
const run_id = ${{ github.event.workflow_run.id }};
|
||||||
|
const repo_id = ${{ github.event.repository.id }};
|
||||||
|
|
||||||
|
let pulls = [];
|
||||||
|
const event_type = "${{ github.event.workflow_run.event}}";
|
||||||
|
if (event_type === "push") { // if push, it's from the same repo which means `pull_requests` is populated
|
||||||
|
pulls = ${{ toJSON(github.event.workflow_run.pull_requests) }};
|
||||||
|
} else {
|
||||||
|
const pr_branch = "${{ github.event.workflow_run.head_branch }}";
|
||||||
|
const pr_sha = "${{ github.event.workflow_run.head_sha }}";
|
||||||
|
const pr_owner = "${{ github.event.workflow_run.head_repository.owner.login }}";
|
||||||
|
const { data } = await github.rest.pulls.list({ owner, repo, head: `${pr_owner}:${pr_branch}`, state: "open" });
|
||||||
|
core.debug(JSON.stringify(data, null, 2));
|
||||||
|
pulls = data.filter((pr) => pr.head.sha === pr_sha && pr.labels.find((l) => l.name === "build-pr-jar"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!pulls.length) {
|
||||||
|
return core.notice("This workflow doesn't have any pull requests!");
|
||||||
|
} else if (pulls.length > 1) {
|
||||||
|
core.info(JSON.stringify(pulls, null, 2));
|
||||||
|
return core.error("Found multiple matching PRs");
|
||||||
|
}
|
||||||
|
const pull_request = pulls[0];
|
||||||
|
|
||||||
|
const artifacts = await github.paginate(github.rest.actions.listWorkflowRunArtifacts, { owner, repo, run_id });
|
||||||
|
if (!artifacts.length) {
|
||||||
|
return core.info("Skipping comment due to no artifact found");
|
||||||
|
}
|
||||||
|
const artifact = artifacts.find((art) => art.name === `paper-${pull_request.number}`);
|
||||||
|
if (!artifact) {
|
||||||
|
return core.info("Skipping comment to no matching artifact found");
|
||||||
|
}
|
||||||
|
|
||||||
|
const link = `https://nightly.link/${owner}/${repo}/actions/artifacts/${artifact.id}.zip`;
|
||||||
|
const body = `Download the paperclip jar for this pull request: [${artifact.name}.zip](${link})`;
|
||||||
|
core.info(`Adding a link to ${link}`);
|
||||||
|
await updatePR(owner, repo, pull_request.number, "paperclip-pr-build", body);
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -53,6 +53,9 @@ work/ForgeFlower
|
|||||||
.idea/
|
.idea/
|
||||||
out/
|
out/
|
||||||
|
|
||||||
|
# JetBrains Fleet
|
||||||
|
.fleet/
|
||||||
|
|
||||||
# Linux temp files
|
# Linux temp files
|
||||||
*~
|
*~
|
||||||
|
|
||||||
|
@ -236,6 +236,37 @@ There are exceptions, especially in Spigot-related files
|
|||||||
- When in doubt or the code around your change is in a clearly different style,
|
- When in doubt or the code around your change is in a clearly different style,
|
||||||
use the same style as the surrounding code.
|
use the same style as the surrounding code.
|
||||||
|
|
||||||
|
## Access Transformers
|
||||||
|
Sometimes, vanilla or CraftBukkit code already contains a field, method, or type you want to access
|
||||||
|
but the visibility is too low (e.g. a private field in an entity class). Paper can use access transformers
|
||||||
|
to change the visibility or remove the final modifier from fields, methods, and classes. Inside the `build-data/paper.at`
|
||||||
|
file, you can add ATs that are applied when you `./gradlew applyPatches`. You can read about the format of ATs
|
||||||
|
[here](https://mcforge.readthedocs.io/en/latest/advanced/accesstransformers/#access-modifiers).
|
||||||
|
|
||||||
|
### Important
|
||||||
|
ATs should be included in the patch file which requires them within the commit message. Do not commit any changes to the
|
||||||
|
`build-data/paper.at` file, just use it to initially change the visibility of members until you have finalized what you
|
||||||
|
need. Then, in the commit message for the patch which requires the ATs, add a header at the bottom of the commit message
|
||||||
|
before any co-authors. It should look like the following after you `./gradlew rebuildPatches`.
|
||||||
|
```
|
||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||||
|
Date: Wed, 8 Jun 2022 22:20:16 -0700
|
||||||
|
Subject: [PATCH] Paper config files
|
||||||
|
|
||||||
|
This patch adds Paper configuration files.
|
||||||
|
Access transformers for this patch are below, but before the co-authors.
|
||||||
|
|
||||||
|
== AT ==
|
||||||
|
public org.spigotmc.SpigotWorldConfig getBoolean(Ljava/lang/String;Z)Z
|
||||||
|
public net.minecraft.world.level.NaturalSpawner SPAWNING_CATEGORIES
|
||||||
|
|
||||||
|
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
|
||||||
|
|
||||||
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
## Patch Notes
|
## Patch Notes
|
||||||
|
|
||||||
When submitting patches to Paper, we may ask you to add notes to the patch
|
When submitting patches to Paper, we may ask you to add notes to the patch
|
||||||
|
@ -50,4 +50,8 @@ LemonCaramel <admin@caramel.moe>
|
|||||||
Noah van der Aa <ndvdaa@gmail.com>
|
Noah van der Aa <ndvdaa@gmail.com>
|
||||||
Doc <nachito94@msn.com>
|
Doc <nachito94@msn.com>
|
||||||
Nick Hensel <nickhensel25@icloud.com>
|
Nick Hensel <nickhensel25@icloud.com>
|
||||||
|
vytskalt <vytskalt@protonmail.com>
|
||||||
|
TheFruxz <cedricspitzer@outlook.de>
|
||||||
|
Kieran Wallbanks <kieran.wallbanks@gmail.com>
|
||||||
|
Denery <dorofeevij@gmail.com>
|
||||||
```
|
```
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Paper [![Paper Build Status](https://img.shields.io/github/workflow/status/PaperMC/Paper/Build%20Paper/master)](https://github.com/PaperMC/Paper/actions)
|
Paper [![Paper Build Status](https://img.shields.io/github/actions/workflow/status/PaperMC/Paper/build.yml?branch=master)](https://github.com/PaperMC/Paper/actions)
|
||||||
[![Discord](https://img.shields.io/discord/289587909051416579.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/papermc)
|
[![Discord](https://img.shields.io/discord/289587909051416579.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/papermc)
|
||||||
[![GitHub Sponsors](https://img.shields.io/github/sponsors/papermc?label=GitHub%20Sponsors)](https://github.com/sponsors/PaperMC)
|
[![GitHub Sponsors](https://img.shields.io/github/sponsors/papermc?label=GitHub%20Sponsors)](https://github.com/sponsors/PaperMC)
|
||||||
[![Open Collective](https://img.shields.io/opencollective/all/papermc?label=OpenCollective%20Sponsors)](https://opencollective.com/papermc)
|
[![Open Collective](https://img.shields.io/opencollective/all/papermc?label=OpenCollective%20Sponsors)](https://opencollective.com/papermc)
|
||||||
@ -38,7 +38,7 @@ How To (Plugin Developers)
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.papermc.paper</groupId>
|
<groupId>io.papermc.paper</groupId>
|
||||||
<artifactId>paper-api</artifactId>
|
<artifactId>paper-api</artifactId>
|
||||||
<version>1.19.2-R0.1-SNAPSHOT</version>
|
<version>1.19.3-R0.1-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
@ -54,7 +54,7 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly("io.papermc.paper:paper-api:1.19.2-R0.1-SNAPSHOT")
|
compileOnly("io.papermc.paper:paper-api:1.19.3-R0.1-SNAPSHOT")
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
|
@ -8,4 +8,3 @@
|
|||||||
# To import classes from the vanilla Minecraft jar use `minecraft` as the artifactId:
|
# To import classes from the vanilla Minecraft jar use `minecraft` as the artifactId:
|
||||||
# minecraft net.minecraft.world.level.entity.LevelEntityGetterAdapter
|
# minecraft net.minecraft.world.level.entity.LevelEntityGetterAdapter
|
||||||
# minecraft net/minecraft/world/level/entity/LevelEntityGetter.java
|
# minecraft net/minecraft/world/level/entity/LevelEntityGetter.java
|
||||||
|
|
||||||
|
@ -12,327 +12,3 @@ public net.minecraft.server.MinecraftServer doRunTask(Lnet/minecraft/server/Tick
|
|||||||
# AT remap issue? todo 1.18
|
# AT remap issue? todo 1.18
|
||||||
public net.minecraft.world.level.dimension.end.EndDragonFight findExitPortal()Lnet/minecraft/world/level/block/state/pattern/BlockPattern$BlockPatternMatch;
|
public net.minecraft.world.level.dimension.end.EndDragonFight findExitPortal()Lnet/minecraft/world/level/block/state/pattern/BlockPattern$BlockPatternMatch;
|
||||||
public net.minecraft.nbt.TagParser readArrayTag()Lnet/minecraft/nbt/Tag;
|
public net.minecraft.nbt.TagParser readArrayTag()Lnet/minecraft/nbt/Tag;
|
||||||
|
|
||||||
# Paper config files
|
|
||||||
public org.spigotmc.SpigotWorldConfig getBoolean(Ljava/lang/String;Z)Z
|
|
||||||
public org.spigotmc.SpigotWorldConfig getDouble(Ljava/lang/String;)D
|
|
||||||
public org.spigotmc.SpigotWorldConfig getDouble(Ljava/lang/String;D)D
|
|
||||||
public org.spigotmc.SpigotWorldConfig getInt(Ljava/lang/String;)I
|
|
||||||
public org.spigotmc.SpigotWorldConfig getInt(Ljava/lang/String;I)I
|
|
||||||
public org.spigotmc.SpigotWorldConfig getList(Ljava/lang/String;Ljava/lang/Object;)Ljava/util/List;
|
|
||||||
public org.spigotmc.SpigotWorldConfig getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
||||||
|
|
||||||
# MC Utils
|
|
||||||
public net.minecraft.server.level.ServerChunkCache mainThread
|
|
||||||
public net.minecraft.server.level.ServerLevel chunkSource
|
|
||||||
public org.bukkit.craftbukkit.inventory.CraftItemStack handle
|
|
||||||
|
|
||||||
# Add PlayerInitialSpawnEvent
|
|
||||||
public net.minecraft.world.entity.Entity setRot(FF)V
|
|
||||||
|
|
||||||
# Add PlayerUseUnknownEntityEvent
|
|
||||||
public net.minecraft.network.protocol.game.ServerboundInteractPacket$ActionType
|
|
||||||
|
|
||||||
# Configurable RCON IP address
|
|
||||||
public net.minecraft.server.dedicated.Settings getStringRaw(Ljava/lang/String;)Ljava/lang/String;
|
|
||||||
|
|
||||||
# Mob Spawner API Enhancements
|
|
||||||
public net.minecraft.world.level.BaseSpawner isNearPlayer(Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;)Z
|
|
||||||
public net.minecraft.world.level.BaseSpawner delay(Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;)V
|
|
||||||
|
|
||||||
# LootTable API
|
|
||||||
public org.bukkit.craftbukkit.block.CraftBlockEntityState getTileEntity()Lnet/minecraft/world/level/block/entity/BlockEntity;
|
|
||||||
public org.bukkit.craftbukkit.block.CraftLootable setLootTable(Lorg/bukkit/loot/LootTable;J)V
|
|
||||||
public org.bukkit.craftbukkit.entity.CraftMinecartContainer setLootTable(Lorg/bukkit/loot/LootTable;J)V
|
|
||||||
|
|
||||||
# Firework API
|
|
||||||
public net.minecraft.world.entity.projectile.FireworkRocketEntity attachedToEntity
|
|
||||||
|
|
||||||
# Add option to make parrots stay
|
|
||||||
public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V
|
|
||||||
|
|
||||||
# LivingEntity setkiller
|
|
||||||
public net.minecraft.world.entity.LivingEntity lastHurtByPlayerTime
|
|
||||||
|
|
||||||
# Fix client rendering skulls
|
|
||||||
public net.minecraft.world.item.ItemStack tag
|
|
||||||
|
|
||||||
# Async chunk io
|
|
||||||
public net.minecraft.server.level.ChunkMap structureManager
|
|
||||||
public net.minecraft.server.level.ChunkMap overworldDataStorage
|
|
||||||
public net.minecraft.server.level.ChunkMap getUpdatingChunkIfPresent(J)Lnet/minecraft/server/level/ChunkHolder;
|
|
||||||
public net.minecraft.server.level.ChunkMap getVisibleChunkIfPresent(J)Lnet/minecraft/server/level/ChunkHolder;
|
|
||||||
public net.minecraft.server.level.ServerChunkCache mainThreadProcessor
|
|
||||||
public-f net.minecraft.world.level.chunk.storage.RegionFileStorage
|
|
||||||
public net.minecraft.world.level.chunk.storage.RegionFileStorage getFile(Lnet/minecraft/world/level/ChunkPos;Z)Lnet/minecraft/world/level/chunk/storage/RegionFile;
|
|
||||||
public net.minecraft.world.level.chunk.storage.SectionStorage dirty
|
|
||||||
public net.minecraft.util.thread.BlockableEventLoop runAllTasks()V
|
|
||||||
public net.minecraft.server.level.ChunkMap getPoiManager()Lnet/minecraft/world/entity/ai/village/poi/PoiManager;
|
|
||||||
|
|
||||||
# Improve death events
|
|
||||||
public net.minecraft.world.entity.LivingEntity getDeathSound()Lnet/minecraft/sounds/SoundEvent;
|
|
||||||
public net.minecraft.world.entity.LivingEntity getSoundVolume()F
|
|
||||||
|
|
||||||
# Add sun related api
|
|
||||||
public net.minecraft.world.entity.Mob isSunBurnTick()Z
|
|
||||||
|
|
||||||
# Turtle API
|
|
||||||
public net.minecraft.world.entity.animal.Turtle getHomePos()Lnet/minecraft/core/BlockPos;
|
|
||||||
public net.minecraft.world.entity.animal.Turtle setHasEgg(Z)V
|
|
||||||
public net.minecraft.world.entity.animal.Turtle isGoingHome()Z
|
|
||||||
public net.minecraft.world.entity.animal.Turtle setGoingHome(Z)V
|
|
||||||
public net.minecraft.world.entity.animal.Turtle isTravelling()Z
|
|
||||||
public net.minecraft.world.entity.animal.Turtle setTravelling(Z)V
|
|
||||||
|
|
||||||
# Call player spectator target event
|
|
||||||
public net.minecraft.server.network.ServerGamePacketListenerImpl updateBookPages(Ljava/util/List;Ljava/util/function/UnaryOperator;Lnet/minecraft/world/item/ItemStack;ILnet/minecraft/world/item/ItemStack;)V
|
|
||||||
|
|
||||||
# Improve Server THread Pool
|
|
||||||
public net.minecraft.Util onThreadException(Ljava/lang/Thread;Ljava/lang/Throwable;)V
|
|
||||||
|
|
||||||
# Add more zombie API
|
|
||||||
public net.minecraft.world.entity.monster.Zombie isSunSensitive()Z
|
|
||||||
|
|
||||||
# Add PlayerConnectionCloseEvent
|
|
||||||
public net.minecraft.server.network.ServerLoginPacketListenerImpl$State
|
|
||||||
public net.minecraft.server.network.ServerLoginPacketListenerImpl state
|
|
||||||
public net.minecraft.server.network.ServerLoginPacketListenerImpl gameProfile
|
|
||||||
|
|
||||||
# Entity Activation Range 2.0
|
|
||||||
public net.minecraft.world.entity.Entity isInsidePortal
|
|
||||||
public net.minecraft.world.entity.Mob leashHolder
|
|
||||||
public net.minecraft.world.entity.LivingEntity jumping
|
|
||||||
|
|
||||||
# No-Tick view distance
|
|
||||||
public net.minecraft.server.level.ChunkHolder broadcast(Lnet/minecraft/network/protocol/Packet;Z)V
|
|
||||||
public net.minecraft.server.level.ChunkMap setViewDistance(I)V
|
|
||||||
public net.minecraft.server.level.ChunkMap readChunk(Lnet/minecraft/world/level/ChunkPos;)Lnet/minecraft/nbt/CompoundTag;
|
|
||||||
public net.minecraft.server.level.ChunkMap playerLoadedChunk(Lnet/minecraft/server/level/ServerPlayer;[Lnet/minecraft/network/protocol/Packet;Lnet/minecraft/world/level/chunk/LevelChunk;)V
|
|
||||||
public net.minecraft.server.level.ChunkMap mainThreadMailbox # todo one of these doesn't belong here
|
|
||||||
|
|
||||||
# Optimise TickListServer
|
|
||||||
public net.minecraft.world.level.ServerTickList saveTickList(Ljava/util/function/Function;Ljava/lang/Iterable;J)Lnet/minecraft/nbt/ListTag;
|
|
||||||
public net.minecraft.world.level.chunk.storage.EntityStorage level
|
|
||||||
|
|
||||||
# Don't move existing players to world spawn
|
|
||||||
public net.minecraft.server.level.ServerPlayer fudgeSpawnLocation(Lnet/minecraft/server/level/ServerLevel;)V
|
|
||||||
|
|
||||||
# Implement Player Client Options API
|
|
||||||
public net.minecraft.world.entity.player.Player DATA_PLAYER_MODE_CUSTOMISATION
|
|
||||||
|
|
||||||
# Fix Longstanding Broken behavior
|
|
||||||
public net.minecraft.server.level.ChunkMap addEntity(Lnet/minecraft/world/entity/Entity;)V
|
|
||||||
|
|
||||||
# Load Chunks for Login Async
|
|
||||||
public net.minecraft.server.level.ServerChunkCache runDistanceManagerUpdates()Z
|
|
||||||
public net.minecraft.server.level.ServerChunkCache$MainThreadExecutor # todo doesn't belong here but oh well
|
|
||||||
|
|
||||||
# Implement MobGoalApi
|
|
||||||
public net.minecraft.world.entity.ai.goal.GoalSelector availableGoals
|
|
||||||
|
|
||||||
# Add villager reputation API
|
|
||||||
public net.minecraft.world.entity.ai.gossip.GossipContainer$EntityGossips
|
|
||||||
public net.minecraft.world.entity.ai.gossip.GossipContainer$EntityGossips <init>()V
|
|
||||||
|
|
||||||
# Add entity liquid API
|
|
||||||
public net.minecraft.world.entity.Entity isInRain()Z
|
|
||||||
public net.minecraft.world.entity.Entity isInBubbleColumn()Z
|
|
||||||
|
|
||||||
# Allow delegation to vanilla chunk gen
|
|
||||||
public org.bukkit.craftbukkit.generator.CustomChunkGenerator delegate
|
|
||||||
|
|
||||||
# Optimize redstone algorithm
|
|
||||||
public net.minecraft.world.level.block.RedStoneWireBlock shouldSignal
|
|
||||||
|
|
||||||
# Add more Evoker API
|
|
||||||
public net.minecraft.world.entity.monster.Evoker setWololoTarget(Lnet/minecraft/world/entity/animal/Sheep;)V
|
|
||||||
public net.minecraft.world.entity.monster.Evoker getWololoTarget()Lnet/minecraft/world/entity/animal/Sheep;
|
|
||||||
|
|
||||||
# More lightning API
|
|
||||||
public net.minecraft.world.entity.LightningBolt life
|
|
||||||
public net.minecraft.world.entity.LightningBolt flashes
|
|
||||||
|
|
||||||
# Configurable door breaking difficulty
|
|
||||||
public net.minecraft.world.entity.monster.Vindicator DOOR_BREAKING_PREDICATE
|
|
||||||
public net.minecraft.world.entity.monster.Zombie DOOR_BREAKING_PREDICATE
|
|
||||||
|
|
||||||
# Optimize sending packets to nearby locations (sounds/effects)
|
|
||||||
public net.minecraft.server.level.ServerLevel players
|
|
||||||
|
|
||||||
# Item Rarity API
|
|
||||||
public net.minecraft.world.item.Item rarity
|
|
||||||
|
|
||||||
# More Enchantment API
|
|
||||||
public net.minecraft.world.item.enchantment.Enchantment slots
|
|
||||||
|
|
||||||
# Fix and optimise world force upgrading
|
|
||||||
public net.minecraft.util.worldupdate.WorldUpgrader REGEX
|
|
||||||
|
|
||||||
# More Lidded Block API
|
|
||||||
public net.minecraft.world.level.block.entity.EnderChestBlockEntity openersCounter
|
|
||||||
|
|
||||||
# Improve EntityShootBowEvent
|
|
||||||
public net.minecraft.world.entity.projectile.AbstractArrow getPickupItem()Lnet.minecraft.world.item.ItemStack;
|
|
||||||
|
|
||||||
# Implement Expanded ArmorStand API
|
|
||||||
public net.minecraft.world.entity.decoration.ArmorStand isDisabled(Lnet/minecraft/world/entity/EquipmentSlot;)Z
|
|
||||||
|
|
||||||
# Chunk debug command
|
|
||||||
public net.minecraft.server.level.ChunkMap entitiesInLevel
|
|
||||||
public net.minecraft.server.level.ServerLevel players
|
|
||||||
|
|
||||||
# Chunk priority urgency system
|
|
||||||
public net.minecraft.server.level.ChunkMap$ChunkDistanceManager
|
|
||||||
|
|
||||||
|
|
||||||
# Chunk debug command
|
|
||||||
public net.minecraft.server.level.Ticket createdTick
|
|
||||||
public net.minecraft.server.level.ServerChunkCache CHUNK_STATUSES
|
|
||||||
public net.minecraft.server.level.ChunkHolder pos
|
|
||||||
|
|
||||||
# Incremental chunk saving
|
|
||||||
public net.minecraft.world.level.entity.PersistentEntitySectionManager storeChunkSections(JLjava/util/function/Consumer;)Z
|
|
||||||
|
|
||||||
# Mending XP API
|
|
||||||
public net.minecraft.world.entity.ExperienceOrb durabilityToXp(I)I
|
|
||||||
public net.minecraft.world.entity.ExperienceOrb xpToDurability(I)I
|
|
||||||
|
|
||||||
# Implement an API for CanPlaceOn and CanDestroy NBT values
|
|
||||||
public net.minecraft.commands.arguments.blocks.BlockStateParser id
|
|
||||||
|
|
||||||
# Villager Restock API
|
|
||||||
public net.minecraft.world.entity.npc.Villager numberOfRestocksToday
|
|
||||||
|
|
||||||
# Mob Pathfinding API
|
|
||||||
public net.minecraft.world.entity.ai.navigation.PathNavigation pathFinder
|
|
||||||
public net.minecraft.world.level.pathfinder.PathFinder nodeEvaluator
|
|
||||||
public net.minecraft.world.level.pathfinder.Path nodes
|
|
||||||
|
|
||||||
# Add more Witch API
|
|
||||||
public net.minecraft.world.entity.monster.Witch usingTime
|
|
||||||
|
|
||||||
# PlayerDeathEvent#getItemsToKeep
|
|
||||||
public net.minecraft.world.entity.player.Inventory compartments
|
|
||||||
|
|
||||||
# Missing Entity Behavior API
|
|
||||||
public net.minecraft.world.entity.animal.Fox isDefending()Z
|
|
||||||
public net.minecraft.world.entity.animal.Fox setDefending(Z)V
|
|
||||||
public net.minecraft.world.entity.animal.Fox isFaceplanted()Z
|
|
||||||
public net.minecraft.world.entity.animal.Fox setFaceplanted(Z)V
|
|
||||||
public net.minecraft.world.entity.animal.Panda getEatCounter()I
|
|
||||||
public net.minecraft.world.entity.animal.Panda setEatCounter(I)V
|
|
||||||
public net.minecraft.world.entity.animal.Bee isRolling()Z
|
|
||||||
public net.minecraft.world.entity.animal.Bee setRolling(Z)V
|
|
||||||
public net.minecraft.world.entity.monster.piglin.Piglin isChargingCrossbow()Z
|
|
||||||
public net.minecraft.world.entity.monster.Vex hasLimitedLife
|
|
||||||
public net.minecraft.world.entity.monster.Vex limitedLifeTicks
|
|
||||||
|
|
||||||
# Cook speed multipler API
|
|
||||||
public net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity recipeType
|
|
||||||
|
|
||||||
# Add methods to get translation keys
|
|
||||||
public org.bukkit.craftbukkit.inventory.CraftMetaFirework
|
|
||||||
public org.bukkit.craftbukkit.inventory.CraftMetaFirework getNBT(Lorg/bukkit/FireworkEffect$Type;)I
|
|
||||||
|
|
||||||
# Vanilla command permission fixes
|
|
||||||
public-f com.mojang.brigadier.tree.CommandNode requirement
|
|
||||||
|
|
||||||
# Block Enderpearl Travel Exploit
|
|
||||||
public net.minecraft.world.entity.projectile.Projectile cachedOwner
|
|
||||||
public net.minecraft.world.entity.projectile.Projectile ownerUUID
|
|
||||||
|
|
||||||
# Add missing display slots
|
|
||||||
public org.bukkit.craftbukkit.scoreboard.CraftScoreboardTranslations
|
|
||||||
public org.bukkit.craftbukkit.scoreboard.CraftScoreboardTranslations toBukkitSlot(I)Lorg/bukkit/scoreboard/DisplaySlot;
|
|
||||||
public org.bukkit.craftbukkit.scoreboard.CraftScoreboardTranslations fromBukkitSlot(Lorg/bukkit/scoreboard/DisplaySlot;)I
|
|
||||||
|
|
||||||
# Add methods to find targets for lightning strikes
|
|
||||||
public net.minecraft.server.level.ServerLevel findLightningRod(Lnet/minecraft/core/BlockPos;)Ljava/util/Optional;
|
|
||||||
|
|
||||||
# Improve CraftBlockStates
|
|
||||||
public net.minecraft.world.level.block.entity.BlockEntityType validBlocks
|
|
||||||
|
|
||||||
# Default entity attributes
|
|
||||||
public net.minecraft.world.entity.ai.attributes.AttributeSupplier instances
|
|
||||||
|
|
||||||
# Add ItemFactory#getSpawnEgg API
|
|
||||||
public net.minecraft.world.item.SpawnEggItem BY_ID
|
|
||||||
|
|
||||||
# Zombie API - breaking doors
|
|
||||||
public net.minecraft.world.entity.monster.Zombie supportsBreakDoorGoal()Z
|
|
||||||
|
|
||||||
# Add Material#hasCollision
|
|
||||||
public net.minecraft.world.level.block.state.BlockBehaviour hasCollision
|
|
||||||
|
|
||||||
# add per world spawn limits
|
|
||||||
public net.minecraft.world.level.NaturalSpawner SPAWNING_CATEGORIES
|
|
||||||
|
|
||||||
# Optimize isValidLocation
|
|
||||||
public net.minecraft.world.level.chunk.LevelChunkSection states
|
|
||||||
|
|
||||||
# Player Profile API
|
|
||||||
public-f net.minecraft.world.entity.player.Player gameProfile
|
|
||||||
public org.bukkit.craftbukkit.profile.CraftProfileProperty
|
|
||||||
public org.bukkit.craftbukkit.profile.CraftPlayerTextures
|
|
||||||
public org.bukkit.craftbukkit.profile.CraftPlayerTextures copyFrom(Lorg/bukkit/profile/PlayerTextures;)V
|
|
||||||
public org.bukkit.craftbukkit.profile.CraftPlayerTextures rebuildPropertyIfDirty()V
|
|
||||||
public org.bukkit.craftbukkit.profile.CraftPlayerProfile getProperty(Ljava/lang/String;)Lcom/mojang/authlib/properties/Property;
|
|
||||||
public org.bukkit.craftbukkit.profile.CraftPlayerProfile setProperty(Ljava/lang/String;Lcom/mojang/authlib/properties/Property;)V
|
|
||||||
public org.bukkit.craftbukkit.profile.CraftPlayerProfile toString(Lcom/mojang/authlib/properties/PropertyMap;)Ljava/lang/String;
|
|
||||||
public org.bukkit.craftbukkit.profile.CraftPlayerProfile equals(Lcom/mojang/authlib/properties/PropertyMap;Lcom/mojang/authlib/properties/PropertyMap;)Z
|
|
||||||
public org.bukkit.craftbukkit.profile.CraftPlayerProfile hashCode(Lcom/mojang/authlib/properties/PropertyMap;)I
|
|
||||||
|
|
||||||
# Flat bedrock generator settings
|
|
||||||
public net.minecraft.world.level.levelgen.SurfaceRules$Condition
|
|
||||||
public net.minecraft.world.level.levelgen.SurfaceRules$Context
|
|
||||||
public net.minecraft.world.level.levelgen.SurfaceRules$Context blockX
|
|
||||||
public net.minecraft.world.level.levelgen.SurfaceRules$Context blockY
|
|
||||||
public net.minecraft.world.level.levelgen.SurfaceRules$Context blockZ
|
|
||||||
public net.minecraft.world.level.levelgen.SurfaceRules$Context context
|
|
||||||
public net.minecraft.world.level.levelgen.SurfaceRules$Context randomState
|
|
||||||
public net.minecraft.world.level.levelgen.SurfaceRules$LazyYCondition
|
|
||||||
public net.minecraft.world.level.levelgen.SurfaceRules$LazyCondition
|
|
||||||
public net.minecraft.world.level.levelgen.SurfaceRules$VerticalGradientConditionSource
|
|
||||||
public net.minecraft.world.level.levelgen.SurfaceRules$SurfaceRule
|
|
||||||
public net.minecraft.world.level.levelgen.SurfaceSystem getOrCreateRandomFactory(Lnet/minecraft/resources/ResourceLocation;)Lnet/minecraft/world/level/levelgen/PositionalRandomFactory;
|
|
||||||
|
|
||||||
# Fix removing recipes
|
|
||||||
public net.minecraft.world.item.crafting.RecipeManager byName
|
|
||||||
|
|
||||||
# Entity powdered snow API
|
|
||||||
public net.minecraft.world.entity.monster.Skeleton inPowderSnowTime
|
|
||||||
|
|
||||||
# Add health methods for item entities
|
|
||||||
public net.minecraft.world.entity.item.ItemEntity health
|
|
||||||
|
|
||||||
# Fix riding distance statistics
|
|
||||||
public net.minecraft.world.entity.player.Player checkRidingStatistics(DDD)V
|
|
||||||
|
|
||||||
# Fix NotePlayEvent
|
|
||||||
public org.bukkit.craftbukkit.block.data.CraftBlockData toNMS(Ljava/lang/Enum;Ljava/lang/Class;)Ljava/lang/Enum;
|
|
||||||
|
|
||||||
# Stronghold seed configuration
|
|
||||||
public-f net.minecraft.world.level.chunk.ChunkGenerator strongholdSeed
|
|
||||||
|
|
||||||
# More Sculk Sensor API
|
|
||||||
public-f net.minecraft.world.level.gameevent.vibrations.VibrationListener listenerRange
|
|
||||||
|
|
||||||
# Fix custom inventory holders
|
|
||||||
public-f net.minecraft.world.inventory.AbstractContainerMenu dataSlots
|
|
||||||
public-f net.minecraft.world.inventory.AbstractContainerMenu remoteDataSlots
|
|
||||||
|
|
||||||
# Fix falling block spawn methods
|
|
||||||
public net.minecraft.world.entity.item.FallingBlockEntity <init>(Lnet/minecraft/world/level/Level;DDDLnet/minecraft/world/level/block/state/BlockState;)V
|
|
||||||
|
|
||||||
# Fix cancelling ProjectileHitEvent for piercing arrows
|
|
||||||
protected net.minecraft.world.entity.projectile.Projectile hitCancelled
|
|
||||||
|
|
||||||
# Expose firework item directly + manually setting flight ticks
|
|
||||||
public net.minecraft.world.entity.projectile.FireworkRocketEntity life
|
|
||||||
|
|
||||||
# More Projectile API
|
|
||||||
public net.minecraft.world.entity.projectile.FishingHook timeUntilLured
|
|
||||||
|
|
||||||
# Teleport API
|
|
||||||
public net.minecraft.server.network.ServerGamePacketListenerImpl internalTeleport(DDDFFLjava/util/Set;Z)V
|
|
||||||
|
|
||||||
|
@ -21,8 +21,8 @@ c net/minecraft/world/level/chunk/LevelChunk net/minecraft/world/level/chunk/Chu
|
|||||||
|
|
||||||
# See mappings-patch.tiny
|
# See mappings-patch.tiny
|
||||||
c net/minecraft/server/level/ChunkMap net/minecraft/server/level/PlayerChunkMap
|
c net/minecraft/server/level/ChunkMap net/minecraft/server/level/PlayerChunkMap
|
||||||
f Lnet/minecraft/server/level/ChunkMap$ChunkDistanceManager; distanceManager F
|
f Lnet/minecraft/server/level/ChunkMap$ChunkDistanceManager; distanceManager G
|
||||||
|
|
||||||
# Paper changes type
|
# Paper changes type
|
||||||
c net/minecraft/core/MappedRegistry net/minecraft/core/RegistryMaterials
|
c net/minecraft/core/MappedRegistry net/minecraft/core/RegistryMaterials
|
||||||
f Lit/unimi/dsi/fastutil/objects/Reference2IntOpenHashMap; toId bT
|
f Lit/unimi/dsi/fastutil/objects/Reference2IntOpenHashMap; toId e
|
||||||
|
@ -5,7 +5,7 @@ plugins {
|
|||||||
java
|
java
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
id("com.github.johnrengelman.shadow") version "7.1.2" apply false
|
id("com.github.johnrengelman.shadow") version "7.1.2" apply false
|
||||||
id("io.papermc.paperweight.core") version "1.3.8"
|
id("io.papermc.paperweight.core") version "1.4.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
@ -61,9 +61,9 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
paramMappings("net.fabricmc:yarn:1.19.2+build.1:mergedv2")
|
paramMappings("net.fabricmc:yarn:1.19.3+build.1:mergedv2")
|
||||||
remapper("net.fabricmc:tiny-remapper:0.8.2:fat")
|
remapper("net.fabricmc:tiny-remapper:0.8.6:fat")
|
||||||
decompiler("net.minecraftforge:forgeflower:1.5.605.7")
|
decompiler("net.minecraftforge:forgeflower:2.0.605.1")
|
||||||
spigotDecompiler("io.papermc:patched-spigot-fernflower:0.1+build.6")
|
spigotDecompiler("io.papermc:patched-spigot-fernflower:0.1+build.6")
|
||||||
paperclip("io.papermc:paperclip:3.0.2")
|
paperclip("io.papermc:paperclip:3.0.2")
|
||||||
}
|
}
|
||||||
@ -131,6 +131,11 @@ allprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.collectAtsFromPatches {
|
||||||
|
// Uncomment while updating for a new Minecraft version
|
||||||
|
//extraPatchDir.set(layout.projectDirectory.dir("patches/unapplied/server"))
|
||||||
|
}
|
||||||
|
|
||||||
tasks.register("printMinecraftVersion") {
|
tasks.register("printMinecraftVersion") {
|
||||||
doLast {
|
doLast {
|
||||||
println(providers.gradleProperty("mcVersion").get().trim())
|
println(providers.gradleProperty("mcVersion").get().trim())
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
group=io.papermc.paper
|
group=io.papermc.paper
|
||||||
version=1.19.2-R0.1-SNAPSHOT
|
version=1.19.3-R0.1-SNAPSHOT
|
||||||
mcVersion=1.19.2
|
mcVersion=1.19.3
|
||||||
|
|
||||||
org.gradle.caching=true
|
org.gradle.caching=true
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binäre Datei nicht angezeigt.
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
|
||||||
|
networkTimeout=10000
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
18
gradlew
vendored
18
gradlew
vendored
@ -55,7 +55,7 @@
|
|||||||
# Darwin, MinGW, and NonStop.
|
# Darwin, MinGW, and NonStop.
|
||||||
#
|
#
|
||||||
# (3) This script is generated from the Groovy template
|
# (3) This script is generated from the Groovy template
|
||||||
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
# within the Gradle project.
|
# within the Gradle project.
|
||||||
#
|
#
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
@ -80,10 +80,10 @@ do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
# This is normally unused
|
||||||
|
# shellcheck disable=SC2034
|
||||||
APP_NAME="Gradle"
|
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
|
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||||
|
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
# 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"'
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
@ -143,12 +143,16 @@ fi
|
|||||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||||
case $MAX_FD in #(
|
case $MAX_FD in #(
|
||||||
max*)
|
max*)
|
||||||
|
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||||
|
# shellcheck disable=SC3045
|
||||||
MAX_FD=$( ulimit -H -n ) ||
|
MAX_FD=$( ulimit -H -n ) ||
|
||||||
warn "Could not query maximum file descriptor limit"
|
warn "Could not query maximum file descriptor limit"
|
||||||
esac
|
esac
|
||||||
case $MAX_FD in #(
|
case $MAX_FD in #(
|
||||||
'' | soft) :;; #(
|
'' | soft) :;; #(
|
||||||
*)
|
*)
|
||||||
|
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||||
|
# shellcheck disable=SC3045
|
||||||
ulimit -n "$MAX_FD" ||
|
ulimit -n "$MAX_FD" ||
|
||||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||||
esac
|
esac
|
||||||
@ -205,6 +209,12 @@ set -- \
|
|||||||
org.gradle.wrapper.GradleWrapperMain \
|
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.
|
# Use "xargs" to parse quoted args.
|
||||||
#
|
#
|
||||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||||
|
15
gradlew.bat
vendored
15
gradlew.bat
vendored
@ -14,7 +14,7 @@
|
|||||||
@rem limitations under the License.
|
@rem limitations under the License.
|
||||||
@rem
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%" == "" @echo off
|
@if "%DEBUG%"=="" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
@rem
|
@rem
|
||||||
@rem Gradle startup script for Windows
|
@rem Gradle startup script for Windows
|
||||||
@ -25,7 +25,8 @@
|
|||||||
if "%OS%"=="Windows_NT" setlocal
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
set DIRNAME=%~dp0
|
||||||
if "%DIRNAME%" == "" set DIRNAME=.
|
if "%DIRNAME%"=="" set DIRNAME=.
|
||||||
|
@rem This is normally unused
|
||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
|
|||||||
|
|
||||||
set JAVA_EXE=java.exe
|
set JAVA_EXE=java.exe
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if "%ERRORLEVEL%" == "0" goto execute
|
if %ERRORLEVEL% equ 0 goto execute
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
|||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||||
|
|
||||||
:fail
|
:fail
|
||||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
rem the _cmd.exe /c_ return code!
|
rem the _cmd.exe /c_ return code!
|
||||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
set EXIT_CODE=%ERRORLEVEL%
|
||||||
exit /b 1
|
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||||
|
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||||
|
exit /b %EXIT_CODE%
|
||||||
|
|
||||||
:mainEnd
|
:mainEnd
|
||||||
if "%OS%"=="Windows_NT" endlocal
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
@ -27,7 +27,7 @@ index 11038da2e071699d6561a331565db0c8d7850d0e..317acfec5894101294a55abff6181943
|
|||||||
+/.factorypath
|
+/.factorypath
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..16776e693165758e47152eb6726969426f180f14
|
index 0000000000000000000000000000000000000000..9686f621c7b837a7a38ffb2fea10ae492b18556d
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -0,0 +1,81 @@
|
@@ -0,0 +1,81 @@
|
||||||
@ -43,10 +43,10 @@ index 0000000000000000000000000000000000000000..16776e693165758e47152eb672696942
|
|||||||
+
|
+
|
||||||
+dependencies {
|
+dependencies {
|
||||||
+ // api dependencies are listed transitively to API consumers
|
+ // api dependencies are listed transitively to API consumers
|
||||||
+ api("com.google.guava:guava:31.0.1-jre")
|
+ api("com.google.guava:guava:31.1-jre")
|
||||||
+ api("com.google.code.gson:gson:2.8.9")
|
+ api("com.google.code.gson:gson:2.10")
|
||||||
+ api("net.md-5:bungeecord-chat:1.16-R0.4")
|
+ api("net.md-5:bungeecord-chat:1.16-R0.4")
|
||||||
+ api("org.yaml:snakeyaml:1.32")
|
+ api("org.yaml:snakeyaml:1.33")
|
||||||
+
|
+
|
||||||
+ compileOnly("org.apache.maven:maven-resolver-provider:3.8.5")
|
+ compileOnly("org.apache.maven:maven-resolver-provider:3.8.5")
|
||||||
+ compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3")
|
+ compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3")
|
||||||
@ -96,7 +96,7 @@ index 0000000000000000000000000000000000000000..16776e693165758e47152eb672696942
|
|||||||
+ options.isDocFilesSubDirs = true
|
+ options.isDocFilesSubDirs = true
|
||||||
+ options.links(
|
+ options.links(
|
||||||
+ "https://guava.dev/releases/31.0.1-jre/api/docs/",
|
+ "https://guava.dev/releases/31.0.1-jre/api/docs/",
|
||||||
+ "https://javadoc.io/doc/org.yaml/snakeyaml/1.30/",
|
+ "https://javadoc.io/doc/org.yaml/snakeyaml/1.33/",
|
||||||
+ "https://javadoc.io/doc/org.jetbrains/annotations-java5/23.0.0/",
|
+ "https://javadoc.io/doc/org.jetbrains/annotations-java5/23.0.0/",
|
||||||
+ "https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/",
|
+ "https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/",
|
||||||
+ )
|
+ )
|
||||||
@ -114,7 +114,7 @@ index 0000000000000000000000000000000000000000..16776e693165758e47152eb672696942
|
|||||||
+}
|
+}
|
||||||
diff --git a/pom.xml b/pom.xml
|
diff --git a/pom.xml b/pom.xml
|
||||||
deleted file mode 100644
|
deleted file mode 100644
|
||||||
index 9909fc466d96023f0b574a9bd2a2330d433d4400..0000000000000000000000000000000000000000
|
index 389f3761876d2a667309d317d1a99b545f36771a..0000000000000000000000000000000000000000
|
||||||
--- a/pom.xml
|
--- a/pom.xml
|
||||||
+++ /dev/null
|
+++ /dev/null
|
||||||
@@ -1,252 +0,0 @@
|
@@ -1,252 +0,0 @@
|
||||||
@ -125,7 +125,7 @@ index 9909fc466d96023f0b574a9bd2a2330d433d4400..00000000000000000000000000000000
|
|||||||
-
|
-
|
||||||
- <groupId>org.spigotmc</groupId>
|
- <groupId>org.spigotmc</groupId>
|
||||||
- <artifactId>spigot-api</artifactId>
|
- <artifactId>spigot-api</artifactId>
|
||||||
- <version>1.19.2-R0.1-SNAPSHOT</version>
|
- <version>1.19.3-R0.1-SNAPSHOT</version>
|
||||||
- <packaging>jar</packaging>
|
- <packaging>jar</packaging>
|
||||||
-
|
-
|
||||||
- <name>Spigot-API</name>
|
- <name>Spigot-API</name>
|
||||||
@ -155,14 +155,14 @@ index 9909fc466d96023f0b574a9bd2a2330d433d4400..00000000000000000000000000000000
|
|||||||
- <dependency>
|
- <dependency>
|
||||||
- <groupId>com.google.guava</groupId>
|
- <groupId>com.google.guava</groupId>
|
||||||
- <artifactId>guava</artifactId>
|
- <artifactId>guava</artifactId>
|
||||||
- <version>31.0.1-jre</version>
|
- <version>31.1-jre</version>
|
||||||
- <scope>compile</scope>
|
- <scope>compile</scope>
|
||||||
- </dependency>
|
- </dependency>
|
||||||
- <!-- bundled with Minecraft, should be kept in sync -->
|
- <!-- bundled with Minecraft, should be kept in sync -->
|
||||||
- <dependency>
|
- <dependency>
|
||||||
- <groupId>com.google.code.gson</groupId>
|
- <groupId>com.google.code.gson</groupId>
|
||||||
- <artifactId>gson</artifactId>
|
- <artifactId>gson</artifactId>
|
||||||
- <version>2.8.9</version>
|
- <version>2.10</version>
|
||||||
- <scope>compile</scope>
|
- <scope>compile</scope>
|
||||||
- </dependency>
|
- </dependency>
|
||||||
- <dependency>
|
- <dependency>
|
||||||
@ -175,7 +175,7 @@ index 9909fc466d96023f0b574a9bd2a2330d433d4400..00000000000000000000000000000000
|
|||||||
- <dependency>
|
- <dependency>
|
||||||
- <groupId>org.yaml</groupId>
|
- <groupId>org.yaml</groupId>
|
||||||
- <artifactId>snakeyaml</artifactId>
|
- <artifactId>snakeyaml</artifactId>
|
||||||
- <version>1.32</version>
|
- <version>1.33</version>
|
||||||
- <scope>compile</scope>
|
- <scope>compile</scope>
|
||||||
- </dependency>
|
- </dependency>
|
||||||
- <!-- not part of the API proper -->
|
- <!-- not part of the API proper -->
|
||||||
|
@ -5,13 +5,13 @@ Subject: [PATCH] Build system changes
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index 16776e693165758e47152eb6726969426f180f14..850afb1ae533bfd80ba4cc062a4394123ad22dba 100644
|
index 9686f621c7b837a7a38ffb2fea10ae492b18556d..2b3288057d67e5add4e22e6b7072527057bcd808 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -14,15 +14,27 @@ dependencies {
|
@@ -14,15 +14,27 @@ dependencies {
|
||||||
api("com.google.code.gson:gson:2.8.9")
|
api("com.google.code.gson:gson:2.10")
|
||||||
api("net.md-5:bungeecord-chat:1.16-R0.4")
|
api("net.md-5:bungeecord-chat:1.16-R0.4")
|
||||||
api("org.yaml:snakeyaml:1.32")
|
api("org.yaml:snakeyaml:1.33")
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ api("com.googlecode.json-simple:json-simple:1.1.1") {
|
+ api("com.googlecode.json-simple:json-simple:1.1.1") {
|
||||||
+ isTransitive = false // includes junit
|
+ isTransitive = false // includes junit
|
||||||
@ -40,7 +40,7 @@ index 16776e693165758e47152eb6726969426f180f14..850afb1ae533bfd80ba4cc062a439412
|
|||||||
@@ -64,7 +76,7 @@ tasks.withType<Javadoc> {
|
@@ -64,7 +76,7 @@ tasks.withType<Javadoc> {
|
||||||
options.links(
|
options.links(
|
||||||
"https://guava.dev/releases/31.0.1-jre/api/docs/",
|
"https://guava.dev/releases/31.0.1-jre/api/docs/",
|
||||||
"https://javadoc.io/doc/org.yaml/snakeyaml/1.30/",
|
"https://javadoc.io/doc/org.yaml/snakeyaml/1.33/",
|
||||||
- "https://javadoc.io/doc/org.jetbrains/annotations-java5/23.0.0/",
|
- "https://javadoc.io/doc/org.jetbrains/annotations-java5/23.0.0/",
|
||||||
+ "https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/", // Paper - we don't want Java 5 annotations
|
+ "https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/", // Paper - we don't want Java 5 annotations
|
||||||
"https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/",
|
"https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/",
|
||||||
|
@ -7,14 +7,14 @@ Co-authored-by: zml <zml@stellardrift.ca>
|
|||||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index 66430df2597f8c21c65f18e19d23e19bb8de8dbf..e1cd510edcd3809e18500451067314cd56f543b6 100644
|
index c2928c6f2d54de0ffde164fd9407085cf9fa18a6..c9f9174a085174b96897c013e0ecb79738c2e9e3 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -8,17 +8,37 @@ java {
|
@@ -8,17 +8,37 @@ java {
|
||||||
withJavadocJar()
|
withJavadocJar()
|
||||||
}
|
}
|
||||||
|
|
||||||
+val adventureVersion = "4.11.0"
|
+val adventureVersion = "4.12.0"
|
||||||
+val apiAndDocs: Configuration by configurations.creating {
|
+val apiAndDocs: Configuration by configurations.creating {
|
||||||
+ attributes {
|
+ attributes {
|
||||||
+ attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION))
|
+ attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION))
|
||||||
@ -29,11 +29,11 @@ index 66430df2597f8c21c65f18e19d23e19bb8de8dbf..e1cd510edcd3809e18500451067314cd
|
|||||||
+
|
+
|
||||||
dependencies {
|
dependencies {
|
||||||
// api dependencies are listed transitively to API consumers
|
// api dependencies are listed transitively to API consumers
|
||||||
api("com.google.guava:guava:31.0.1-jre")
|
api("com.google.guava:guava:31.1-jre")
|
||||||
api("com.google.code.gson:gson:2.8.9")
|
api("com.google.code.gson:gson:2.10")
|
||||||
- api("net.md-5:bungeecord-chat:1.16-R0.4")
|
- api("net.md-5:bungeecord-chat:1.16-R0.4")
|
||||||
+ api("net.md-5:bungeecord-chat:1.16-R0.4-deprecated+build.6") // Paper
|
+ api("net.md-5:bungeecord-chat:1.16-R0.4-deprecated+build.6") // Paper
|
||||||
api("org.yaml:snakeyaml:1.32")
|
api("org.yaml:snakeyaml:1.33")
|
||||||
// Paper start
|
// Paper start
|
||||||
api("com.googlecode.json-simple:json-simple:1.1.1") {
|
api("com.googlecode.json-simple:json-simple:1.1.1") {
|
||||||
isTransitive = false // includes junit
|
isTransitive = false // includes junit
|
||||||
@ -51,7 +51,7 @@ index 66430df2597f8c21c65f18e19d23e19bb8de8dbf..e1cd510edcd3809e18500451067314cd
|
|||||||
compileOnly("org.apache.maven:maven-resolver-provider:3.8.5")
|
compileOnly("org.apache.maven:maven-resolver-provider:3.8.5")
|
||||||
@@ -78,9 +98,24 @@ tasks.withType<Javadoc> {
|
@@ -78,9 +98,24 @@ tasks.withType<Javadoc> {
|
||||||
"https://guava.dev/releases/31.0.1-jre/api/docs/",
|
"https://guava.dev/releases/31.0.1-jre/api/docs/",
|
||||||
"https://javadoc.io/doc/org.yaml/snakeyaml/1.30/",
|
"https://javadoc.io/doc/org.yaml/snakeyaml/1.33/",
|
||||||
"https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/", // Paper - we don't want Java 5 annotations
|
"https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/", // Paper - we don't want Java 5 annotations
|
||||||
- "https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/",
|
- "https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/",
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
@ -198,21 +198,23 @@ index 0000000000000000000000000000000000000000..9adeb880f7948f937891d83e256c808b
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/io/papermc/paper/event/player/AbstractChatEvent.java b/src/main/java/io/papermc/paper/event/player/AbstractChatEvent.java
|
diff --git a/src/main/java/io/papermc/paper/event/player/AbstractChatEvent.java b/src/main/java/io/papermc/paper/event/player/AbstractChatEvent.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..fa03a5cb2d3e3e0a60d84bacc911d96c454f81da
|
index 0000000000000000000000000000000000000000..e7e13011c76285681ad420e6f356f6b83045d31a
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/io/papermc/paper/event/player/AbstractChatEvent.java
|
+++ b/src/main/java/io/papermc/paper/event/player/AbstractChatEvent.java
|
||||||
@@ -0,0 +1,112 @@
|
@@ -0,0 +1,128 @@
|
||||||
+package io.papermc.paper.event.player;
|
+package io.papermc.paper.event.player;
|
||||||
+
|
+
|
||||||
+import java.util.Set;
|
|
||||||
+import io.papermc.paper.chat.ChatRenderer;
|
+import io.papermc.paper.chat.ChatRenderer;
|
||||||
+import net.kyori.adventure.audience.Audience;
|
+import net.kyori.adventure.audience.Audience;
|
||||||
|
+import net.kyori.adventure.chat.SignedMessage;
|
||||||
+import net.kyori.adventure.text.Component;
|
+import net.kyori.adventure.text.Component;
|
||||||
+import org.bukkit.entity.Player;
|
+import org.bukkit.entity.Player;
|
||||||
+import org.bukkit.event.Cancellable;
|
+import org.bukkit.event.Cancellable;
|
||||||
+import org.bukkit.event.player.PlayerEvent;
|
+import org.bukkit.event.player.PlayerEvent;
|
||||||
+import org.jetbrains.annotations.NotNull;
|
+import org.jetbrains.annotations.NotNull;
|
||||||
+
|
+
|
||||||
|
+import java.util.Set;
|
||||||
|
+
|
||||||
+import static java.util.Objects.requireNonNull;
|
+import static java.util.Objects.requireNonNull;
|
||||||
+
|
+
|
||||||
+/**
|
+/**
|
||||||
@ -221,16 +223,18 @@ index 0000000000000000000000000000000000000000..fa03a5cb2d3e3e0a60d84bacc911d96c
|
|||||||
+public abstract class AbstractChatEvent extends PlayerEvent implements Cancellable {
|
+public abstract class AbstractChatEvent extends PlayerEvent implements Cancellable {
|
||||||
+ private final Set<Audience> viewers;
|
+ private final Set<Audience> viewers;
|
||||||
+ private final Component originalMessage;
|
+ private final Component originalMessage;
|
||||||
|
+ private final SignedMessage signedMessage;
|
||||||
+ private ChatRenderer renderer;
|
+ private ChatRenderer renderer;
|
||||||
+ private Component message;
|
+ private Component message;
|
||||||
+ private boolean cancelled = false;
|
+ private boolean cancelled = false;
|
||||||
+
|
+
|
||||||
+ AbstractChatEvent(final boolean async, final @NotNull Player player, final @NotNull Set<Audience> viewers, final @NotNull ChatRenderer renderer, final @NotNull Component message, final @NotNull Component originalMessage) {
|
+ AbstractChatEvent(final boolean async, final @NotNull Player player, final @NotNull Set<Audience> viewers, final @NotNull ChatRenderer renderer, final @NotNull Component message, final @NotNull Component originalMessage, final @NotNull SignedMessage signedMessage) {
|
||||||
+ super(player, async);
|
+ super(player, async);
|
||||||
+ this.viewers = viewers;
|
+ this.viewers = viewers;
|
||||||
+ this.renderer = renderer;
|
+ this.renderer = renderer;
|
||||||
+ this.message = message;
|
+ this.message = message;
|
||||||
+ this.originalMessage = originalMessage;
|
+ this.originalMessage = originalMessage;
|
||||||
|
+ this.signedMessage = signedMessage;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
@ -304,6 +308,18 @@ index 0000000000000000000000000000000000000000..fa03a5cb2d3e3e0a60d84bacc911d96c
|
|||||||
+ return this.originalMessage;
|
+ return this.originalMessage;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Gets the signed message.
|
||||||
|
+ * Changes made in this event will <b>not</b> update
|
||||||
|
+ * the signed message.
|
||||||
|
+ *
|
||||||
|
+ * @return the signed message
|
||||||
|
+ */
|
||||||
|
+ @NotNull
|
||||||
|
+ public final SignedMessage signedMessage() {
|
||||||
|
+ return this.signedMessage;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public final boolean isCancelled() {
|
+ public final boolean isCancelled() {
|
||||||
+ return this.cancelled;
|
+ return this.cancelled;
|
||||||
@ -316,10 +332,10 @@ index 0000000000000000000000000000000000000000..fa03a5cb2d3e3e0a60d84bacc911d96c
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/io/papermc/paper/event/player/AsyncChatCommandDecorateEvent.java b/src/main/java/io/papermc/paper/event/player/AsyncChatCommandDecorateEvent.java
|
diff --git a/src/main/java/io/papermc/paper/event/player/AsyncChatCommandDecorateEvent.java b/src/main/java/io/papermc/paper/event/player/AsyncChatCommandDecorateEvent.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..bd216f7333795fc6bc5bec593f9cc0e3c2c1a27e
|
index 0000000000000000000000000000000000000000..feece00981ebf932e64760e7a10a04ad080d0228
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/io/papermc/paper/event/player/AsyncChatCommandDecorateEvent.java
|
+++ b/src/main/java/io/papermc/paper/event/player/AsyncChatCommandDecorateEvent.java
|
||||||
@@ -0,0 +1,27 @@
|
@@ -0,0 +1,28 @@
|
||||||
+package io.papermc.paper.event.player;
|
+package io.papermc.paper.event.player;
|
||||||
+
|
+
|
||||||
+import net.kyori.adventure.text.Component;
|
+import net.kyori.adventure.text.Component;
|
||||||
@ -334,8 +350,9 @@ index 0000000000000000000000000000000000000000..bd216f7333795fc6bc5bec593f9cc0e3
|
|||||||
+
|
+
|
||||||
+ private static final HandlerList HANDLER_LIST = new HandlerList();
|
+ private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||||
+
|
+
|
||||||
+ public AsyncChatCommandDecorateEvent(boolean async, @Nullable Player player, @NotNull Component originalMessage, boolean isPreview, @NotNull Component result) {
|
+ @ApiStatus.Internal
|
||||||
+ super(async, player, originalMessage, isPreview, result);
|
+ public AsyncChatCommandDecorateEvent(boolean async, @Nullable Player player, @NotNull Component originalMessage, @NotNull Component result) {
|
||||||
|
+ super(async, player, originalMessage, result);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
@ -349,10 +366,10 @@ index 0000000000000000000000000000000000000000..bd216f7333795fc6bc5bec593f9cc0e3
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/io/papermc/paper/event/player/AsyncChatDecorateEvent.java b/src/main/java/io/papermc/paper/event/player/AsyncChatDecorateEvent.java
|
diff --git a/src/main/java/io/papermc/paper/event/player/AsyncChatDecorateEvent.java b/src/main/java/io/papermc/paper/event/player/AsyncChatDecorateEvent.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..347122b12ad98115133ef98db69b271ee0cec194
|
index 0000000000000000000000000000000000000000..9a962337948810b00ceae1124962fcc7058b70ad
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/io/papermc/paper/event/player/AsyncChatDecorateEvent.java
|
+++ b/src/main/java/io/papermc/paper/event/player/AsyncChatDecorateEvent.java
|
||||||
@@ -0,0 +1,119 @@
|
@@ -0,0 +1,116 @@
|
||||||
+package io.papermc.paper.event.player;
|
+package io.papermc.paper.event.player;
|
||||||
+
|
+
|
||||||
+import net.kyori.adventure.text.Component;
|
+import net.kyori.adventure.text.Component;
|
||||||
@ -361,20 +378,16 @@ index 0000000000000000000000000000000000000000..347122b12ad98115133ef98db69b271e
|
|||||||
+import org.bukkit.event.HandlerList;
|
+import org.bukkit.event.HandlerList;
|
||||||
+import org.bukkit.event.server.ServerEvent;
|
+import org.bukkit.event.server.ServerEvent;
|
||||||
+import org.jetbrains.annotations.ApiStatus;
|
+import org.jetbrains.annotations.ApiStatus;
|
||||||
|
+import org.jetbrains.annotations.Contract;
|
||||||
+import org.jetbrains.annotations.NotNull;
|
+import org.jetbrains.annotations.NotNull;
|
||||||
+import org.jetbrains.annotations.Nullable;
|
+import org.jetbrains.annotations.Nullable;
|
||||||
+
|
+
|
||||||
+/**
|
+/**
|
||||||
+ * This event is fired when the server decorates a component for chat purposes. It can be called
|
+ * This event is fired when the server decorates a component for chat purposes. This is called
|
||||||
+ * under the following circumstances:
|
+ * before {@link AsyncChatEvent} and the other chat events. It is recommended that you modify the
|
||||||
+ * <ul>
|
+ * message here, and use the chat events for modifying receivers and later the chat type. If you
|
||||||
+ * <li><b>Previewing:</b> If the client requests a preview response, this event is fired to decorate the component
|
+ * want to keep the message as "signed" for the clients who get it, be sure to include the entire
|
||||||
+ * before it is sent back to the client for signing.</li>
|
+ * original message somewhere in the final message.
|
||||||
+ * <li><b>Chat:</b> If the client sends a chat packet without having signed a preview (the client could have previews
|
|
||||||
+ * disabled or they sent the message too quickly) this event is fired to generated the decorated component. Note
|
|
||||||
+ * that when this is the case, the message will show up as modified as the decorated component wasn't signed
|
|
||||||
+ * by the client.</li>
|
|
||||||
+ * </ul>
|
|
||||||
+ * @see AsyncChatCommandDecorateEvent for the decoration of messages sent via commands
|
+ * @see AsyncChatCommandDecorateEvent for the decoration of messages sent via commands
|
||||||
+ */
|
+ */
|
||||||
+@ApiStatus.Experimental
|
+@ApiStatus.Experimental
|
||||||
@ -384,16 +397,14 @@ index 0000000000000000000000000000000000000000..347122b12ad98115133ef98db69b271e
|
|||||||
+
|
+
|
||||||
+ private final Player player;
|
+ private final Player player;
|
||||||
+ private final Component originalMessage;
|
+ private final Component originalMessage;
|
||||||
+ private final boolean isPreview;
|
|
||||||
+ private Component result;
|
+ private Component result;
|
||||||
+ private boolean cancelled;
|
+ private boolean cancelled;
|
||||||
+
|
+
|
||||||
+ @ApiStatus.Internal
|
+ @ApiStatus.Internal
|
||||||
+ public AsyncChatDecorateEvent(final boolean async, final @Nullable Player player, final @NotNull Component originalMessage, final boolean isPreview, final @NotNull Component result) {
|
+ public AsyncChatDecorateEvent(final boolean async, final @Nullable Player player, final @NotNull Component originalMessage, final @NotNull Component result) {
|
||||||
+ super(async);
|
+ super(async);
|
||||||
+ this.player = player;
|
+ this.player = player;
|
||||||
+ this.originalMessage = originalMessage;
|
+ this.originalMessage = originalMessage;
|
||||||
+ this.isPreview = isPreview;
|
|
||||||
+ this.result = result;
|
+ this.result = result;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
@ -443,9 +454,12 @@ index 0000000000000000000000000000000000000000..347122b12ad98115133ef98db69b271e
|
|||||||
+ * If this decorating is part of a preview request/response.
|
+ * If this decorating is part of a preview request/response.
|
||||||
+ *
|
+ *
|
||||||
+ * @return true if part of previewing
|
+ * @return true if part of previewing
|
||||||
|
+ * @deprecated chat preview was removed in 1.19.3
|
||||||
+ */
|
+ */
|
||||||
|
+ @Deprecated(forRemoval = true)
|
||||||
|
+ @Contract(value = "-> false", pure = true)
|
||||||
+ public boolean isPreview() {
|
+ public boolean isPreview() {
|
||||||
+ return this.isPreview;
|
+ return false;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
@ -474,15 +488,16 @@ index 0000000000000000000000000000000000000000..347122b12ad98115133ef98db69b271e
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/io/papermc/paper/event/player/AsyncChatEvent.java b/src/main/java/io/papermc/paper/event/player/AsyncChatEvent.java
|
diff --git a/src/main/java/io/papermc/paper/event/player/AsyncChatEvent.java b/src/main/java/io/papermc/paper/event/player/AsyncChatEvent.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..0d9e3c23027e3af90cb70e4bb6fb0ac1da35fc4d
|
index 0000000000000000000000000000000000000000..975a767313247d3b1c2a6cfd42c7fa6cd1525c53
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/io/papermc/paper/event/player/AsyncChatEvent.java
|
+++ b/src/main/java/io/papermc/paper/event/player/AsyncChatEvent.java
|
||||||
@@ -0,0 +1,31 @@
|
@@ -0,0 +1,32 @@
|
||||||
+package io.papermc.paper.event.player;
|
+package io.papermc.paper.event.player;
|
||||||
+
|
+
|
||||||
+import java.util.Set;
|
+import java.util.Set;
|
||||||
+import io.papermc.paper.chat.ChatRenderer;
|
+import io.papermc.paper.chat.ChatRenderer;
|
||||||
+import net.kyori.adventure.audience.Audience;
|
+import net.kyori.adventure.audience.Audience;
|
||||||
|
+import net.kyori.adventure.chat.SignedMessage;
|
||||||
+import net.kyori.adventure.text.Component;
|
+import net.kyori.adventure.text.Component;
|
||||||
+import org.bukkit.entity.Player;
|
+import org.bukkit.entity.Player;
|
||||||
+import org.bukkit.event.HandlerList;
|
+import org.bukkit.event.HandlerList;
|
||||||
@ -494,8 +509,8 @@ index 0000000000000000000000000000000000000000..0d9e3c23027e3af90cb70e4bb6fb0ac1
|
|||||||
+public final class AsyncChatEvent extends AbstractChatEvent {
|
+public final class AsyncChatEvent extends AbstractChatEvent {
|
||||||
+ private static final HandlerList HANDLERS = new HandlerList();
|
+ private static final HandlerList HANDLERS = new HandlerList();
|
||||||
+
|
+
|
||||||
+ public AsyncChatEvent(final boolean async, final @NotNull Player player, final @NotNull Set<Audience> viewers, final @NotNull ChatRenderer renderer, final @NotNull Component message, final @NotNull Component originalMessage) {
|
+ public AsyncChatEvent(final boolean async, final @NotNull Player player, final @NotNull Set<Audience> viewers, final @NotNull ChatRenderer renderer, final @NotNull Component message, final @NotNull Component originalMessage, final @NotNull SignedMessage signedMessage) {
|
||||||
+ super(async, player, viewers, renderer, message, originalMessage);
|
+ super(async, player, viewers, renderer, message, originalMessage, signedMessage);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @NotNull
|
+ @NotNull
|
||||||
@ -511,15 +526,16 @@ index 0000000000000000000000000000000000000000..0d9e3c23027e3af90cb70e4bb6fb0ac1
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/io/papermc/paper/event/player/ChatEvent.java b/src/main/java/io/papermc/paper/event/player/ChatEvent.java
|
diff --git a/src/main/java/io/papermc/paper/event/player/ChatEvent.java b/src/main/java/io/papermc/paper/event/player/ChatEvent.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..eb179aae1e1d2ce842442e49fe275827a430ccd0
|
index 0000000000000000000000000000000000000000..46c209f61135c7d37ccfbbc7bb1d74e608fac9d3
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/io/papermc/paper/event/player/ChatEvent.java
|
+++ b/src/main/java/io/papermc/paper/event/player/ChatEvent.java
|
||||||
@@ -0,0 +1,36 @@
|
@@ -0,0 +1,37 @@
|
||||||
+package io.papermc.paper.event.player;
|
+package io.papermc.paper.event.player;
|
||||||
+
|
+
|
||||||
+import java.util.Set;
|
+import java.util.Set;
|
||||||
+import io.papermc.paper.chat.ChatRenderer;
|
+import io.papermc.paper.chat.ChatRenderer;
|
||||||
+import net.kyori.adventure.audience.Audience;
|
+import net.kyori.adventure.audience.Audience;
|
||||||
|
+import net.kyori.adventure.chat.SignedMessage;
|
||||||
+import net.kyori.adventure.text.Component;
|
+import net.kyori.adventure.text.Component;
|
||||||
+import org.bukkit.Warning;
|
+import org.bukkit.Warning;
|
||||||
+import org.bukkit.entity.Player;
|
+import org.bukkit.entity.Player;
|
||||||
@ -536,8 +552,8 @@ index 0000000000000000000000000000000000000000..eb179aae1e1d2ce842442e49fe275827
|
|||||||
+public final class ChatEvent extends AbstractChatEvent {
|
+public final class ChatEvent extends AbstractChatEvent {
|
||||||
+ private static final HandlerList HANDLERS = new HandlerList();
|
+ private static final HandlerList HANDLERS = new HandlerList();
|
||||||
+
|
+
|
||||||
+ public ChatEvent(final @NotNull Player player, final @NotNull Set<Audience> viewers, final @NotNull ChatRenderer renderer, final @NotNull Component message, final @NotNull Component originalMessage) {
|
+ public ChatEvent(final @NotNull Player player, final @NotNull Set<Audience> viewers, final @NotNull ChatRenderer renderer, final @NotNull Component message, final @NotNull Component originalMessage, final @NotNull SignedMessage signedMessage) {
|
||||||
+ super(false, player, viewers, renderer, message, originalMessage);
|
+ super(false, player, viewers, renderer, message, originalMessage, signedMessage);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @NotNull
|
+ @NotNull
|
||||||
@ -553,10 +569,10 @@ index 0000000000000000000000000000000000000000..eb179aae1e1d2ce842442e49fe275827
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/io/papermc/paper/text/PaperComponents.java b/src/main/java/io/papermc/paper/text/PaperComponents.java
|
diff --git a/src/main/java/io/papermc/paper/text/PaperComponents.java b/src/main/java/io/papermc/paper/text/PaperComponents.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..bff9a6295db367c6b89d69fb55459a40828265ea
|
index 0000000000000000000000000000000000000000..6e94562d79206d88b74b53814f9423f12a2e6e06
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/io/papermc/paper/text/PaperComponents.java
|
+++ b/src/main/java/io/papermc/paper/text/PaperComponents.java
|
||||||
@@ -0,0 +1,112 @@
|
@@ -0,0 +1,177 @@
|
||||||
+package io.papermc.paper.text;
|
+package io.papermc.paper.text;
|
||||||
+
|
+
|
||||||
+import net.kyori.adventure.text.Component;
|
+import net.kyori.adventure.text.Component;
|
||||||
@ -567,7 +583,12 @@ index 0000000000000000000000000000000000000000..bff9a6295db367c6b89d69fb55459a40
|
|||||||
+import net.kyori.adventure.text.serializer.plain.PlainComponentSerializer;
|
+import net.kyori.adventure.text.serializer.plain.PlainComponentSerializer;
|
||||||
+import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
|
+import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
|
||||||
+import org.bukkit.Bukkit;
|
+import org.bukkit.Bukkit;
|
||||||
|
+import org.bukkit.command.CommandSender;
|
||||||
|
+import org.bukkit.entity.Entity;
|
||||||
+import org.jetbrains.annotations.NotNull;
|
+import org.jetbrains.annotations.NotNull;
|
||||||
|
+import org.jetbrains.annotations.Nullable;
|
||||||
|
+
|
||||||
|
+import java.io.IOException;
|
||||||
+
|
+
|
||||||
+/**
|
+/**
|
||||||
+ * Paper API-specific methods for working with {@link Component}s and related.
|
+ * Paper API-specific methods for working with {@link Component}s and related.
|
||||||
@ -578,6 +599,66 @@ index 0000000000000000000000000000000000000000..bff9a6295db367c6b89d69fb55459a40
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
|
+ * Resolves a component with a specific command sender and subject.
|
||||||
|
+ * <p>
|
||||||
|
+ * Note that in Vanilla, elevated permissions are usually required to use
|
||||||
|
+ * '@' selectors in various component types, but this method should not
|
||||||
|
+ * check such permissions from the sender.
|
||||||
|
+ * <p>
|
||||||
|
+ * A {@link CommandSender} argument is required to resolve:
|
||||||
|
+ * <ul>
|
||||||
|
+ * <li>{@link net.kyori.adventure.text.NBTComponent}</li>
|
||||||
|
+ * <li>{@link net.kyori.adventure.text.ScoreComponent}</li>
|
||||||
|
+ * <li>{@link net.kyori.adventure.text.SelectorComponent}</li>
|
||||||
|
+ * </ul>
|
||||||
|
+ * A {@link Entity} argument is optional to help resolve:
|
||||||
|
+ * <ul>
|
||||||
|
+ * <li>{@link net.kyori.adventure.text.ScoreComponent}</li>
|
||||||
|
+ * </ul>
|
||||||
|
+ * {@link net.kyori.adventure.text.TranslatableComponent}s don't require any extra arguments.
|
||||||
|
+ *
|
||||||
|
+ * @param input the component to resolve
|
||||||
|
+ * @param context the command sender to resolve with
|
||||||
|
+ * @param scoreboardSubject the scoreboard subject to use (for use with {@link net.kyori.adventure.text.ScoreComponent}s)
|
||||||
|
+ * @return the resolved component
|
||||||
|
+ * @throws IOException if a syntax error tripped during resolving
|
||||||
|
+ */
|
||||||
|
+ public static @NotNull Component resolveWithContext(@NotNull Component input, @Nullable CommandSender context, @Nullable Entity scoreboardSubject) throws IOException {
|
||||||
|
+ return resolveWithContext(input, context, scoreboardSubject, true);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Resolves a component with a specific command sender and subject.
|
||||||
|
+ * <p>
|
||||||
|
+ * Note that in Vanilla, elevated permissions are required to use
|
||||||
|
+ * '@' selectors in various component types. If the boolean {@code bypassPermissions}
|
||||||
|
+ * argument is {@code false}, the {@link CommandSender} argument will be used to query
|
||||||
|
+ * those permissions.
|
||||||
|
+ * <p>
|
||||||
|
+ * A {@link CommandSender} argument is required to resolve:
|
||||||
|
+ * <ul>
|
||||||
|
+ * <li>{@link net.kyori.adventure.text.NBTComponent}</li>
|
||||||
|
+ * <li>{@link net.kyori.adventure.text.ScoreComponent}</li>
|
||||||
|
+ * <li>{@link net.kyori.adventure.text.SelectorComponent}</li>
|
||||||
|
+ * </ul>
|
||||||
|
+ * A {@link Entity} argument is optional to help resolve:
|
||||||
|
+ * <ul>
|
||||||
|
+ * <li>{@link net.kyori.adventure.text.ScoreComponent}</li>
|
||||||
|
+ * </ul>
|
||||||
|
+ * {@link net.kyori.adventure.text.TranslatableComponent}s don't require any extra arguments.
|
||||||
|
+ *
|
||||||
|
+ * @param input the component to resolve
|
||||||
|
+ * @param context the command sender to resolve with
|
||||||
|
+ * @param scoreboardSubject the scoreboard subject to use (for use with {@link net.kyori.adventure.text.ScoreComponent}s)
|
||||||
|
+ * @param bypassPermissions true to bypass permissions checks for resolving components
|
||||||
|
+ * @return the resolved component
|
||||||
|
+ * @throws IOException if a syntax error tripped during resolving
|
||||||
|
+ */
|
||||||
|
+ public static @NotNull Component resolveWithContext(@NotNull Component input, @Nullable CommandSender context, @Nullable Entity scoreboardSubject, boolean bypassPermissions) throws IOException {
|
||||||
|
+ return Bukkit.getUnsafe().resolveWithContext(input, context, scoreboardSubject, bypassPermissions);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
+ * Return a component flattener that can use game data to resolve extra information about components.
|
+ * Return a component flattener that can use game data to resolve extra information about components.
|
||||||
+ *
|
+ *
|
||||||
+ * @return a component flattener
|
+ * @return a component flattener
|
||||||
@ -670,7 +751,7 @@ index 0000000000000000000000000000000000000000..bff9a6295db367c6b89d69fb55459a40
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||||
index 72143df182e55b70726b066b6b276021c1f4f4d7..c800da7aba43de995682eb724ccf8b7066d6cad3 100644
|
index 446e4d21c5b9b624e633875df62160a7351517d9..0084898567e8bb74fa271b65b56523a5c26d387c 100644
|
||||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||||
@@ -358,7 +358,9 @@ public final class Bukkit {
|
@@ -358,7 +358,9 @@ public final class Bukkit {
|
||||||
@ -683,7 +764,7 @@ index 72143df182e55b70726b066b6b276021c1f4f4d7..c800da7aba43de995682eb724ccf8b70
|
|||||||
public static int broadcastMessage(@NotNull String message) {
|
public static int broadcastMessage(@NotNull String message) {
|
||||||
return server.broadcastMessage(message);
|
return server.broadcastMessage(message);
|
||||||
}
|
}
|
||||||
@@ -1072,6 +1074,19 @@ public final class Bukkit {
|
@@ -1074,6 +1076,19 @@ public final class Bukkit {
|
||||||
server.shutdown();
|
server.shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -703,7 +784,7 @@ index 72143df182e55b70726b066b6b276021c1f4f4d7..c800da7aba43de995682eb724ccf8b70
|
|||||||
/**
|
/**
|
||||||
* Broadcasts the specified message to every user with the given
|
* Broadcasts the specified message to every user with the given
|
||||||
* permission name.
|
* permission name.
|
||||||
@@ -1081,6 +1096,21 @@ public final class Bukkit {
|
@@ -1083,6 +1098,21 @@ public final class Bukkit {
|
||||||
* permissibles} must have to receive the broadcast
|
* permissibles} must have to receive the broadcast
|
||||||
* @return number of message recipients
|
* @return number of message recipients
|
||||||
*/
|
*/
|
||||||
@ -725,7 +806,7 @@ index 72143df182e55b70726b066b6b276021c1f4f4d7..c800da7aba43de995682eb724ccf8b70
|
|||||||
public static int broadcast(@NotNull String message, @NotNull String permission) {
|
public static int broadcast(@NotNull String message, @NotNull String permission) {
|
||||||
return server.broadcast(message, permission);
|
return server.broadcast(message, permission);
|
||||||
}
|
}
|
||||||
@@ -1319,6 +1349,7 @@ public final class Bukkit {
|
@@ -1321,6 +1351,7 @@ public final class Bukkit {
|
||||||
return server.createInventory(owner, type);
|
return server.createInventory(owner, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -733,7 +814,7 @@ index 72143df182e55b70726b066b6b276021c1f4f4d7..c800da7aba43de995682eb724ccf8b70
|
|||||||
/**
|
/**
|
||||||
* Creates an empty inventory with the specified type and title. If the type
|
* Creates an empty inventory with the specified type and title. If the type
|
||||||
* is {@link InventoryType#CHEST}, the new inventory has a size of 27;
|
* is {@link InventoryType#CHEST}, the new inventory has a size of 27;
|
||||||
@@ -1344,6 +1375,38 @@ public final class Bukkit {
|
@@ -1346,6 +1377,38 @@ public final class Bukkit {
|
||||||
* @see InventoryType#isCreatable()
|
* @see InventoryType#isCreatable()
|
||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
@ -772,7 +853,7 @@ index 72143df182e55b70726b066b6b276021c1f4f4d7..c800da7aba43de995682eb724ccf8b70
|
|||||||
public static Inventory createInventory(@Nullable InventoryHolder owner, @NotNull InventoryType type, @NotNull String title) {
|
public static Inventory createInventory(@Nullable InventoryHolder owner, @NotNull InventoryType type, @NotNull String title) {
|
||||||
return server.createInventory(owner, type, title);
|
return server.createInventory(owner, type, title);
|
||||||
}
|
}
|
||||||
@@ -1362,6 +1425,7 @@ public final class Bukkit {
|
@@ -1364,6 +1427,7 @@ public final class Bukkit {
|
||||||
return server.createInventory(owner, size);
|
return server.createInventory(owner, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -780,7 +861,7 @@ index 72143df182e55b70726b066b6b276021c1f4f4d7..c800da7aba43de995682eb724ccf8b70
|
|||||||
/**
|
/**
|
||||||
* Creates an empty inventory of type {@link InventoryType#CHEST} with the
|
* Creates an empty inventory of type {@link InventoryType#CHEST} with the
|
||||||
* specified size and title.
|
* specified size and title.
|
||||||
@@ -1374,10 +1438,30 @@ public final class Bukkit {
|
@@ -1376,10 +1440,30 @@ public final class Bukkit {
|
||||||
* @throws IllegalArgumentException if the size is not a multiple of 9
|
* @throws IllegalArgumentException if the size is not a multiple of 9
|
||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
@ -811,7 +892,7 @@ index 72143df182e55b70726b066b6b276021c1f4f4d7..c800da7aba43de995682eb724ccf8b70
|
|||||||
/**
|
/**
|
||||||
* Creates an empty merchant.
|
* Creates an empty merchant.
|
||||||
*
|
*
|
||||||
@@ -1385,7 +1469,20 @@ public final class Bukkit {
|
@@ -1387,7 +1471,20 @@ public final class Bukkit {
|
||||||
* when the merchant inventory is viewed
|
* when the merchant inventory is viewed
|
||||||
* @return a new merchant
|
* @return a new merchant
|
||||||
*/
|
*/
|
||||||
@ -832,7 +913,7 @@ index 72143df182e55b70726b066b6b276021c1f4f4d7..c800da7aba43de995682eb724ccf8b70
|
|||||||
public static Merchant createMerchant(@Nullable String title) {
|
public static Merchant createMerchant(@Nullable String title) {
|
||||||
return server.createMerchant(title);
|
return server.createMerchant(title);
|
||||||
}
|
}
|
||||||
@@ -1502,22 +1599,47 @@ public final class Bukkit {
|
@@ -1504,22 +1601,47 @@ public final class Bukkit {
|
||||||
return server.isPrimaryThread();
|
return server.isPrimaryThread();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1005,7 +1086,7 @@ index 803fa0019869127ee8c7e4fb1777a59c43e66f8a..c65f0d6569c130b4920a9e71ad24af64
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||||
index c0a3b44c728ec98ecce4d1e71746747d87582aa9..4d5c3af2e1f0030aa7415fbe9d11fe3580854fd5 100644
|
index 52dd3148ae2a3480982593dc627ef7eede52bc5a..892e03189957b0072827be4fd485dd98352334e8 100644
|
||||||
--- a/src/main/java/org/bukkit/Server.java
|
--- a/src/main/java/org/bukkit/Server.java
|
||||||
+++ b/src/main/java/org/bukkit/Server.java
|
+++ b/src/main/java/org/bukkit/Server.java
|
||||||
@@ -59,13 +59,13 @@ import org.jetbrains.annotations.Nullable;
|
@@ -59,13 +59,13 @@ import org.jetbrains.annotations.Nullable;
|
||||||
@ -1043,7 +1124,7 @@ index c0a3b44c728ec98ecce4d1e71746747d87582aa9..4d5c3af2e1f0030aa7415fbe9d11fe35
|
|||||||
public int broadcastMessage(@NotNull String message);
|
public int broadcastMessage(@NotNull String message);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -911,8 +913,33 @@ public interface Server extends PluginMessageRecipient {
|
@@ -913,8 +915,33 @@ public interface Server extends PluginMessageRecipient {
|
||||||
* @param permission the required permission {@link Permissible
|
* @param permission the required permission {@link Permissible
|
||||||
* permissibles} must have to receive the broadcast
|
* permissibles} must have to receive the broadcast
|
||||||
* @return number of message recipients
|
* @return number of message recipients
|
||||||
@ -1077,7 +1158,7 @@ index c0a3b44c728ec98ecce4d1e71746747d87582aa9..4d5c3af2e1f0030aa7415fbe9d11fe35
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the player by the given name, regardless if they are offline or
|
* Gets the player by the given name, regardless if they are offline or
|
||||||
@@ -1110,6 +1137,7 @@ public interface Server extends PluginMessageRecipient {
|
@@ -1112,6 +1139,7 @@ public interface Server extends PluginMessageRecipient {
|
||||||
@NotNull
|
@NotNull
|
||||||
Inventory createInventory(@Nullable InventoryHolder owner, @NotNull InventoryType type);
|
Inventory createInventory(@Nullable InventoryHolder owner, @NotNull InventoryType type);
|
||||||
|
|
||||||
@ -1085,7 +1166,7 @@ index c0a3b44c728ec98ecce4d1e71746747d87582aa9..4d5c3af2e1f0030aa7415fbe9d11fe35
|
|||||||
/**
|
/**
|
||||||
* Creates an empty inventory with the specified type and title. If the type
|
* Creates an empty inventory with the specified type and title. If the type
|
||||||
* is {@link InventoryType#CHEST}, the new inventory has a size of 27;
|
* is {@link InventoryType#CHEST}, the new inventory has a size of 27;
|
||||||
@@ -1135,6 +1163,36 @@ public interface Server extends PluginMessageRecipient {
|
@@ -1137,6 +1165,36 @@ public interface Server extends PluginMessageRecipient {
|
||||||
* @see InventoryType#isCreatable()
|
* @see InventoryType#isCreatable()
|
||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
@ -1122,7 +1203,7 @@ index c0a3b44c728ec98ecce4d1e71746747d87582aa9..4d5c3af2e1f0030aa7415fbe9d11fe35
|
|||||||
Inventory createInventory(@Nullable InventoryHolder owner, @NotNull InventoryType type, @NotNull String title);
|
Inventory createInventory(@Nullable InventoryHolder owner, @NotNull InventoryType type, @NotNull String title);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1149,6 +1207,22 @@ public interface Server extends PluginMessageRecipient {
|
@@ -1151,6 +1209,22 @@ public interface Server extends PluginMessageRecipient {
|
||||||
@NotNull
|
@NotNull
|
||||||
Inventory createInventory(@Nullable InventoryHolder owner, int size) throws IllegalArgumentException;
|
Inventory createInventory(@Nullable InventoryHolder owner, int size) throws IllegalArgumentException;
|
||||||
|
|
||||||
@ -1145,7 +1226,7 @@ index c0a3b44c728ec98ecce4d1e71746747d87582aa9..4d5c3af2e1f0030aa7415fbe9d11fe35
|
|||||||
/**
|
/**
|
||||||
* Creates an empty inventory of type {@link InventoryType#CHEST} with the
|
* Creates an empty inventory of type {@link InventoryType#CHEST} with the
|
||||||
* specified size and title.
|
* specified size and title.
|
||||||
@@ -1159,10 +1233,13 @@ public interface Server extends PluginMessageRecipient {
|
@@ -1161,10 +1235,13 @@ public interface Server extends PluginMessageRecipient {
|
||||||
* viewed
|
* viewed
|
||||||
* @return a new inventory
|
* @return a new inventory
|
||||||
* @throws IllegalArgumentException if the size is not a multiple of 9
|
* @throws IllegalArgumentException if the size is not a multiple of 9
|
||||||
@ -1159,7 +1240,7 @@ index c0a3b44c728ec98ecce4d1e71746747d87582aa9..4d5c3af2e1f0030aa7415fbe9d11fe35
|
|||||||
/**
|
/**
|
||||||
* Creates an empty merchant.
|
* Creates an empty merchant.
|
||||||
*
|
*
|
||||||
@@ -1170,7 +1247,18 @@ public interface Server extends PluginMessageRecipient {
|
@@ -1172,7 +1249,18 @@ public interface Server extends PluginMessageRecipient {
|
||||||
* when the merchant inventory is viewed
|
* when the merchant inventory is viewed
|
||||||
* @return a new merchant
|
* @return a new merchant
|
||||||
*/
|
*/
|
||||||
@ -1178,7 +1259,7 @@ index c0a3b44c728ec98ecce4d1e71746747d87582aa9..4d5c3af2e1f0030aa7415fbe9d11fe35
|
|||||||
Merchant createMerchant(@Nullable String title);
|
Merchant createMerchant(@Nullable String title);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1266,20 +1354,41 @@ public interface Server extends PluginMessageRecipient {
|
@@ -1268,20 +1356,41 @@ public interface Server extends PluginMessageRecipient {
|
||||||
*/
|
*/
|
||||||
boolean isPrimaryThread();
|
boolean isPrimaryThread();
|
||||||
|
|
||||||
@ -1220,7 +1301,7 @@ index c0a3b44c728ec98ecce4d1e71746747d87582aa9..4d5c3af2e1f0030aa7415fbe9d11fe35
|
|||||||
String getShutdownMessage();
|
String getShutdownMessage();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1661,7 +1770,9 @@ public interface Server extends PluginMessageRecipient {
|
@@ -1663,7 +1772,9 @@ public interface Server extends PluginMessageRecipient {
|
||||||
* Sends the component to the player
|
* Sends the component to the player
|
||||||
*
|
*
|
||||||
* @param component the components to send
|
* @param component the components to send
|
||||||
@ -1230,7 +1311,7 @@ index c0a3b44c728ec98ecce4d1e71746747d87582aa9..4d5c3af2e1f0030aa7415fbe9d11fe35
|
|||||||
public void broadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent component) {
|
public void broadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent component) {
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
throw new UnsupportedOperationException("Not supported yet.");
|
||||||
}
|
}
|
||||||
@@ -1670,7 +1781,9 @@ public interface Server extends PluginMessageRecipient {
|
@@ -1672,7 +1783,9 @@ public interface Server extends PluginMessageRecipient {
|
||||||
* Sends an array of components as a single message to the player
|
* Sends an array of components as a single message to the player
|
||||||
*
|
*
|
||||||
* @param components the components to send
|
* @param components the components to send
|
||||||
@ -1241,7 +1322,7 @@ index c0a3b44c728ec98ecce4d1e71746747d87582aa9..4d5c3af2e1f0030aa7415fbe9d11fe35
|
|||||||
throw new UnsupportedOperationException("Not supported yet.");
|
throw new UnsupportedOperationException("Not supported yet.");
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/Sound.java b/src/main/java/org/bukkit/Sound.java
|
diff --git a/src/main/java/org/bukkit/Sound.java b/src/main/java/org/bukkit/Sound.java
|
||||||
index 21b95d404fbdf7f972f8a13ecd07dc28481f2286..da844079a9d3efd1a92c892de79fc7b3aeecaf4b 100644
|
index 6b360758cd4cb02145f18ce743b51f91a471a650..bf8eea5464f4b09198e7b621419a3adade9f4601 100644
|
||||||
--- a/src/main/java/org/bukkit/Sound.java
|
--- a/src/main/java/org/bukkit/Sound.java
|
||||||
+++ b/src/main/java/org/bukkit/Sound.java
|
+++ b/src/main/java/org/bukkit/Sound.java
|
||||||
@@ -10,7 +10,7 @@ import org.jetbrains.annotations.NotNull;
|
@@ -10,7 +10,7 @@ import org.jetbrains.annotations.NotNull;
|
||||||
@ -1253,7 +1334,7 @@ index 21b95d404fbdf7f972f8a13ecd07dc28481f2286..da844079a9d3efd1a92c892de79fc7b3
|
|||||||
|
|
||||||
AMBIENT_BASALT_DELTAS_ADDITIONS("ambient.basalt_deltas.additions"),
|
AMBIENT_BASALT_DELTAS_ADDITIONS("ambient.basalt_deltas.additions"),
|
||||||
AMBIENT_BASALT_DELTAS_LOOP("ambient.basalt_deltas.loop"),
|
AMBIENT_BASALT_DELTAS_LOOP("ambient.basalt_deltas.loop"),
|
||||||
@@ -1345,4 +1345,12 @@ public enum Sound implements Keyed {
|
@@ -1416,4 +1416,12 @@ public enum Sound implements Keyed {
|
||||||
public NamespacedKey getKey() {
|
public NamespacedKey getKey() {
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
@ -1303,10 +1384,10 @@ index ac5e263d737973af077e3406a84a84baca4370db..2d91924b7f5ef16a91d40cdc1bfc3d68
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index 01e11f882abb6c631f810584aa23646042688435..fa28b5bb0efd9d400277cd8969f38e039e6ea8ac 100644
|
index 01e11f882abb6c631f810584aa23646042688435..4f339debf113d103ffe0b5fdb03dfc82eafd1bd5 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -22,6 +22,14 @@ import org.bukkit.plugin.PluginDescriptionFile;
|
@@ -22,6 +22,15 @@ import org.bukkit.plugin.PluginDescriptionFile;
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public interface UnsafeValues {
|
public interface UnsafeValues {
|
||||||
@ -1317,6 +1398,7 @@ index 01e11f882abb6c631f810584aa23646042688435..fa28b5bb0efd9d400277cd8969f38e03
|
|||||||
+ @Deprecated(forRemoval = true) net.kyori.adventure.text.serializer.gson.GsonComponentSerializer gsonComponentSerializer();
|
+ @Deprecated(forRemoval = true) net.kyori.adventure.text.serializer.gson.GsonComponentSerializer gsonComponentSerializer();
|
||||||
+ @Deprecated(forRemoval = true) net.kyori.adventure.text.serializer.gson.GsonComponentSerializer colorDownsamplingGsonComponentSerializer();
|
+ @Deprecated(forRemoval = true) net.kyori.adventure.text.serializer.gson.GsonComponentSerializer colorDownsamplingGsonComponentSerializer();
|
||||||
+ @Deprecated(forRemoval = true) net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer legacyComponentSerializer();
|
+ @Deprecated(forRemoval = true) net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer legacyComponentSerializer();
|
||||||
|
+ net.kyori.adventure.text.Component resolveWithContext(net.kyori.adventure.text.Component component, org.bukkit.command.CommandSender context, org.bukkit.entity.Entity scoreboardSubject, boolean bypassPermissions) throws java.io.IOException;
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
|
||||||
Material toLegacy(Material material);
|
Material toLegacy(Material material);
|
||||||
@ -1805,7 +1887,7 @@ index 9566e4306ada5e82dede0f002aa06da12c44996b..4d5f0837bd0e02a30c943d8969fb6b13
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||||
index 259d878ddd4e4e2b289c0de0325ca8fd6203c484..a829779ac56a271cad463806984991b4713a27be 100644
|
index 8489a0b009223b727b0393840374550a1cc192ff..bdcf5219ff1e4d4c0dc8a3423bc17b453b779473 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||||
@@ -26,7 +26,7 @@ import org.jetbrains.annotations.Nullable;
|
@@ -26,7 +26,7 @@ import org.jetbrains.annotations.Nullable;
|
||||||
@ -2512,7 +2594,7 @@ index 7190db11eff7d48df8a99f405a9dbaefdfa76e3d..1268066e30ddb0cd3792ea4b3de894eb
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
|
diff --git a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
|
||||||
index 3c2ea8fec3a748cab7f5ad9100d12bd8213ec6c9..7941c60b0e1840785ba2b250071591bd75bc6e35 100644
|
index 3c2ea8fec3a748cab7f5ad9100d12bd8213ec6c9..1f1df82c9bcf18bad1187e3f24ede1901d91c06f 100644
|
||||||
--- a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
|
--- a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
|
||||||
+++ b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
|
+++ b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
|
||||||
@@ -12,25 +12,48 @@ import org.jetbrains.annotations.Nullable;
|
@@ -12,25 +12,48 @@ import org.jetbrains.annotations.Nullable;
|
||||||
@ -2560,7 +2642,7 @@ index 3c2ea8fec3a748cab7f5ad9100d12bd8213ec6c9..7941c60b0e1840785ba2b250071591bd
|
|||||||
this.newTotalExp = newTotalExp;
|
this.newTotalExp = newTotalExp;
|
||||||
this.newLevel = newLevel;
|
this.newLevel = newLevel;
|
||||||
this.deathMessage = deathMessage;
|
this.deathMessage = deathMessage;
|
||||||
+ this.adventure$deathMessage = deathMessage != null ? net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(deathMessage) : net.kyori.adventure.text.Component.empty(); // Paper
|
+ this.adventure$deathMessage = deathMessage != null ? net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(deathMessage) : null; // Paper
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@ -2598,7 +2680,7 @@ index 3c2ea8fec3a748cab7f5ad9100d12bd8213ec6c9..7941c60b0e1840785ba2b250071591bd
|
|||||||
+ @Deprecated // Paper
|
+ @Deprecated // Paper
|
||||||
public void setDeathMessage(@Nullable String deathMessage) {
|
public void setDeathMessage(@Nullable String deathMessage) {
|
||||||
this.deathMessage = deathMessage;
|
this.deathMessage = deathMessage;
|
||||||
+ this.adventure$deathMessage = deathMessage != null ? net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(deathMessage) : net.kyori.adventure.text.Component.empty(); // Paper
|
+ this.adventure$deathMessage = deathMessage != null ? net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(deathMessage) : null; // Paper
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2623,10 +2705,10 @@ index 3c2ea8fec3a748cab7f5ad9100d12bd8213ec6c9..7941c60b0e1840785ba2b250071591bd
|
|||||||
* Gets how much EXP the Player should have at respawn.
|
* Gets how much EXP the Player should have at respawn.
|
||||||
* <p>
|
* <p>
|
||||||
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryType.java b/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryType.java b/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
||||||
index 441362d2fbdc9413ed64a1f00b50fb6d06327e79..e1e7f45fd0f65d0874dd0698da436c7ac2e7951b 100644
|
index 21ef4150d41a57fdc4f405fea1f578448f0c860b..b917c13a30254a83cc2ea87279d427276bc75074 100644
|
||||||
--- a/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
--- a/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
||||||
+++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
+++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
||||||
@@ -140,6 +140,18 @@ public enum InventoryType {
|
@@ -144,6 +144,18 @@ public enum InventoryType {
|
||||||
private final String title;
|
private final String title;
|
||||||
private final boolean isCreatable;
|
private final boolean isCreatable;
|
||||||
|
|
||||||
@ -2645,7 +2727,7 @@ index 441362d2fbdc9413ed64a1f00b50fb6d06327e79..e1e7f45fd0f65d0874dd0698da436c7a
|
|||||||
private InventoryType(int defaultSize, /*@NotNull*/ String defaultTitle) {
|
private InventoryType(int defaultSize, /*@NotNull*/ String defaultTitle) {
|
||||||
this(defaultSize, defaultTitle, true);
|
this(defaultSize, defaultTitle, true);
|
||||||
}
|
}
|
||||||
@@ -148,6 +160,7 @@ public enum InventoryType {
|
@@ -152,6 +164,7 @@ public enum InventoryType {
|
||||||
size = defaultSize;
|
size = defaultSize;
|
||||||
title = defaultTitle;
|
title = defaultTitle;
|
||||||
this.isCreatable = isCreatable;
|
this.isCreatable = isCreatable;
|
||||||
@ -2653,7 +2735,7 @@ index 441362d2fbdc9413ed64a1f00b50fb6d06327e79..e1e7f45fd0f65d0874dd0698da436c7a
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getDefaultSize() {
|
public int getDefaultSize() {
|
||||||
@@ -155,6 +168,7 @@ public enum InventoryType {
|
@@ -159,6 +172,7 @@ public enum InventoryType {
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@ -3435,50 +3517,53 @@ index 03bfca9d368bbe4b7c1353d52c883e756bf69bda..943d324435350d3f16fad3e21cb472a0
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
diff --git a/src/main/java/org/bukkit/event/server/ServerListPingEvent.java b/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
|
diff --git a/src/main/java/org/bukkit/event/server/ServerListPingEvent.java b/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
|
||||||
index 92941af574945936c3714718ed3eea23697c99df..5b8a7b897d9f9d8df3705eef36388f41be4531a6 100644
|
index 5adbe0514129abf3cfbc4b29a213f522359fe2e1..732d8d0436dc76cff33394b43452ff8f7a9b7fab 100644
|
||||||
--- a/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
|
--- a/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
|
||||||
+++ b/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
|
+++ b/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
|
||||||
@@ -22,15 +22,16 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
|
@@ -22,7 +22,7 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
|
||||||
private static final HandlerList handlers = new HandlerList();
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
private final String hostname;
|
||||||
private final InetAddress address;
|
private final InetAddress address;
|
||||||
private final boolean shouldSendChatPreviews;
|
|
||||||
- private String motd;
|
- private String motd;
|
||||||
+ private net.kyori.adventure.text.Component motd; // Paper
|
+ private net.kyori.adventure.text.Component motd; // Paper
|
||||||
private final int numPlayers;
|
private final int numPlayers;
|
||||||
private int maxPlayers;
|
private int maxPlayers;
|
||||||
|
|
||||||
+ @Deprecated // Paper
|
@@ -31,7 +31,7 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
|
||||||
public ServerListPingEvent(@NotNull final InetAddress address, @NotNull final String motd, final boolean shouldSendChatPreviews, final int numPlayers, final int maxPlayers) {
|
|
||||||
super(true);
|
|
||||||
Preconditions.checkArgument(numPlayers >= 0, "Cannot have negative number of players online", numPlayers);
|
Preconditions.checkArgument(numPlayers >= 0, "Cannot have negative number of players online", numPlayers);
|
||||||
|
this.hostname = hostname;
|
||||||
this.address = address;
|
this.address = address;
|
||||||
- this.motd = motd;
|
- this.motd = motd;
|
||||||
+ this.motd = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(motd); // Paper
|
+ this.motd = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(motd); // Paper
|
||||||
this.shouldSendChatPreviews = shouldSendChatPreviews;
|
|
||||||
this.numPlayers = numPlayers;
|
this.numPlayers = numPlayers;
|
||||||
this.maxPlayers = maxPlayers;
|
this.maxPlayers = maxPlayers;
|
||||||
@@ -45,15 +46,61 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
|
}
|
||||||
|
@@ -45,15 +45,80 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
|
||||||
|
* @param address the address of the pinger
|
||||||
* @param motd the message of the day
|
* @param motd the message of the day
|
||||||
* @param shouldSendChatPreviews if the server should send chat previews
|
|
||||||
* @param maxPlayers the max number of players
|
* @param maxPlayers the max number of players
|
||||||
+ * @deprecated in favour of {@link #ServerListPingEvent(java.net.InetAddress, net.kyori.adventure.text.Component, boolean, int)}
|
+ * @deprecated in favour of {@link #ServerListPingEvent(String, java.net.InetAddress, net.kyori.adventure.text.Component, int)}
|
||||||
*/
|
*/
|
||||||
+ @Deprecated // Paper
|
+ @Deprecated // Paper
|
||||||
protected ServerListPingEvent(@NotNull final InetAddress address, @NotNull final String motd, boolean shouldSendChatPreviews, final int maxPlayers) {
|
protected ServerListPingEvent(@NotNull final String hostname, @NotNull final InetAddress address, @NotNull final String motd, final int maxPlayers) {
|
||||||
super(true);
|
super(true);
|
||||||
this.numPlayers = MAGIC_PLAYER_COUNT;
|
this.numPlayers = MAGIC_PLAYER_COUNT;
|
||||||
|
this.hostname = hostname;
|
||||||
this.address = address;
|
this.address = address;
|
||||||
+ this.motd = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(motd); // Paper
|
+ this.motd = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(motd); // Paper
|
||||||
+ this.shouldSendChatPreviews = shouldSendChatPreviews;
|
|
||||||
+ this.maxPlayers = maxPlayers;
|
+ this.maxPlayers = maxPlayers;
|
||||||
+ }
|
+ }
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ public ServerListPingEvent(@NotNull final InetAddress address, @NotNull final net.kyori.adventure.text.Component motd, boolean shouldSendChatPreviews, final int numPlayers, final int maxPlayers) {
|
+ @Deprecated
|
||||||
|
+ public ServerListPingEvent(@NotNull final InetAddress address, @NotNull final net.kyori.adventure.text.Component motd, final int numPlayers, final int maxPlayers) {
|
||||||
|
+ this("", address, motd, numPlayers, maxPlayers);
|
||||||
|
+ }
|
||||||
|
+ public ServerListPingEvent(@NotNull final String hostname, @NotNull final InetAddress address, @NotNull final net.kyori.adventure.text.Component motd, final int numPlayers, final int maxPlayers) {
|
||||||
+ super(true);
|
+ super(true);
|
||||||
+ Preconditions.checkArgument(numPlayers >= 0, "Cannot have negative number of players online (%s)", numPlayers);
|
+ Preconditions.checkArgument(numPlayers >= 0, "Cannot have negative number of players online (%s)", numPlayers);
|
||||||
|
+ this.hostname = hostname;
|
||||||
+ this.address = address;
|
+ this.address = address;
|
||||||
this.motd = motd;
|
this.motd = motd;
|
||||||
this.shouldSendChatPreviews = shouldSendChatPreviews;
|
|
||||||
+ this.numPlayers = numPlayers;
|
+ this.numPlayers = numPlayers;
|
||||||
this.maxPlayers = maxPlayers;
|
this.maxPlayers = maxPlayers;
|
||||||
}
|
}
|
||||||
@ -3490,13 +3575,28 @@ index 92941af574945936c3714718ed3eea23697c99df..5b8a7b897d9f9d8df3705eef36388f41
|
|||||||
+ * @param address the address of the pinger
|
+ * @param address the address of the pinger
|
||||||
+ * @param motd the message of the day
|
+ * @param motd the message of the day
|
||||||
+ * @param maxPlayers the max number of players
|
+ * @param maxPlayers the max number of players
|
||||||
|
+ * @deprecated in favour of {@link #ServerListPingEvent(String, java.net.InetAddress, net.kyori.adventure.text.Component, int)}
|
||||||
+ */
|
+ */
|
||||||
+ protected ServerListPingEvent(@NotNull final InetAddress address, @NotNull final net.kyori.adventure.text.Component motd, boolean shouldSendChatPreviews, final int maxPlayers) {
|
+ @Deprecated
|
||||||
+ super(true);
|
+ protected ServerListPingEvent(@NotNull final InetAddress address, @NotNull final net.kyori.adventure.text.Component motd, final int maxPlayers) {
|
||||||
|
+ this("", address, motd, maxPlayers);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * This constructor is intended for implementations that provide the
|
||||||
|
+ * {@link #iterator()} method, thus provided the {@link #getNumPlayers()}
|
||||||
|
+ * count.
|
||||||
|
+ *
|
||||||
|
+ * @param hostname The hostname that was used to connect to the server
|
||||||
|
+ * @param address the address of the pinger
|
||||||
|
+ * @param motd the message of the day
|
||||||
|
+ * @param maxPlayers the max number of players
|
||||||
|
+ */
|
||||||
|
+ protected ServerListPingEvent(final @NotNull String hostname, final @NotNull InetAddress address, final @NotNull net.kyori.adventure.text.Component motd, final int maxPlayers) {
|
||||||
+ this.numPlayers = MAGIC_PLAYER_COUNT;
|
+ this.numPlayers = MAGIC_PLAYER_COUNT;
|
||||||
|
+ this.hostname = hostname;
|
||||||
+ this.address = address;
|
+ this.address = address;
|
||||||
+ this.motd = motd;
|
+ this.motd = motd;
|
||||||
+ this.shouldSendChatPreviews = shouldSendChatPreviews;
|
|
||||||
+ this.maxPlayers = maxPlayers;
|
+ this.maxPlayers = maxPlayers;
|
||||||
+ }
|
+ }
|
||||||
+ /**
|
+ /**
|
||||||
@ -3518,8 +3618,8 @@ index 92941af574945936c3714718ed3eea23697c99df..5b8a7b897d9f9d8df3705eef36388f41
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the address the ping is coming from.
|
* Gets the hostname that the player used to connect to the server, or
|
||||||
@@ -69,19 +116,23 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
|
@@ -80,19 +145,23 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
|
||||||
* Get the message of the day message.
|
* Get the message of the day message.
|
||||||
*
|
*
|
||||||
* @return the message of the day
|
* @return the message of the day
|
||||||
|
422
patches/api/0007-Add-Position.patch
Normale Datei
422
patches/api/0007-Add-Position.patch
Normale Datei
@ -0,0 +1,422 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||||
|
Date: Sun, 20 Mar 2022 10:42:28 -0700
|
||||||
|
Subject: [PATCH] Add Position
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/io/papermc/paper/math/BlockPosition.java b/src/main/java/io/papermc/paper/math/BlockPosition.java
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000000000000000000000000000..f164d32cfbd5bfd84f3067a149d34bb1185a7e00
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/main/java/io/papermc/paper/math/BlockPosition.java
|
||||||
|
@@ -0,0 +1,98 @@
|
||||||
|
+package io.papermc.paper.math;
|
||||||
|
+
|
||||||
|
+import org.bukkit.Axis;
|
||||||
|
+import org.bukkit.block.BlockFace;
|
||||||
|
+import org.jetbrains.annotations.ApiStatus;
|
||||||
|
+import org.jetbrains.annotations.Contract;
|
||||||
|
+import org.jetbrains.annotations.NotNull;
|
||||||
|
+
|
||||||
|
+/**
|
||||||
|
+ * A position represented with integers.
|
||||||
|
+ * <p>
|
||||||
|
+ * <b>May see breaking changes until Experimental annotation is removed.</b>
|
||||||
|
+ * @see FinePosition
|
||||||
|
+ */
|
||||||
|
+@ApiStatus.Experimental
|
||||||
|
+public interface BlockPosition extends Position {
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ default double x() {
|
||||||
|
+ return this.blockX();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ default double y() {
|
||||||
|
+ return this.blockY();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ default double z() {
|
||||||
|
+ return this.blockZ();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ default boolean isBlock() {
|
||||||
|
+ return true;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ default boolean isFine() {
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ default @NotNull BlockPosition toBlock() {
|
||||||
|
+ return this;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ default @NotNull BlockPosition offset(int x, int y, int z) {
|
||||||
|
+ return x == 0 && y == 0 && z == 0 ? this : new BlockPositionImpl(this.blockX() + x, this.blockY() + y, this.blockZ() + z);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ default @NotNull FinePosition offset(double x, double y, double z) {
|
||||||
|
+ return new FinePositionImpl(this.blockX() + z, this.blockY() + y, this.blockZ() + z);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Returns a block position offset by 1 in the direction specified.
|
||||||
|
+ *
|
||||||
|
+ * @param blockFace the block face to offset towards
|
||||||
|
+ * @return the offset block position
|
||||||
|
+ */
|
||||||
|
+ @Contract(value = "_ -> new", pure = true)
|
||||||
|
+ default @NotNull BlockPosition offset(@NotNull BlockFace blockFace) {
|
||||||
|
+ return this.offset(blockFace, 1);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Returns a block position offset in the direction specified
|
||||||
|
+ * multiplied by the amount.
|
||||||
|
+ *
|
||||||
|
+ * @param blockFace the block face to offset towards
|
||||||
|
+ * @param amount the number of times to move in that direction
|
||||||
|
+ * @return the offset block position
|
||||||
|
+ */
|
||||||
|
+ @Contract(pure = true)
|
||||||
|
+ default @NotNull BlockPosition offset(@NotNull BlockFace blockFace, int amount) {
|
||||||
|
+ return amount == 0 ? this : new BlockPositionImpl(this.blockX() + (blockFace.getModX() * amount), this.blockY() + (blockFace.getModY() * amount), this.blockZ() + (blockFace.getModZ() * amount));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Returns a block position offset by the amount along
|
||||||
|
+ * the specified axis.
|
||||||
|
+ *
|
||||||
|
+ * @param axis the axis to offset along
|
||||||
|
+ * @param amount the amount to offset along that axis
|
||||||
|
+ * @return the offset block position
|
||||||
|
+ */
|
||||||
|
+ @Contract(pure = true)
|
||||||
|
+ default @NotNull BlockPosition offset(@NotNull Axis axis, int amount) {
|
||||||
|
+ return amount == 0 ? this : switch (axis) {
|
||||||
|
+ case X -> new BlockPositionImpl(this.blockX() + amount, this.blockY(), this.blockZ());
|
||||||
|
+ case Y -> new BlockPositionImpl(this.blockX(), this.blockY() + amount, this.blockZ());
|
||||||
|
+ case Z -> new BlockPositionImpl(this.blockX(), this.blockY(), this.blockZ() + amount);
|
||||||
|
+ };
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
diff --git a/src/main/java/io/papermc/paper/math/BlockPositionImpl.java b/src/main/java/io/papermc/paper/math/BlockPositionImpl.java
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000000000000000000000000000..eb5a3f26c7ba56c6715827f52c0013a860ec7d9a
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/main/java/io/papermc/paper/math/BlockPositionImpl.java
|
||||||
|
@@ -0,0 +1,4 @@
|
||||||
|
+package io.papermc.paper.math;
|
||||||
|
+
|
||||||
|
+record BlockPositionImpl(int blockX, int blockY, int blockZ) implements BlockPosition {
|
||||||
|
+}
|
||||||
|
diff --git a/src/main/java/io/papermc/paper/math/FinePosition.java b/src/main/java/io/papermc/paper/math/FinePosition.java
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000000000000000000000000000..d8df70d731573cf2446044925f218876d62fd7cf
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/main/java/io/papermc/paper/math/FinePosition.java
|
||||||
|
@@ -0,0 +1,56 @@
|
||||||
|
+package io.papermc.paper.math;
|
||||||
|
+
|
||||||
|
+import org.bukkit.util.NumberConversions;
|
||||||
|
+import org.bukkit.util.Vector;
|
||||||
|
+import org.jetbrains.annotations.ApiStatus;
|
||||||
|
+import org.jetbrains.annotations.NotNull;
|
||||||
|
+
|
||||||
|
+/**
|
||||||
|
+ * A position represented with doubles.
|
||||||
|
+ * <p>
|
||||||
|
+ * <b>May see breaking changes until Experimental annotation is removed.</b>
|
||||||
|
+ * @see BlockPosition
|
||||||
|
+ */
|
||||||
|
+@ApiStatus.Experimental
|
||||||
|
+public interface FinePosition extends Position {
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ default int blockX() {
|
||||||
|
+ return NumberConversions.floor(this.x());
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ default int blockY() {
|
||||||
|
+ return NumberConversions.floor(this.y());
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ default int blockZ() {
|
||||||
|
+ return NumberConversions.floor(this.z());
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ default boolean isBlock() {
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ default boolean isFine() {
|
||||||
|
+ return true;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ default @NotNull BlockPosition toBlock() {
|
||||||
|
+ return new BlockPositionImpl(this.blockX(), this.blockY(), this.blockZ());
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ default @NotNull FinePosition offset(int x, int y, int z) {
|
||||||
|
+ return this.offset((double) x, y, z);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ default @NotNull FinePosition offset(double x, double y, double z) {
|
||||||
|
+ return x == 0.0 && y == 0.0 && z == 0.0 ? this : new FinePositionImpl(this.x() + x, this.y() + y, this.z() + z);
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
diff --git a/src/main/java/io/papermc/paper/math/FinePositionImpl.java b/src/main/java/io/papermc/paper/math/FinePositionImpl.java
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000000000000000000000000000..93476aaf8d21efb5a30b6d2cc2eeda8100fb72d0
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/main/java/io/papermc/paper/math/FinePositionImpl.java
|
||||||
|
@@ -0,0 +1,4 @@
|
||||||
|
+package io.papermc.paper.math;
|
||||||
|
+
|
||||||
|
+record FinePositionImpl(double x, double y, double z) implements FinePosition {
|
||||||
|
+}
|
||||||
|
diff --git a/src/main/java/io/papermc/paper/math/Position.java b/src/main/java/io/papermc/paper/math/Position.java
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000000000000000000000000000..300da713dcc303b340efad70efe57facf5422964
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/main/java/io/papermc/paper/math/Position.java
|
||||||
|
@@ -0,0 +1,184 @@
|
||||||
|
+package io.papermc.paper.math;
|
||||||
|
+
|
||||||
|
+import org.bukkit.Location;
|
||||||
|
+import org.bukkit.World;
|
||||||
|
+import org.bukkit.util.Vector;
|
||||||
|
+import org.jetbrains.annotations.ApiStatus;
|
||||||
|
+import org.jetbrains.annotations.Contract;
|
||||||
|
+import org.jetbrains.annotations.NotNull;
|
||||||
|
+
|
||||||
|
+/**
|
||||||
|
+ * Common interface for {@link FinePosition} and {@link BlockPosition}.
|
||||||
|
+ * <p>
|
||||||
|
+ * <b>May see breaking changes until Experimental annotation is removed.</b>
|
||||||
|
+ */
|
||||||
|
+@ApiStatus.Experimental
|
||||||
|
+public interface Position {
|
||||||
|
+
|
||||||
|
+ FinePosition FINE_ZERO = new FinePositionImpl(0, 0, 0);
|
||||||
|
+ BlockPosition BLOCK_ZERO = new BlockPositionImpl(0, 0, 0);
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Gets the block x value for this position
|
||||||
|
+ *
|
||||||
|
+ * @return the block x value
|
||||||
|
+ */
|
||||||
|
+ int blockX();
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Gets the block x value for this position
|
||||||
|
+ *
|
||||||
|
+ * @return the block x value
|
||||||
|
+ */
|
||||||
|
+ int blockY();
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Gets the block x value for this position
|
||||||
|
+ *
|
||||||
|
+ * @return the block x value
|
||||||
|
+ */
|
||||||
|
+ int blockZ();
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Gets the x value for this position
|
||||||
|
+ *
|
||||||
|
+ * @return the x value
|
||||||
|
+ */
|
||||||
|
+ double x();
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Gets the y value for this position
|
||||||
|
+ *
|
||||||
|
+ * @return the y value
|
||||||
|
+ */
|
||||||
|
+ double y();
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Gets the z value for this position
|
||||||
|
+ *
|
||||||
|
+ * @return the z value
|
||||||
|
+ */
|
||||||
|
+ double z();
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Checks of this position represents a {@link BlockPosition}
|
||||||
|
+ *
|
||||||
|
+ * @return true if block
|
||||||
|
+ */
|
||||||
|
+ boolean isBlock();
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Checks if this position represents a {@link FinePosition}
|
||||||
|
+ *
|
||||||
|
+ * @return true if fine
|
||||||
|
+ */
|
||||||
|
+ boolean isFine();
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Returns a position offset by the specified amounts.
|
||||||
|
+ *
|
||||||
|
+ * @param x x value to offset
|
||||||
|
+ * @param y y value to offset
|
||||||
|
+ * @param z z value to offset
|
||||||
|
+ * @return the offset position
|
||||||
|
+ */
|
||||||
|
+ @NotNull Position offset(int x, int y, int z);
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Returns a position offset by the specified amounts.
|
||||||
|
+ *
|
||||||
|
+ * @param x x value to offset
|
||||||
|
+ * @param y y value to offset
|
||||||
|
+ * @param z z value to offset
|
||||||
|
+ * @return the offset position
|
||||||
|
+ */
|
||||||
|
+ @NotNull FinePosition offset(double x, double y, double z);
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Returns a new position at the center of the block position this represents
|
||||||
|
+ *
|
||||||
|
+ * @return a new center position
|
||||||
|
+ */
|
||||||
|
+ @Contract(value = "-> new", pure = true)
|
||||||
|
+ default @NotNull FinePosition toCenter() {
|
||||||
|
+ return new FinePositionImpl(this.blockX() + 0.5, this.blockY() + 0.5, this.blockZ() + 0.5);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Returns the block position of this position
|
||||||
|
+ * or itself if it already is a block position
|
||||||
|
+ *
|
||||||
|
+ * @return the block position
|
||||||
|
+ */
|
||||||
|
+ @Contract(pure = true)
|
||||||
|
+ @NotNull BlockPosition toBlock();
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Converts this position to a vector
|
||||||
|
+ *
|
||||||
|
+ * @return a new vector
|
||||||
|
+ */
|
||||||
|
+ @Contract(value = "-> new", pure = true)
|
||||||
|
+ default @NotNull Vector toVector() {
|
||||||
|
+ return new Vector(this.x(), this.y(), this.z());
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Creates a new location object at this position with the specified world
|
||||||
|
+ *
|
||||||
|
+ * @param world the world for the location object
|
||||||
|
+ * @return a new location
|
||||||
|
+ */
|
||||||
|
+ @Contract(value = "_ -> new", pure = true)
|
||||||
|
+ default @NotNull Location toLocation(@NotNull World world) {
|
||||||
|
+ return new Location(world, this.x(), this.y(), this.z());
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Creates a position at the coordinates
|
||||||
|
+ *
|
||||||
|
+ * @param x x coord
|
||||||
|
+ * @param y y coord
|
||||||
|
+ * @param z z coord
|
||||||
|
+ * @return a position with those coords
|
||||||
|
+ */
|
||||||
|
+ @Contract(value = "_, _, _ -> new", pure = true)
|
||||||
|
+ static @NotNull BlockPosition block(int x, int y, int z) {
|
||||||
|
+ return new BlockPositionImpl(x, y, z);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Creates a position from the location.
|
||||||
|
+ *
|
||||||
|
+ * @param location the location to copy the position of
|
||||||
|
+ * @return a new position at that location
|
||||||
|
+ */
|
||||||
|
+ @Contract(value = "_ -> new", pure = true)
|
||||||
|
+ static @NotNull BlockPosition block(@NotNull Location location) {
|
||||||
|
+ return new BlockPositionImpl(location.getBlockX(), location.getBlockY(), location.getBlockZ());
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Creates a position at the coordinates
|
||||||
|
+ *
|
||||||
|
+ * @param x x coord
|
||||||
|
+ * @param y y coord
|
||||||
|
+ * @param z z coord
|
||||||
|
+ * @return a position with those coords
|
||||||
|
+ */
|
||||||
|
+ @Contract(value = "_, _, _ -> new", pure = true)
|
||||||
|
+ static @NotNull FinePosition fine(double x, double y, double z) {
|
||||||
|
+ return new FinePositionImpl(x, y, z);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Creates a position from the location.
|
||||||
|
+ *
|
||||||
|
+ * @param location the location to copy the position of
|
||||||
|
+ * @return a new position at that location
|
||||||
|
+ */
|
||||||
|
+ @Contract(value = "_ -> new", pure = true)
|
||||||
|
+ static @NotNull FinePosition fine(@NotNull Location location) {
|
||||||
|
+ return new FinePositionImpl(location.getX(), location.getY(), location.getZ());
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
|
||||||
|
index 7c4db051472fb6a6c6d24092dc6f75487356690a..3b99f359f556e6f2c341d55fa69b7462e69b6546 100644
|
||||||
|
--- a/src/main/java/org/bukkit/Location.java
|
||||||
|
+++ b/src/main/java/org/bukkit/Location.java
|
||||||
|
@@ -20,7 +20,7 @@ import org.jetbrains.annotations.Nullable;
|
||||||
|
* magnitude than 360 are valid, but may be normalized to any other equivalent
|
||||||
|
* representation by the implementation.
|
||||||
|
*/
|
||||||
|
-public class Location implements Cloneable, ConfigurationSerializable {
|
||||||
|
+public class Location implements Cloneable, ConfigurationSerializable, io.papermc.paper.math.FinePosition { // Paper
|
||||||
|
private Reference<World> world;
|
||||||
|
private double x;
|
||||||
|
private double y;
|
||||||
|
@@ -706,4 +706,26 @@ public class Location implements Cloneable, ConfigurationSerializable {
|
||||||
|
}
|
||||||
|
return pitch;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ // Paper - add Position
|
||||||
|
+ @Override
|
||||||
|
+ public double x() {
|
||||||
|
+ return this.getX();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public double y() {
|
||||||
|
+ return this.getY();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public double z() {
|
||||||
|
+ return this.getZ();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public @NotNull Location toLocation(@NotNull World world) {
|
||||||
|
+ return new Location(world, this.x(), this.y(), this.z(), this.getYaw(), this.getPitch());
|
||||||
|
+ }
|
||||||
|
+ // Paper end
|
||||||
|
}
|
@ -2791,7 +2791,7 @@ index 0000000000000000000000000000000000000000..5989ee21297935651b0edd44b8239e65
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||||
index c800da7aba43de995682eb724ccf8b7066d6cad3..557cf1ff29e16fa942545ceca14696c2a50b2d4d 100644
|
index 0084898567e8bb74fa271b65b56523a5c26d387c..e24589a4cb42b0163e4a1455b8b11d7130b5cd41 100644
|
||||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||||
@@ -802,7 +802,6 @@ public final class Bukkit {
|
@@ -802,7 +802,6 @@ public final class Bukkit {
|
||||||
@ -2803,10 +2803,10 @@ index c800da7aba43de995682eb724ccf8b7066d6cad3..557cf1ff29e16fa942545ceca14696c2
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||||
index 4d5c3af2e1f0030aa7415fbe9d11fe3580854fd5..a2ae6b84fe20e43292f1442401a472dcce1600ec 100644
|
index 892e03189957b0072827be4fd485dd98352334e8..ac087402c90dad4b3c499fcf8507e50e9099cea5 100644
|
||||||
--- a/src/main/java/org/bukkit/Server.java
|
--- a/src/main/java/org/bukkit/Server.java
|
||||||
+++ b/src/main/java/org/bukkit/Server.java
|
+++ b/src/main/java/org/bukkit/Server.java
|
||||||
@@ -1766,6 +1766,26 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
@@ -1768,6 +1768,26 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
throw new UnsupportedOperationException("Not supported yet.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2834,18 +2834,18 @@ index 4d5c3af2e1f0030aa7415fbe9d11fe3580854fd5..a2ae6b84fe20e43292f1442401a472dc
|
|||||||
* Sends the component to the player
|
* Sends the component to the player
|
||||||
*
|
*
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index fa28b5bb0efd9d400277cd8969f38e039e6ea8ac..c9ecd5b1908e05a1b39dadcded27241672adcddf 100644
|
index 4f339debf113d103ffe0b5fdb03dfc82eafd1bd5..d45cc92ca30e79173f30aae10724beeec6d22398 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -31,6 +31,7 @@ public interface UnsafeValues {
|
@@ -32,6 +32,7 @@ public interface UnsafeValues {
|
||||||
@Deprecated(forRemoval = true) net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer legacyComponentSerializer();
|
net.kyori.adventure.text.Component resolveWithContext(net.kyori.adventure.text.Component component, org.bukkit.command.CommandSender context, org.bukkit.entity.Entity scoreboardSubject, boolean bypassPermissions) throws java.io.IOException;
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
+ void reportTimings(); // Paper
|
+ void reportTimings(); // Paper
|
||||||
Material toLegacy(Material material);
|
Material toLegacy(Material material);
|
||||||
|
|
||||||
Material fromLegacy(Material material);
|
Material fromLegacy(Material material);
|
||||||
@@ -86,4 +87,12 @@ public interface UnsafeValues {
|
@@ -87,4 +88,12 @@ public interface UnsafeValues {
|
||||||
Multimap<Attribute, AttributeModifier> getDefaultAttributeModifiers(Material material, EquipmentSlot slot);
|
Multimap<Attribute, AttributeModifier> getDefaultAttributeModifiers(Material material, EquipmentSlot slot);
|
||||||
|
|
||||||
CreativeCategory getCreativeCategory(Material material);
|
CreativeCategory getCreativeCategory(Material material);
|
@ -7,7 +7,7 @@ Subject: [PATCH] Add command line option to load extra plugin jars not in the
|
|||||||
ex: java -jar paperclip.jar nogui -add-plugin=/path/to/plugin.jar -add-plugin=/path/to/another/plugin_jar.jar
|
ex: java -jar paperclip.jar nogui -add-plugin=/path/to/plugin.jar -add-plugin=/path/to/another/plugin_jar.jar
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||||
index 557cf1ff29e16fa942545ceca14696c2a50b2d4d..a5c02f744664248f46aa35452318b6a728cd4afd 100644
|
index e24589a4cb42b0163e4a1455b8b11d7130b5cd41..71a09ed2b9863d2d339967f41ab6373ec27429d3 100644
|
||||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||||
@@ -76,6 +76,20 @@ public final class Bukkit {
|
@@ -76,6 +76,20 @@ public final class Bukkit {
|
||||||
@ -32,7 +32,7 @@ index 557cf1ff29e16fa942545ceca14696c2a50b2d4d..a5c02f744664248f46aa35452318b6a7
|
|||||||
* Attempts to set the {@link Server} singleton.
|
* Attempts to set the {@link Server} singleton.
|
||||||
* <p>
|
* <p>
|
||||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||||
index a2ae6b84fe20e43292f1442401a472dcce1600ec..da13ae75ca1892c21a35aff02f92b91783a868bf 100644
|
index ac087402c90dad4b3c499fcf8507e50e9099cea5..a4f8035b40eebff8afe01788781128b04247f28c 100644
|
||||||
--- a/src/main/java/org/bukkit/Server.java
|
--- a/src/main/java/org/bukkit/Server.java
|
||||||
+++ b/src/main/java/org/bukkit/Server.java
|
+++ b/src/main/java/org/bukkit/Server.java
|
||||||
@@ -61,6 +61,18 @@ import org.jetbrains.annotations.Nullable;
|
@@ -61,6 +61,18 @@ import org.jetbrains.annotations.Nullable;
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add getTPS method
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||||
index a5c02f744664248f46aa35452318b6a728cd4afd..3603bcdadeea10f2babe8d6c609d7eaee3f0f89c 100644
|
index 71a09ed2b9863d2d339967f41ab6373ec27429d3..397f57f0ab4844fb88c60681bf6e6e3db8a98945 100644
|
||||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||||
@@ -1889,6 +1889,17 @@ public final class Bukkit {
|
@@ -1891,6 +1891,17 @@ public final class Bukkit {
|
||||||
return server.getEntity(uuid);
|
return server.getEntity(uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,10 +27,10 @@ index a5c02f744664248f46aa35452318b6a728cd4afd..3603bcdadeea10f2babe8d6c609d7eae
|
|||||||
* Get the advancement specified by this key.
|
* Get the advancement specified by this key.
|
||||||
*
|
*
|
||||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||||
index da13ae75ca1892c21a35aff02f92b91783a868bf..36f5e47ffcdce23b0b5594881fdd49a3a3337578 100644
|
index a4f8035b40eebff8afe01788781128b04247f28c..3f3531e208472a0e76f76e2b1a08a699527cef8f 100644
|
||||||
--- a/src/main/java/org/bukkit/Server.java
|
--- a/src/main/java/org/bukkit/Server.java
|
||||||
+++ b/src/main/java/org/bukkit/Server.java
|
+++ b/src/main/java/org/bukkit/Server.java
|
||||||
@@ -1603,6 +1603,16 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
@@ -1605,6 +1605,16 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||||
@Nullable
|
@Nullable
|
||||||
Entity getEntity(@NotNull UUID uuid);
|
Entity getEntity(@NotNull UUID uuid);
|
||||||
|
|
@ -56,10 +56,10 @@ index 0000000000000000000000000000000000000000..a736d7bcdc5861a01b66ba36158db1c7
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index c9ecd5b1908e05a1b39dadcded27241672adcddf..355c46f1c1f08072446f3cc92c0d22898933a7fc 100644
|
index d45cc92ca30e79173f30aae10724beeec6d22398..c67d2e96e30261e480f1df96464befac03d78a69 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -94,5 +94,12 @@ public interface UnsafeValues {
|
@@ -95,5 +95,12 @@ public interface UnsafeValues {
|
||||||
* @return name
|
* @return name
|
||||||
*/
|
*/
|
||||||
String getTimingsServerName();
|
String getTimingsServerName();
|
@ -5,7 +5,7 @@ Subject: [PATCH] Entity Origin API
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||||
index a829779ac56a271cad463806984991b4713a27be..20c529bdd94a6bac09d9f8222f33dfc9e8d53fa9 100644
|
index bdcf5219ff1e4d4c0dc8a3423bc17b453b779473..a4dfac73b8510f0dddd65751b8430be1abdabbdd 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||||
@@ -698,5 +698,15 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
@@ -698,5 +698,15 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose server CommandMap
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||||
index 3603bcdadeea10f2babe8d6c609d7eaee3f0f89c..5475f7df443a31e839d353e251b0d9d55e53a84f 100644
|
index 397f57f0ab4844fb88c60681bf6e6e3db8a98945..1035ce181415a19f8d6460f70d3d900e3f7017d3 100644
|
||||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||||
@@ -2090,6 +2090,19 @@ public final class Bukkit {
|
@@ -2092,6 +2092,19 @@ public final class Bukkit {
|
||||||
return server.getUnsafe();
|
return server.getUnsafe();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,10 +29,10 @@ index 3603bcdadeea10f2babe8d6c609d7eaee3f0f89c..5475f7df443a31e839d353e251b0d9d5
|
|||||||
public static Server.Spigot spigot() {
|
public static Server.Spigot spigot() {
|
||||||
return server.spigot();
|
return server.spigot();
|
||||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||||
index 36f5e47ffcdce23b0b5594881fdd49a3a3337578..2dac2c6e01b4f230750605ab1f49317927705c6b 100644
|
index 3f3531e208472a0e76f76e2b1a08a699527cef8f..6a7b91af3e738613cf79c13e2844efe9a2efd254 100644
|
||||||
--- a/src/main/java/org/bukkit/Server.java
|
--- a/src/main/java/org/bukkit/Server.java
|
||||||
+++ b/src/main/java/org/bukkit/Server.java
|
+++ b/src/main/java/org/bukkit/Server.java
|
||||||
@@ -1613,6 +1613,15 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
@@ -1615,6 +1615,15 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||||
public double[] getTPS();
|
public double[] getTPS();
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
@ -6,7 +6,7 @@ Subject: [PATCH] Graduate bungeecord chat API from spigot subclasses
|
|||||||
Change Javadoc to be accurate
|
Change Javadoc to be accurate
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||||
index 5475f7df443a31e839d353e251b0d9d55e53a84f..7a8eaf46ecd37163dbe34beb2cf8754bddae302f 100644
|
index 1035ce181415a19f8d6460f70d3d900e3f7017d3..316146305465b68b703e898206745de94ad5350f 100644
|
||||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||||
@@ -379,6 +379,30 @@ public final class Bukkit {
|
@@ -379,6 +379,30 @@ public final class Bukkit {
|
||||||
@ -41,7 +41,7 @@ index 5475f7df443a31e839d353e251b0d9d55e53a84f..7a8eaf46ecd37163dbe34beb2cf8754b
|
|||||||
* Gets the name of the update folder. The update folder is used to safely
|
* Gets the name of the update folder. The update folder is used to safely
|
||||||
* update plugins at the right moment on a plugin load.
|
* update plugins at the right moment on a plugin load.
|
||||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||||
index 2dac2c6e01b4f230750605ab1f49317927705c6b..1aed052ea337f2875b581064bd8e79d8a5a1a9ec 100644
|
index 6a7b91af3e738613cf79c13e2844efe9a2efd254..bef555b3de44fed312b45a5d5cd811b18fda88c8 100644
|
||||||
--- a/src/main/java/org/bukkit/Server.java
|
--- a/src/main/java/org/bukkit/Server.java
|
||||||
+++ b/src/main/java/org/bukkit/Server.java
|
+++ b/src/main/java/org/bukkit/Server.java
|
||||||
@@ -312,6 +312,30 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
@@ -312,6 +312,30 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
@ -211,12 +211,13 @@ index 0000000000000000000000000000000000000000..c06ea3942447d4824b83ff839cb449fb
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/exception/ServerInternalException.java b/src/main/java/com/destroystokyo/paper/exception/ServerInternalException.java
|
diff --git a/src/main/java/com/destroystokyo/paper/exception/ServerInternalException.java b/src/main/java/com/destroystokyo/paper/exception/ServerInternalException.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..e762ed0dbad51625e65fef2e1898679108459a36
|
index 0000000000000000000000000000000000000000..2c3effca7c9d6c904cbe248d312b74e2cd360acf
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/exception/ServerInternalException.java
|
+++ b/src/main/java/com/destroystokyo/paper/exception/ServerInternalException.java
|
||||||
@@ -0,0 +1,35 @@
|
@@ -0,0 +1,36 @@
|
||||||
+package com.destroystokyo.paper.exception;
|
+package com.destroystokyo.paper.exception;
|
||||||
+
|
+
|
||||||
|
+import java.util.logging.Level;
|
||||||
+import org.bukkit.Bukkit;
|
+import org.bukkit.Bukkit;
|
||||||
+import com.destroystokyo.paper.event.server.ServerExceptionEvent;
|
+import com.destroystokyo.paper.event.server.ServerExceptionEvent;
|
||||||
+
|
+
|
||||||
@ -246,7 +247,7 @@ index 0000000000000000000000000000000000000000..e762ed0dbad51625e65fef2e18986791
|
|||||||
+ Bukkit.getPluginManager().callEvent(new ServerExceptionEvent(new ServerInternalException(cause)));
|
+ Bukkit.getPluginManager().callEvent(new ServerExceptionEvent(new ServerInternalException(cause)));
|
||||||
+ ;
|
+ ;
|
||||||
+ } catch (Throwable t) {
|
+ } catch (Throwable t) {
|
||||||
+ t.printStackTrace(); // Don't want to rethrow!
|
+ Bukkit.getLogger().log(Level.WARNING, "Exception posting ServerExceptionEvent", t); // Don't want to rethrow!
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
@ -6,7 +6,7 @@ Subject: [PATCH] Use ASM for event executors.
|
|||||||
Uses method handles for private or static methods.
|
Uses method handles for private or static methods.
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index 7b8196db1fd1e283dc9ef71e3fe5137cc5920ba9..f0f8047cb3a43b447dc50b730dab3d0bc471b25a 100644
|
index c9f9174a085174b96897c013e0ecb79738c2e9e3..9d650b937610d83748b30d724cee97afd715167f 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -39,6 +39,9 @@ dependencies {
|
@@ -39,6 +39,9 @@ dependencies {
|
||||||
@ -118,10 +118,10 @@ index 0000000000000000000000000000000000000000..c83672427324bd068ed52916f700b684
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/event/executor/asm/ASMEventExecutorGenerator.java b/src/main/java/com/destroystokyo/paper/event/executor/asm/ASMEventExecutorGenerator.java
|
diff --git a/src/main/java/com/destroystokyo/paper/event/executor/asm/ASMEventExecutorGenerator.java b/src/main/java/com/destroystokyo/paper/event/executor/asm/ASMEventExecutorGenerator.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..b8d5c13980858dc27fb5383726b7ebcaf14adcb8
|
index 0000000000000000000000000000000000000000..084c31af1a7ba32bb4c3dc8f16f67fd09ce0b6a4
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/event/executor/asm/ASMEventExecutorGenerator.java
|
+++ b/src/main/java/com/destroystokyo/paper/event/executor/asm/ASMEventExecutorGenerator.java
|
||||||
@@ -0,0 +1,51 @@
|
@@ -0,0 +1,54 @@
|
||||||
+package com.destroystokyo.paper.event.executor.asm;
|
+package com.destroystokyo.paper.event.executor.asm;
|
||||||
+
|
+
|
||||||
+import java.lang.reflect.Method;
|
+import java.lang.reflect.Method;
|
||||||
@ -136,6 +136,9 @@ index 0000000000000000000000000000000000000000..b8d5c13980858dc27fb5383726b7ebca
|
|||||||
+import static org.objectweb.asm.Opcodes.*;
|
+import static org.objectweb.asm.Opcodes.*;
|
||||||
+
|
+
|
||||||
+public class ASMEventExecutorGenerator {
|
+public class ASMEventExecutorGenerator {
|
||||||
|
+
|
||||||
|
+ private static final String EXECUTE_DESCRIPTOR = "(Lorg/bukkit/event/Listener;Lorg/bukkit/event/Event;)V";
|
||||||
|
+
|
||||||
+ @NotNull
|
+ @NotNull
|
||||||
+ public static byte[] generateEventExecutor(@NotNull Method m, @NotNull String name) {
|
+ public static byte[] generateEventExecutor(@NotNull Method m, @NotNull String name) {
|
||||||
+ ClassWriter writer = new ClassWriter(ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS);
|
+ ClassWriter writer = new ClassWriter(ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS);
|
||||||
@ -147,7 +150,7 @@ index 0000000000000000000000000000000000000000..b8d5c13980858dc27fb5383726b7ebca
|
|||||||
+ methodGenerator.returnValue();
|
+ methodGenerator.returnValue();
|
||||||
+ methodGenerator.endMethod();
|
+ methodGenerator.endMethod();
|
||||||
+ // Generate the execute method
|
+ // Generate the execute method
|
||||||
+ methodGenerator = new GeneratorAdapter(writer.visitMethod(ACC_PUBLIC, "execute", "(Lorg/bukkit/event/Listener;Lorg/bukkit/event/Event;)V", null, null), ACC_PUBLIC, "execute", "(Lorg/bukkit/event/Listener;Lorg/bukkit/event/Listener;)V");
|
+ methodGenerator = new GeneratorAdapter(writer.visitMethod(ACC_PUBLIC, "execute", EXECUTE_DESCRIPTOR, null, null), ACC_PUBLIC, "execute", EXECUTE_DESCRIPTOR);
|
||||||
+ methodGenerator.loadArg(0);
|
+ methodGenerator.loadArg(0);
|
||||||
+ methodGenerator.checkCast(Type.getType(m.getDeclaringClass()));
|
+ methodGenerator.checkCast(Type.getType(m.getDeclaringClass()));
|
||||||
+ methodGenerator.loadArg(1);
|
+ methodGenerator.loadArg(1);
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add command to reload permissions.yml and require confirm to
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||||
index 7a8eaf46ecd37163dbe34beb2cf8754bddae302f..9463169bdb45a53ad774a0e3a5ec07704508685f 100644
|
index 316146305465b68b703e898206745de94ad5350f..6311d7ef36b3c6922c73695c353c561c507f2128 100644
|
||||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||||
@@ -2125,6 +2125,13 @@ public final class Bukkit {
|
@@ -2127,6 +2127,13 @@ public final class Bukkit {
|
||||||
public static org.bukkit.command.CommandMap getCommandMap() {
|
public static org.bukkit.command.CommandMap getCommandMap() {
|
||||||
return server.getCommandMap();
|
return server.getCommandMap();
|
||||||
}
|
}
|
||||||
@ -24,10 +24,10 @@ index 7a8eaf46ecd37163dbe34beb2cf8754bddae302f..9463169bdb45a53ad774a0e3a5ec0770
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||||
index 1aed052ea337f2875b581064bd8e79d8a5a1a9ec..cd51a1a9a59cfa868237ab750d98d9df8464152f 100644
|
index bef555b3de44fed312b45a5d5cd811b18fda88c8..994f494fe7cace5c88738858def4051788391a3c 100644
|
||||||
--- a/src/main/java/org/bukkit/Server.java
|
--- a/src/main/java/org/bukkit/Server.java
|
||||||
+++ b/src/main/java/org/bukkit/Server.java
|
+++ b/src/main/java/org/bukkit/Server.java
|
||||||
@@ -1874,4 +1874,6 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
@@ -1876,4 +1876,6 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||||
@NotNull
|
@NotNull
|
||||||
Spigot spigot();
|
Spigot spigot();
|
||||||
// Spigot end
|
// Spigot end
|
@ -5,19 +5,19 @@ Subject: [PATCH] Custom replacement for eaten items
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/event/player/PlayerItemConsumeEvent.java b/src/main/java/org/bukkit/event/player/PlayerItemConsumeEvent.java
|
diff --git a/src/main/java/org/bukkit/event/player/PlayerItemConsumeEvent.java b/src/main/java/org/bukkit/event/player/PlayerItemConsumeEvent.java
|
||||||
index c2793f3ef01c1246c130971c17e1c2bf8f551435..373f4b5b5185aa81ff728da89c9cc4e0ccf87889 100644
|
index 5c054eb531e3caf17c179aff6a712fb8c33d8f77..6110d0417340710333b44312d82c7bd5165a8954 100644
|
||||||
--- a/src/main/java/org/bukkit/event/player/PlayerItemConsumeEvent.java
|
--- a/src/main/java/org/bukkit/event/player/PlayerItemConsumeEvent.java
|
||||||
+++ b/src/main/java/org/bukkit/event/player/PlayerItemConsumeEvent.java
|
+++ b/src/main/java/org/bukkit/event/player/PlayerItemConsumeEvent.java
|
||||||
@@ -22,6 +22,7 @@ public class PlayerItemConsumeEvent extends PlayerEvent implements Cancellable {
|
@@ -24,6 +24,7 @@ public class PlayerItemConsumeEvent extends PlayerEvent implements Cancellable {
|
||||||
private static final HandlerList handlers = new HandlerList();
|
|
||||||
private boolean isCancelled = false;
|
private boolean isCancelled = false;
|
||||||
private ItemStack item;
|
private ItemStack item;
|
||||||
|
private final EquipmentSlot hand;
|
||||||
+ @Nullable private ItemStack replacement; // Paper
|
+ @Nullable private ItemStack replacement; // Paper
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param player the player consuming
|
* @param player the player consuming
|
||||||
@@ -58,6 +59,29 @@ public class PlayerItemConsumeEvent extends PlayerEvent implements Cancellable {
|
@@ -82,6 +83,29 @@ public class PlayerItemConsumeEvent extends PlayerEvent implements Cancellable {
|
||||||
}
|
return hand;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases
|
|||||||
Reload the aliases stored in commands.yml
|
Reload the aliases stored in commands.yml
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||||
index 9463169bdb45a53ad774a0e3a5ec07704508685f..fe5f6494fb0610dd11e59793701b2182fa862419 100644
|
index 6311d7ef36b3c6922c73695c353c561c507f2128..a314ff1363cb527fa7e1b366f9191939e9c7ca6e 100644
|
||||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||||
@@ -2132,6 +2132,15 @@ public final class Bukkit {
|
@@ -2134,6 +2134,15 @@ public final class Bukkit {
|
||||||
public static void reloadPermissions() {
|
public static void reloadPermissions() {
|
||||||
server.reloadPermissions();
|
server.reloadPermissions();
|
||||||
}
|
}
|
||||||
@ -26,10 +26,10 @@ index 9463169bdb45a53ad774a0e3a5ec07704508685f..fe5f6494fb0610dd11e59793701b2182
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||||
index cd51a1a9a59cfa868237ab750d98d9df8464152f..29e71b746adcec45657787bf38427027508b0043 100644
|
index 994f494fe7cace5c88738858def4051788391a3c..610475aff60b7f19c4bedb932985c736fb890684 100644
|
||||||
--- a/src/main/java/org/bukkit/Server.java
|
--- a/src/main/java/org/bukkit/Server.java
|
||||||
+++ b/src/main/java/org/bukkit/Server.java
|
+++ b/src/main/java/org/bukkit/Server.java
|
||||||
@@ -1876,4 +1876,6 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
@@ -1878,4 +1878,6 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||||
// Spigot end
|
// Spigot end
|
||||||
|
|
||||||
void reloadPermissions(); // Paper
|
void reloadPermissions(); // Paper
|
@ -3,13 +3,14 @@ From: Techcable <Techcable@outlook.com>
|
|||||||
Date: Fri, 16 Dec 2016 21:25:39 -0600
|
Date: Fri, 16 Dec 2016 21:25:39 -0600
|
||||||
Subject: [PATCH] Add ProjectileCollideEvent
|
Subject: [PATCH] Add ProjectileCollideEvent
|
||||||
|
|
||||||
|
Now deprecated and replaced with ProjectileHitEvent
|
||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/ProjectileCollideEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/ProjectileCollideEvent.java
|
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/ProjectileCollideEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/ProjectileCollideEvent.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..453663893021768ae21d4980ce17ffba55d9e129
|
index 0000000000000000000000000000000000000000..6ae2bc3d952d34f298220738856024e0b6594199
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/event/entity/ProjectileCollideEvent.java
|
+++ b/src/main/java/com/destroystokyo/paper/event/entity/ProjectileCollideEvent.java
|
||||||
@@ -0,0 +1,67 @@
|
@@ -0,0 +1,69 @@
|
||||||
+package com.destroystokyo.paper.event.entity;
|
+package com.destroystokyo.paper.event.entity;
|
||||||
+
|
+
|
||||||
+import org.bukkit.entity.Entity;
|
+import org.bukkit.entity.Entity;
|
||||||
@ -20,10 +21,12 @@ index 0000000000000000000000000000000000000000..453663893021768ae21d4980ce17ffba
|
|||||||
+import org.jetbrains.annotations.NotNull;
|
+import org.jetbrains.annotations.NotNull;
|
||||||
+
|
+
|
||||||
+/**
|
+/**
|
||||||
+ * Called when an projectile collides with an entity
|
+ * Called when a projectile collides with an entity
|
||||||
+ * <p>
|
+ * <p>
|
||||||
+ * This event is called <b>before</b> {@link org.bukkit.event.entity.EntityDamageByEntityEvent}, and cancelling it will allow the projectile to continue flying
|
+ * This event is called <b>before</b> {@link org.bukkit.event.entity.EntityDamageByEntityEvent}, and cancelling it will allow the projectile to continue flying
|
||||||
|
+ * @deprecated Deprecated, use {@link org.bukkit.event.entity.ProjectileHitEvent} and check if there is a hit entity
|
||||||
+ */
|
+ */
|
||||||
|
+@Deprecated
|
||||||
+public class ProjectileCollideEvent extends EntityEvent implements Cancellable {
|
+public class ProjectileCollideEvent extends EntityEvent implements Cancellable {
|
||||||
+ @NotNull private final Entity collidedWith;
|
+ @NotNull private final Entity collidedWith;
|
||||||
+
|
+
|
@ -7,7 +7,7 @@ Provides counts without the ineffeciency of using .getEntities().size()
|
|||||||
which creates copy of the collections.
|
which creates copy of the collections.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||||
index 887b85849803cee22a41a701b43cdc9085ba0dc3..e0683e69029e8ac423bda79521045b06673eabf3 100644
|
index 75a87b221cc0f6334c5283130a7b2bfdf4eedd03..e6c9942f7820f2b8750c1bb0825c8bdbc6f4b99e 100644
|
||||||
--- a/src/main/java/org/bukkit/World.java
|
--- a/src/main/java/org/bukkit/World.java
|
||||||
+++ b/src/main/java/org/bukkit/World.java
|
+++ b/src/main/java/org/bukkit/World.java
|
||||||
@@ -45,6 +45,33 @@ import org.jetbrains.annotations.Nullable;
|
@@ -45,6 +45,33 @@ import org.jetbrains.annotations.Nullable;
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add configuration option to prevent player names from being
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||||
index fe5f6494fb0610dd11e59793701b2182fa862419..05908e512b0f2c01124737cf68df79c6c04518ee 100644
|
index a314ff1363cb527fa7e1b366f9191939e9c7ca6e..d3d8c5ac59cee2ec24e91223e0c994016a4f9752 100644
|
||||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||||
@@ -2141,6 +2141,16 @@ public final class Bukkit {
|
@@ -2143,6 +2143,16 @@ public final class Bukkit {
|
||||||
public static boolean reloadCommandAliases() {
|
public static boolean reloadCommandAliases() {
|
||||||
return server.reloadCommandAliases();
|
return server.reloadCommandAliases();
|
||||||
}
|
}
|
||||||
@ -27,10 +27,10 @@ index fe5f6494fb0610dd11e59793701b2182fa862419..05908e512b0f2c01124737cf68df79c6
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||||
index 29e71b746adcec45657787bf38427027508b0043..f84c37ad591f4d0e4062889941791a3aeb7c5be5 100644
|
index 610475aff60b7f19c4bedb932985c736fb890684..a8d3addae5b0ed261d6a27052ad4e54970de597c 100644
|
||||||
--- a/src/main/java/org/bukkit/Server.java
|
--- a/src/main/java/org/bukkit/Server.java
|
||||||
+++ b/src/main/java/org/bukkit/Server.java
|
+++ b/src/main/java/org/bukkit/Server.java
|
||||||
@@ -1878,4 +1878,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
@@ -1880,4 +1880,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||||
void reloadPermissions(); // Paper
|
void reloadPermissions(); // Paper
|
||||||
|
|
||||||
boolean reloadCommandAliases(); // Paper
|
boolean reloadCommandAliases(); // Paper
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix upstream javadocs
|
|||||||
Upstream still refuses to use Java 8 with the API so they are likely unaware these are even issues.
|
Upstream still refuses to use Java 8 with the API so they are likely unaware these are even issues.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||||
index 05908e512b0f2c01124737cf68df79c6c04518ee..2ff65157d511108e2902838f37732742b186af6e 100644
|
index d3d8c5ac59cee2ec24e91223e0c994016a4f9752..82757d3013e01a6bfbb685929955d3e7dad8508c 100644
|
||||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||||
@@ -1332,6 +1332,8 @@ public final class Bukkit {
|
@@ -1334,6 +1334,8 @@ public final class Bukkit {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets every player that has ever played on this server.
|
* Gets every player that has ever played on this server.
|
||||||
@ -18,8 +18,21 @@ index 05908e512b0f2c01124737cf68df79c6c04518ee..2ff65157d511108e2902838f37732742
|
|||||||
*
|
*
|
||||||
* @return an array containing all previous players
|
* @return an array containing all previous players
|
||||||
*/
|
*/
|
||||||
|
diff --git a/src/main/java/org/bukkit/ChunkSnapshot.java b/src/main/java/org/bukkit/ChunkSnapshot.java
|
||||||
|
index fb3e166ec48b8c0ebb7d541eaa1761b03a140610..cab63d678e56df0a090ee793d56def88b8c68079 100644
|
||||||
|
--- a/src/main/java/org/bukkit/ChunkSnapshot.java
|
||||||
|
+++ b/src/main/java/org/bukkit/ChunkSnapshot.java
|
||||||
|
@@ -136,7 +136,7 @@ public interface ChunkSnapshot {
|
||||||
|
* Get raw biome temperature at given coordinates
|
||||||
|
*
|
||||||
|
* @param x X-coordinate (0-15)
|
||||||
|
- * @param y Y-coordinate (0-15)
|
||||||
|
+ * @param y Y-coordinate (world minHeight (inclusive) - world maxHeight (exclusive))
|
||||||
|
* @param z Z-coordinate (0-15)
|
||||||
|
* @return temperature at given coordinate
|
||||||
|
*/
|
||||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||||
index f84c37ad591f4d0e4062889941791a3aeb7c5be5..d9566b18e6109db824cbc1732666771bf124adbf 100644
|
index a8d3addae5b0ed261d6a27052ad4e54970de597c..3485db7548e93242f99977a236eb3bcebedfb964 100644
|
||||||
--- a/src/main/java/org/bukkit/Server.java
|
--- a/src/main/java/org/bukkit/Server.java
|
||||||
+++ b/src/main/java/org/bukkit/Server.java
|
+++ b/src/main/java/org/bukkit/Server.java
|
||||||
@@ -510,13 +510,10 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
@@ -510,13 +510,10 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||||
@ -37,7 +50,7 @@ index f84c37ad591f4d0e4062889941791a3aeb7c5be5..d9566b18e6109db824cbc1732666771b
|
|||||||
*/
|
*/
|
||||||
public int getTicksPerSpawns(@NotNull SpawnCategory spawnCategory);
|
public int getTicksPerSpawns(@NotNull SpawnCategory spawnCategory);
|
||||||
|
|
||||||
@@ -1127,6 +1124,8 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
@@ -1129,6 +1126,8 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets every player that has ever played on this server.
|
* Gets every player that has ever played on this server.
|
||||||
@ -154,10 +167,10 @@ index 80910fcc46b62ee4974a659713a1a72b5b4c135b..50faa513411cdb611ae228f0c07a7dfe
|
|||||||
* @deprecated use {@link #sendActionBar(Component)}
|
* @deprecated use {@link #sendActionBar(Component)}
|
||||||
*/
|
*/
|
||||||
diff --git a/src/main/java/org/bukkit/entity/Slime.java b/src/main/java/org/bukkit/entity/Slime.java
|
diff --git a/src/main/java/org/bukkit/entity/Slime.java b/src/main/java/org/bukkit/entity/Slime.java
|
||||||
index 1119e26e270bb45f517955b19d95a9ec3d113634..4631647c64c89ffdde2d9b63bdab974acfe6cb3d 100644
|
index a5ad3250cebfeb302c58e0bfd6db1295913c927e..bfac874840cf1f36afba16ae4d176c5821a68cfb 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/Slime.java
|
--- a/src/main/java/org/bukkit/entity/Slime.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/Slime.java
|
+++ b/src/main/java/org/bukkit/entity/Slime.java
|
||||||
@@ -11,6 +11,16 @@ public interface Slime extends Mob {
|
@@ -11,6 +11,16 @@ public interface Slime extends Mob, Enemy {
|
||||||
public int getSize();
|
public int getSize();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -174,6 +187,20 @@ index 1119e26e270bb45f517955b19d95a9ec3d113634..4631647c64c89ffdde2d9b63bdab974a
|
|||||||
* @param sz The new size of the slime.
|
* @param sz The new size of the slime.
|
||||||
*/
|
*/
|
||||||
public void setSize(int sz);
|
public void setSize(int sz);
|
||||||
|
diff --git a/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java b/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java
|
||||||
|
index e9de00e9e434d36117a672fa9fbfc7c52f284b67..9a06487e0f76cd7765e6f900b7458a3cf0aa44e7 100644
|
||||||
|
--- a/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java
|
||||||
|
+++ b/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java
|
||||||
|
@@ -158,7 +158,8 @@ public class CreatureSpawnEvent extends EntitySpawnEvent {
|
||||||
|
*/
|
||||||
|
SHEARED,
|
||||||
|
/**
|
||||||
|
- * When eg an effect cloud is spawned as a result of a creeper exploding
|
||||||
|
+ * When an entity is spawned as a result of an explosion. Like an area effect cloud from
|
||||||
|
+ * a creeper or a dragon fireball.
|
||||||
|
*/
|
||||||
|
EXPLOSION,
|
||||||
|
/**
|
||||||
diff --git a/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java b/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java
|
diff --git a/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java b/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java
|
||||||
index d51d2ec1d04d9ea8a25a70d0d856f2355ebfcb4a..7ecff9fcee19fc94be784474fea620e5dd434731 100644
|
index d51d2ec1d04d9ea8a25a70d0d856f2355ebfcb4a..7ecff9fcee19fc94be784474fea620e5dd434731 100644
|
||||||
--- a/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java
|
--- a/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java
|
||||||
@ -187,6 +214,20 @@ index d51d2ec1d04d9ea8a25a70d0d856f2355ebfcb4a..7ecff9fcee19fc94be784474fea620e5
|
|||||||
*/
|
*/
|
||||||
EATING,
|
EATING,
|
||||||
/**
|
/**
|
||||||
|
diff --git a/src/main/java/org/bukkit/event/entity/PiglinBarterEvent.java b/src/main/java/org/bukkit/event/entity/PiglinBarterEvent.java
|
||||||
|
index c17ff41a688b2cbd877cda25d4ec033ac8ef5524..bd67b7cba78b9bbdd82a5a40048e658a979e3108 100644
|
||||||
|
--- a/src/main/java/org/bukkit/event/entity/PiglinBarterEvent.java
|
||||||
|
+++ b/src/main/java/org/bukkit/event/entity/PiglinBarterEvent.java
|
||||||
|
@@ -10,8 +10,7 @@ import org.jetbrains.annotations.NotNull;
|
||||||
|
/**
|
||||||
|
* Stores all data related to the bartering interaction with a piglin.
|
||||||
|
*
|
||||||
|
- * This event can be triggered by a piglin picking up an item that's on its
|
||||||
|
- * bartering list.
|
||||||
|
+ * Called when a piglin completes a barter.
|
||||||
|
*/
|
||||||
|
public class PiglinBarterEvent extends EntityEvent implements Cancellable {
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/EntityEquipment.java b/src/main/java/org/bukkit/inventory/EntityEquipment.java
|
diff --git a/src/main/java/org/bukkit/inventory/EntityEquipment.java b/src/main/java/org/bukkit/inventory/EntityEquipment.java
|
||||||
index d5b50a4a954fed35d37f03f1a277cc173ca106df..a91fa5386afd7a1137adb921ad5adb798604772f 100644
|
index d5b50a4a954fed35d37f03f1a277cc173ca106df..a91fa5386afd7a1137adb921ad5adb798604772f 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/EntityEquipment.java
|
--- a/src/main/java/org/bukkit/inventory/EntityEquipment.java
|
@ -321,10 +321,10 @@ index 0000000000000000000000000000000000000000..7b3b6ef533d32169fbeca389bd61cfc6
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||||
index 2ff65157d511108e2902838f37732742b186af6e..d5fd584c109c0a84a4259b10e7b43fae3a1da1ae 100644
|
index 82757d3013e01a6bfbb685929955d3e7dad8508c..a6a792babe69712594c18f49542feb30ff591810 100644
|
||||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||||
@@ -2153,6 +2153,83 @@ public final class Bukkit {
|
@@ -2155,6 +2155,83 @@ public final class Bukkit {
|
||||||
public static boolean suggestPlayerNamesWhenNullTabCompletions() {
|
public static boolean suggestPlayerNamesWhenNullTabCompletions() {
|
||||||
return server.suggestPlayerNamesWhenNullTabCompletions();
|
return server.suggestPlayerNamesWhenNullTabCompletions();
|
||||||
}
|
}
|
||||||
@ -409,10 +409,10 @@ index 2ff65157d511108e2902838f37732742b186af6e..d5fd584c109c0a84a4259b10e7b43fae
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||||
index d9566b18e6109db824cbc1732666771bf124adbf..fab39e4fc595c022da27e87e27bd168939e54381 100644
|
index 3485db7548e93242f99977a236eb3bcebedfb964..bf1102b4481b8c9b9c4f5ba0c561556b75fea077 100644
|
||||||
--- a/src/main/java/org/bukkit/Server.java
|
--- a/src/main/java/org/bukkit/Server.java
|
||||||
+++ b/src/main/java/org/bukkit/Server.java
|
+++ b/src/main/java/org/bukkit/Server.java
|
||||||
@@ -1886,5 +1886,74 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
@@ -1888,5 +1888,74 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||||
* @return true if player names should be suggested
|
* @return true if player names should be suggested
|
||||||
*/
|
*/
|
||||||
boolean suggestPlayerNamesWhenNullTabCompletions();
|
boolean suggestPlayerNamesWhenNullTabCompletions();
|
@ -5,7 +5,7 @@ Subject: [PATCH] Entity#fromMobSpawner()
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||||
index 20c529bdd94a6bac09d9f8222f33dfc9e8d53fa9..e598c7c90d625313b8a935418bb68e0e6cb6bc6e 100644
|
index a4dfac73b8510f0dddd65751b8430be1abdabbdd..6b0bfcfd22105fbdf09c11bbec009ba19116abd9 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||||
@@ -708,5 +708,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
@@ -708,5 +708,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
@ -14,7 +14,7 @@ it without having to shade it in the plugin and going through
|
|||||||
several layers of logging abstraction.
|
several layers of logging abstraction.
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index f0f8047cb3a43b447dc50b730dab3d0bc471b25a..435db1ffe47476bcb7067802faad7aee7e4c3f54 100644
|
index 9d650b937610d83748b30d724cee97afd715167f..3c4dd6ebc2289c44c2f5723e7920aadffdc51884 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -39,6 +39,8 @@ dependencies {
|
@@ -39,6 +39,8 @@ dependencies {
|
@ -578,7 +578,7 @@ index 270e6d8ad4358baa256cee5f16cff281f063ce3b..4a3451af454295ac3e1b688e6665cad9
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/test/java/org/bukkit/AnnotationTest.java b/src/test/java/org/bukkit/AnnotationTest.java
|
diff --git a/src/test/java/org/bukkit/AnnotationTest.java b/src/test/java/org/bukkit/AnnotationTest.java
|
||||||
index 93498307004b68b934fbfa1aeb3aaf0e97cbdac7..bbe81f7a420f913ffdcad913a3c43ff41ead41f5 100644
|
index 8275a5d7e1de39a5171e254f449a42c6defd3445..4bca64b2a44ae032730575ecba39f9737a5a1ec7 100644
|
||||||
--- a/src/test/java/org/bukkit/AnnotationTest.java
|
--- a/src/test/java/org/bukkit/AnnotationTest.java
|
||||||
+++ b/src/test/java/org/bukkit/AnnotationTest.java
|
+++ b/src/test/java/org/bukkit/AnnotationTest.java
|
||||||
@@ -48,6 +48,8 @@ public class AnnotationTest {
|
@@ -48,6 +48,8 @@ public class AnnotationTest {
|
@ -10,10 +10,10 @@ on the players login.
|
|||||||
Plugin authors need to define a key to keep it consistent between server restarts.
|
Plugin authors need to define a key to keep it consistent between server restarts.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||||
index fde34da0f7a13dee06e479fd6c5350a69beb3c95..ad2ab6e97ccf6900d19f8bfbe08181d4c7743a99 100644
|
index e57e600283702dd7fc60fa3baa1e1cc1b8574873..7be830ea0a3b24c5cdfb8e6ab62cb2ee506a4026 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
--- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
+++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||||
@@ -24,6 +24,7 @@ public class ShapedRecipe implements Recipe, Keyed {
|
@@ -26,6 +26,7 @@ public class ShapedRecipe implements Recipe, Keyed {
|
||||||
public ShapedRecipe(@NotNull ItemStack result) {
|
public ShapedRecipe(@NotNull ItemStack result) {
|
||||||
Preconditions.checkArgument(result.getType() != Material.AIR, "Recipe must have non-AIR result.");
|
Preconditions.checkArgument(result.getType() != Material.AIR, "Recipe must have non-AIR result.");
|
||||||
this.key = NamespacedKey.randomKey();
|
this.key = NamespacedKey.randomKey();
|
||||||
@ -22,10 +22,10 @@ index fde34da0f7a13dee06e479fd6c5350a69beb3c95..ad2ab6e97ccf6900d19f8bfbe08181d4
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||||
index cc3f7cccfa06a92f3ca192cb88f30f8929c02dfd..75b47c608d0a902e4ea5f03c395667f47dec8980 100644
|
index df4c52f1f0be2409c7506b09167bd58b5602fa7a..62675962d1b7882b953d2618aed1f363c046e97d 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
--- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
+++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||||
@@ -25,6 +25,7 @@ public class ShapelessRecipe implements Recipe, Keyed {
|
@@ -27,6 +27,7 @@ public class ShapelessRecipe implements Recipe, Keyed {
|
||||||
public ShapelessRecipe(@NotNull ItemStack result) {
|
public ShapelessRecipe(@NotNull ItemStack result) {
|
||||||
Preconditions.checkArgument(result.getType() != Material.AIR, "Recipe must have non-AIR result.");
|
Preconditions.checkArgument(result.getType() != Material.AIR, "Recipe must have non-AIR result.");
|
||||||
this.key = NamespacedKey.randomKey();
|
this.key = NamespacedKey.randomKey();
|
@ -48,7 +48,7 @@ index 0000000000000000000000000000000000000000..3ad231aa3206c8cfd5ec995249584ceb
|
|||||||
+ private boolean shouldAbortSpawn;
|
+ private boolean shouldAbortSpawn;
|
||||||
+
|
+
|
||||||
+ public PreCreatureSpawnEvent(@NotNull Location location, @NotNull EntityType type, @NotNull CreatureSpawnEvent.SpawnReason reason) {
|
+ public PreCreatureSpawnEvent(@NotNull Location location, @NotNull EntityType type, @NotNull CreatureSpawnEvent.SpawnReason reason) {
|
||||||
+ this.location = Preconditions.checkNotNull(location, "Location may not be null").clone();
|
+ this.location = Preconditions.checkNotNull(location, "Location may not be null");
|
||||||
+ this.type = Preconditions.checkNotNull(type, "Type may not be null");
|
+ this.type = Preconditions.checkNotNull(type, "Type may not be null");
|
||||||
+ this.reason = Preconditions.checkNotNull(reason, "Reason may not be null");
|
+ this.reason = Preconditions.checkNotNull(reason, "Reason may not be null");
|
||||||
+ }
|
+ }
|
@ -7,10 +7,10 @@ This allows you to create already filled textures on Skulls to avoid texture loo
|
|||||||
which commonly cause rate limit issues with Mojang API
|
which commonly cause rate limit issues with Mojang API
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/block/Skull.java b/src/main/java/org/bukkit/block/Skull.java
|
diff --git a/src/main/java/org/bukkit/block/Skull.java b/src/main/java/org/bukkit/block/Skull.java
|
||||||
index 83ca284e02f0c2229126d8f40cb33b18f44524d3..d89da5e370d95cfbc4dac776a64e402c5c1f5fc1 100644
|
index 8d4093a413ca14a1c4c24a2a1b74c1d574943ffa..c7502a3913cf14e66559c21489d6f2205f3eb06a 100644
|
||||||
--- a/src/main/java/org/bukkit/block/Skull.java
|
--- a/src/main/java/org/bukkit/block/Skull.java
|
||||||
+++ b/src/main/java/org/bukkit/block/Skull.java
|
+++ b/src/main/java/org/bukkit/block/Skull.java
|
||||||
@@ -62,6 +62,20 @@ public interface Skull extends TileState {
|
@@ -63,6 +63,20 @@ public interface Skull extends TileState {
|
||||||
*/
|
*/
|
||||||
public void setOwningPlayer(@NotNull OfflinePlayer player);
|
public void setOwningPlayer(@NotNull OfflinePlayer player);
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ index 83ca284e02f0c2229126d8f40cb33b18f44524d3..d89da5e370d95cfbc4dac776a64e402c
|
|||||||
/**
|
/**
|
||||||
* Gets the profile of the player who owns the skull. This player profile
|
* Gets the profile of the player who owns the skull. This player profile
|
||||||
* may appear as the texture depending on skull type.
|
* may appear as the texture depending on skull type.
|
||||||
@@ -69,6 +83,7 @@ public interface Skull extends TileState {
|
@@ -70,6 +84,7 @@ public interface Skull extends TileState {
|
||||||
* @return the profile of the owning player
|
* @return the profile of the owning player
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
@ -39,7 +39,7 @@ index 83ca284e02f0c2229126d8f40cb33b18f44524d3..d89da5e370d95cfbc4dac776a64e402c
|
|||||||
PlayerProfile getOwnerProfile();
|
PlayerProfile getOwnerProfile();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -83,6 +98,7 @@ public interface Skull extends TileState {
|
@@ -84,6 +99,7 @@ public interface Skull extends TileState {
|
||||||
* @throws IllegalArgumentException if the profile does not contain the
|
* @throws IllegalArgumentException if the profile does not contain the
|
||||||
* necessary information
|
* necessary information
|
||||||
*/
|
*/
|
||||||
@ -48,10 +48,10 @@ index 83ca284e02f0c2229126d8f40cb33b18f44524d3..d89da5e370d95cfbc4dac776a64e402c
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/meta/SkullMeta.java b/src/main/java/org/bukkit/inventory/meta/SkullMeta.java
|
diff --git a/src/main/java/org/bukkit/inventory/meta/SkullMeta.java b/src/main/java/org/bukkit/inventory/meta/SkullMeta.java
|
||||||
index dcefd0eea9461441c4209d587896d704389487d0..9ad062968335ee02bff5353d8c63c330d9338cd7 100644
|
index 5a18a66a0b7877ec0c1859f78cce659db4b8541a..862640b4611458dfbcd3be797eacd120fc8d1f9f 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/meta/SkullMeta.java
|
--- a/src/main/java/org/bukkit/inventory/meta/SkullMeta.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/meta/SkullMeta.java
|
+++ b/src/main/java/org/bukkit/inventory/meta/SkullMeta.java
|
||||||
@@ -37,6 +37,20 @@ public interface SkullMeta extends ItemMeta {
|
@@ -38,6 +38,20 @@ public interface SkullMeta extends ItemMeta {
|
||||||
@Deprecated
|
@Deprecated
|
||||||
boolean setOwner(@Nullable String owner);
|
boolean setOwner(@Nullable String owner);
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ index dcefd0eea9461441c4209d587896d704389487d0..9ad062968335ee02bff5353d8c63c330
|
|||||||
/**
|
/**
|
||||||
* Gets the owner of the skull.
|
* Gets the owner of the skull.
|
||||||
*
|
*
|
||||||
@@ -63,6 +77,7 @@ public interface SkullMeta extends ItemMeta {
|
@@ -64,6 +78,7 @@ public interface SkullMeta extends ItemMeta {
|
||||||
* @return the profile of the owning player
|
* @return the profile of the owning player
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
@ -80,11 +80,11 @@ index dcefd0eea9461441c4209d587896d704389487d0..9ad062968335ee02bff5353d8c63c330
|
|||||||
PlayerProfile getOwnerProfile();
|
PlayerProfile getOwnerProfile();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -77,6 +92,7 @@ public interface SkullMeta extends ItemMeta {
|
@@ -78,6 +93,7 @@ public interface SkullMeta extends ItemMeta {
|
||||||
* @throws IllegalArgumentException if the profile does not contain the
|
* @throws IllegalArgumentException if the profile does not contain the
|
||||||
* necessary information
|
* necessary information
|
||||||
*/
|
*/
|
||||||
+ @Deprecated // Paper
|
+ @Deprecated // Paper
|
||||||
void setOwnerProfile(@Nullable PlayerProfile profile);
|
void setOwnerProfile(@Nullable PlayerProfile profile);
|
||||||
|
|
||||||
@Override
|
/**
|
Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren