Compare commits

..
Author SHA1 Message Date
Nassim Jahnke d385dff295 Clock API and level clock overrides 2026-04-19 20:35:33 +02:00
2229 changed files with 43382 additions and 69939 deletions

No files matched your search

-203
View File
@@ -1,203 +0,0 @@
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<module name="Checker">
<module name="SuppressionFilter">
<property name="file" value="${config_loc}/suppressions.xml"/>
<property name="optional" value="false"/>
</module>
<!--Single Suppression Filters-->
<module name="io.papermc.checkstyle.filters.BetterSuppressionSingleFilter">
<!--Suppresses warnings except for common TYPE_USE that should be on the same line-->
<property name="checks" value="AnnotationOnSameLine"/>
<property name="messageKey" value="annotation\.same\.line"/>
<property name="arguments" value="^(?!(${type_use_annotations}))"/>
</module>
<!--Javadoc Comments-->
<module name="JavadocPackage"/>
<!--Misc-->
<module name="NewlineAtEndOfFile"/>
<!--Whitespace-->
<module name="FileTabCharacter"/>
<module name="TreeWalker">
<module name="SuppressionXpathFilter">
<property name="file" value="${config_loc}/xpath-suppressions.xml"/>
<property name="optional" value="false"/>
</module>
<module name="SuppressionCommentFilter"/>
<!--Annotations-->
<module name="AnnotationOnSameLine">
<!--matches all annotations, but most are suppressed in above-->
<property name="tokens" value="METHOD_DEF"/>
</module>
<module name="AnnotationUseStyle"/>
<module name="MissingDeprecated"/>
<!--Block Checks-->
<module name="AvoidNestedBlocks"/>
<module name="EmptyBlock"/>
<module name="LeftCurly"/>
<module name="RightCurly"/>
<!--Class Design-->
<module name="FinalClass"/>
<module name="HideUtilityClassConstructor"/>
<module name="InterfaceIsType"/>
<module name="OneTopLevelClass"/>
<module name="SealedShouldHavePermitsList"/>
<!--Coding-->
<module name="AvoidDoubleBraceInitialization"/>
<module name="AvoidNoArgumentSuperConstructorCall"/>
<module name="ConstructorsDeclarationGrouping"/>
<module name="CovariantEquals"/>
<module name="DeclarationOrder"/>
<module name="DefaultComesLast"/>
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<module name="FallThrough"/>
<!-- Use non-final variables as an identifier of old code for now -->
<!--<module name="FinalLocalVariable">
<property name="validateEnhancedForLoopVariable" value="true"/>
<property name="validateUnnamedVariables" value="true"/>
<property name="tokens" value="PARAMETER_DEF,VARIABLE_DEF"/>
</module>-->
<module name="IllegalToken"/> <!--just labels by default-->
<module name="IllegalType"/>
<module name="PatternVariableAssignment"/>
<module name="RequireThis">
<property name="validateOnlyOverlapping" value="false"/>
</module>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="StringLiteralEquality"/>
<module name="UnnecessaryNullCheckWithInstanceOf"/>
<module name="UnnecessarySemicolonAfterOuterTypeDeclaration"/>
<module name="UnnecessarySemicolonAfterTypeMemberDeclaration"/>
<module name="UnnecessarySemicolonInEnumeration"/>
<module name="UnnecessarySemicolonInTryWithResources"/>
<module name="UnusedCatchParameterShouldBeUnnamed"/>
<module name="UnusedLocalVariable"/>
<module name="WhenShouldBeUsed"/>
<!--Headers--> <!--N/A-->
<!--Imports-->
<module name="AvoidStarImport"/>
<module name="CustomImportOrder">
<property name="customImportOrderRules" value="THIRD_PARTY_PACKAGE,STATIC"/>
<property name="standardPackageRegExp" value="^$"/>
<property name="sortImportsInGroupAlphabetically" value="true"/>
</module>
<module name="IllegalImport">
<property name="regexp" value="true"/>
<!--checker-qual nullability-->
<property name="illegalClasses" value="org\.checkerframework\.checker\.nullness\.qual\.(Nullable|NonNull|DefaultQualifier|MonotonicNonNull)"/>
<!--jetbrains nullability-->
<property name="illegalClasses" value="org\.jetbrains\.annotations\.(NotNull|Nullable|NotNullByDefault)"/>
<!--javax nullability-->
<property name="illegalClasses" value="javax\.annotation\.(Nonnull|Nullable)"/>
<message key="import.illegal" value="Illegal nullability annotation - {0}, use JSpecify"/>
</module>
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<!--Javadoc Comments-->
<module name="AtclauseOrder">
<property name="tagOrder" value="@param, @return, @throws, @see, @deprecated, @hidden"/>
</module>
<module name="InvalidJavadocPosition"/>
<module name="JavadocBlockTagLocation"/>
<module name="JavadocContentLocation"/>
<module name="JavadocLeadingAsteriskAlign"/>
<module name="JavadocMethod">
<!--checks all, but doesn't require. If we have a doc, it should be valid-->
<property name="validateThrows" value="true"/>
</module>
<module name="JavadocMissingLeadingAsterisk"/>
<module name="JavadocMissingWhitespaceAfterAsterisk"/>
<module name="JavadocStyle"/> <!--checks all, but doesn't require. If we have a doc, it should be valid-->
<module name="JavadocTagContinuationIndentation"/>
<module name="JavadocType"/> <!--checks all, but doesn't require. If we have a doc, it should be valid-->
<module name="NonEmptyAtclauseDescription"/>
<module name="RequireEmptyLineBeforeBlockTagGroup"/>
<!--Metrics--> <!--N/A-->
<!--Miscellaneous-->
<module name="ArrayTypeStyle"/>
<module name="AvoidEscapedUnicodeCharacters"/>
<module name="CommentsIndentation"/>
<!-- Overlaps with the configured FinalLocalVariable, but is more strict -->
<!--<module name="FinalParameters">
<property name="tokens" value="METHOD_DEF,CTOR_DEF,LITERAL_CATCH,FOR_EACH_CLAUSE,PATTERN_VARIABLE_DEF"/>
</module>-->
<module name="NoCodeInFile"/>
<module name="OuterTypeFilename"/>
<module name="UpperEll"/>
<!--Modifiers-->
<module name="ModifierOrder"/>
<module name="RedundantModifier"/>
<!--Naming Conventions-->
<module name="AbbreviationAsWordInName">
<property name="allowedAbbreviations" value="JSON,UUID"/>
<property name="ignoreFinal" value="false"/>
</module>
<module name="ClassTypeParameterName"/>
<module name="ConstantName"/>
<module name="IllegalIdentifierName"/>
<module name="InterfaceTypeParameterName"/>
<module name="LambdaParameterName"/>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName"/>
<module name="MemberName"/>
<module name="MethodName"/>
<module name="MethodTypeParameterName">
<property name="format" value="^[A-Z]+$"/>
</module>
<module name="PackageName">
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
</module>
<module name="ParameterName"/>
<module name="PatternVariableName"/>
<module name="RecordComponentName"/>
<module name="RecordTypeParameterName"/>
<module name="StaticVariableName"/>
<module name="TypeName"/>
<!--Regexp--> <!--N/A-->
<!--Size Violations--> <!--N/A-->
<!--Whitespace-->
<module name="EmptyForInitializerPad"/>
<module name="EmptyForIteratorPad"/>
<module name="EmptyLineSeparator">
<property name="allowNoEmptyLineBetweenFields" value="true"/>
<property name="tokens" value="IMPORT,STATIC_IMPORT,CLASS_DEF,INTERFACE_DEF,ENUM_DEF,STATIC_INIT,INSTANCE_INIT,METHOD_DEF,CTOR_DEF,VARIABLE_DEF,RECORD_DEF,COMPACT_CTOR_DEF"/>
</module>
<module name="GenericWhitespace"/>
<module name="MethodParamPad"/>
<module name="NoLineWrap"/> <!--just imports and packages-->
<module name="NoWhitespaceAfter"/>
<module name="NoWhitespaceBefore"/>
<module name="NoWhitespaceBeforeCaseDefaultColon"/>
<module name="ParenPad"/>
<module name="SingleSpaceSeparator"/>
<module name="TypecastParenPad"/>
<module name="WhitespaceAfter"/>
<module name="WhitespaceAround"/>
<!--Custom-->
<module name="JavadocAlignParameterDescription"/>
<module name="NullabilityAnnotations"/>
<module name="RedundantNullability"/>
<module name="UnnecessaryFullyQualifiedImport"/>
</module>
</module>
-7
View File
@@ -1,7 +0,0 @@
<!DOCTYPE suppressions PUBLIC
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
"https://checkstyle.org/dtds/suppressions_1_2.dtd">
<suppressions>
<suppress checks="MissingJavadoc.*" files="src[\\/]test[\\/]java[^\\/]*[\\/].*"/>
<suppress checks="JavadocPackage" files="src[\\/]test[\\/]java[^\\/]*[\\/].*"/>
</suppressions>
-10
View File
@@ -1,10 +0,0 @@
NonNull
NotNull
Nullable
UnknownNullability
Unmodifiable
UnmodifiableView
Range
Positive
NonNegative
IntRange
-17
View File
@@ -1,17 +0,0 @@
<!DOCTYPE suppressions PUBLIC
"-//Checkstyle//DTD SuppressionXpathFilter Experimental Configuration 1.2//EN"
"https://checkstyle.org/dtds/suppressions_1_2_xpath_experimental.dtd">
<suppressions>
<!--ignores all checks for @Deprecated(forRemoval=*) children-->
<suppress-xpath checks=".*" query="//*[MODIFIERS/ANNOTATION[(@text = 'Deprecated' or *[@text = 'Deprecated'] and ANNOTATION_MEMBER_VALUE_PAIR/IDENT[@text='forRemoval'])]]/descendant-or-self::node()"/>
<!--special case to ignore extra checks outside the root CLASS_DEF if the root CLASS_DEF is marked as deprecated for removal-->
<suppress-xpath checks=".*" query="/COMPILATION_UNIT[CLASS_DEF/MODIFIERS/ANNOTATION[IDENT[@text = 'Deprecated'] and ANNOTATION_MEMBER_VALUE_PAIR/IDENT[@text='forRemoval']]]/descendant-or-self::node()"/>
<!--ignores MissingJavadoc for ApiStatus.Internal children-->
<suppress-xpath checks="MissingJavadoc(Method|Type)" query="//*[MODIFIERS/ANNOTATION/DOT[@text = 'Internal' or *[@text = 'Internal']]]/descendant-or-self::node()"/>
<!--skip for private classes-->
<suppress-xpath checks="FinalClass" query="//CLASS_DEF[MODIFIERS/LITERAL_PRIVATE]"/>
<!--skip for classes inside of methods-->
<suppress-xpath checks="HideUtilityClassConstructor|MissingJavadoc(Method|Type)" query="//CLASS_DEF[ancestor::METHOD_DEF]"/>
</suppressions>
+1 -16
View File
@@ -10,7 +10,6 @@ ij_any_block_comment_add_space = false
ij_any_block_comment_at_first_column = false
ij_any_line_comment_at_first_column = false
ij_any_line_comment_add_space = true
trim_trailing_whitespace = true
[*.tiny]
indent_style = tab
@@ -21,7 +20,7 @@ end_of_line = crlf
[*.yml]
indent_size = 2
[{*.patch,*.md}]
[*.patch]
trim_trailing_whitespace = false
[*.java]
@@ -30,26 +29,12 @@ ij_java_class_count_to_use_import_on_demand = 999999
ij_java_insert_inner_class_imports = false
ij_java_names_count_to_use_import_on_demand = 999999
ij_java_imports_layout = *, |, $*
ij_java_layout_static_imports_separately = true
ij_java_generate_final_locals = true
ij_java_generate_final_parameters = true
ij_java_method_parameters_new_line_after_left_paren = true
ij_java_method_parameters_right_paren_on_new_line = true
ij_java_use_fq_class_names = false
ij_java_class_names_in_javadoc = 1
# javadoc
ij_java_doc_add_blank_line_after_description = true
ij_java_doc_add_blank_line_after_param_comments = false
ij_java_doc_add_blank_line_after_return = false
ij_java_doc_add_p_tag_on_empty_lines = true
ij_java_doc_align_exception_comments = true
ij_java_doc_align_param_comments = true
ij_java_doc_do_not_wrap_if_one_line = false
ij_java_doc_enable_formatting = true
ij_java_doc_enable_leading_asterisks = true
ij_java_doc_indent_on_continuation = true
ij_java_doc_param_description_on_new_line = false
ij_java_doc_use_throws_not_exception_tag = true
[paper-server/src/minecraft/java/**/*.java]
ij_java_use_fq_class_names = true
+10 -15
View File
@@ -34,31 +34,33 @@ jobs:
)
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- if: ${{ github.event_name == 'push' }}
uses: actions/checkout@v7
uses: actions/checkout@v4
with:
# todo remove me again after the update
ref: ${{ github.ref_name }}
fetch-depth: 0
- if: ${{ github.event_name == 'pull_request' }}
uses: actions/checkout@v7
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: JDK 25
uses: actions/setup-java@v5
uses: actions/setup-java@v4
with:
java-version: 25
distribution: 'zulu'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
uses: gradle/actions/setup-gradle@v4
with:
# Allow cache writes on main and dev branches
cache-read-only: ${{ github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/heads/dev/') }}
- name: Configure Build
uses: actions/github-script@v9
uses: actions/github-script@v7
id: determine
env:
REF_NAME: "${{ github.ref_name }}"
@@ -105,26 +107,19 @@ jobs:
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v4
with:
name: Test Results
path: |
**/build/test-results/test/TEST-*.xml
- name: Publish Checkstyle Report
uses: Juuxel/publish-checkstyle-report@v3
if: failure() || success()
with:
reports: |
*/build/reports/checkstyle/*.xml
- name: Create Paperclip Jar
if: fromJSON(steps.determine.outputs.result).action == 'paperclip'
run: ./gradlew createPaperclipJar --stacktrace
- name: Upload Paperclip Jar
if: fromJSON(steps.determine.outputs.result).action == 'paperclip'
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v4
with:
name: paper-${{ fromJSON(steps.determine.outputs.result).pr }}
path: paper-server/build/libs/paper-paperclip-*.jar
@@ -142,7 +137,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v4
with:
name: Event File
path: ${{ github.event_path }}
-14
View File
@@ -1,14 +0,0 @@
name: PR Review Signal
on:
pull_request_review:
types:
- submitted
permissions: {}
jobs:
signal:
runs-on: ubuntu-latest
steps:
- run: echo "A PR review was submitted"
-69
View File
@@ -1,69 +0,0 @@
name: Update PR Project Status
on:
workflow_run:
workflows:
- PR Review Signal
types:
- completed
schedule:
- cron: "07 6 * * *"
workflow_dispatch:
jobs:
review-submitted:
if: >
github.repository_owner == 'PaperMC' &&
github.event_name == 'workflow_run' &&
github.event.workflow_run.event == 'pull_request_review' &&
github.event.workflow_run.conclusion == 'success'
concurrency:
group: pr-review-status-${{ github.event.workflow_run.head_sha }}
cancel-in-progress: false
runs-on: ubuntu-latest
steps:
- name: "authenticate"
id: "authenticate"
uses: actions/create-github-app-token@v3.2.0
with:
client-id: "${{ secrets.PROJECTS_CLIENT_ID }}"
private-key: "${{ secrets.PROJECTS_PRIVATE_KEY }}"
owner: "${{ github.repository_owner }}"
- name: Set status from approval
uses: PaperMC/update-projects-action/review-status@v0.4.1
with:
github-token: "${{ steps.authenticate.outputs.token }}"
mode: review
project-url: https://github.com/orgs/PaperMC/projects/2
maintainer-teams: paper-maintainers
developer-teams: paper-developers
promote-delayed-approvals:
if: >
github.repository_owner == 'PaperMC' &&
(github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
concurrency:
group: pr-review-status-promote
cancel-in-progress: false
runs-on: ubuntu-latest
steps:
- name: "authenticate"
id: "authenticate"
uses: actions/create-github-app-token@v3.2.0
with:
client-id: "${{ secrets.PROJECTS_CLIENT_ID }}"
private-key: "${{ secrets.PROJECTS_PRIVATE_KEY }}"
owner: "${{ github.repository_owner }}"
- name: Promote delayed approvals
uses: PaperMC/update-projects-action/review-status@v0.4.1
with:
github-token: "${{ steps.authenticate.outputs.token }}"
mode: promote
project-url: https://github.com/orgs/PaperMC/projects/2
maintainer-teams: paper-maintainers
developer-teams: paper-developers
promote-after-days: "14"
+7 -6
View File
@@ -18,13 +18,14 @@ jobs:
steps:
- name: "authenticate"
id: "authenticate"
uses: actions/create-github-app-token@v3.2.0
uses: "tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a" # v2.1.0
with:
app-id: "${{ secrets.PROJECTS_APP_ID }}"
private-key: "${{ secrets.PROJECTS_PRIVATE_KEY }}"
owner: "${{ github.repository_owner }}"
installation_retrieval_mode: id
installation_retrieval_payload: "36153445"
app_id: "${{ secrets.PROJECTS_APP_ID }}"
private_key: "${{ secrets.PROJECTS_PRIVATE_KEY }}"
- uses: PaperMC/update-projects-action@v0.3.0
- uses: PaperMC/update-projects-action@v0.2.0
name: Update open issue
if: github.event.issue.state == 'open'
with:
@@ -52,7 +53,7 @@ jobs:
"status: unlikely": "✅ Accepted"
}
- uses: PaperMC/update-projects-action@v0.3.0
- uses: PaperMC/update-projects-action@v0.2.0
name: Update closed issue
if: github.event.issue.state == 'closed'
with:
+5 -6
View File
@@ -19,19 +19,18 @@ jobs:
steps:
- name: Generate an Application repository access token
id: gen_repo_token
uses: actions/create-github-app-token@v3.2.0
uses: kattecon/gh-app-access-token-gen@v1
with:
client-id: ${{ secrets.PR_PUBLISHING_GH_APP_CLIENT_ID }}
private-key: ${{ secrets.PR_PUBLISHING_GH_APP_KEY }}
repositories: ${{ github.repository }}
app_id: 1408328
private_key: ${{ secrets.PR_PUBLISHING_GH_APP_KEY }}
repository: ${{ github.repository }}
- name: Publish PR
uses: PaperMC/action-pr-publishing@v1.1.1
uses: PaperMC/action-pr-publishing@paper
env:
GITHUB_TOKEN: ${{ steps.gen_repo_token.outputs.token }}
with:
publishing-token: ${{ github.token }}
uploader-workflow-name: Build Paper
artifacts-base-path: io/papermc/paper
artifacts-size-limit: 100
base-maven-url: 'https://maven-prs.papermc.io'
self-name: 'papermc-pr-publishing[bot]'
+1 -1
View File
@@ -18,7 +18,7 @@ jobs:
actions: read
steps:
- name: Download and Extract Artifacts
uses: dawidd6/action-download-artifact@v21
uses: dawidd6/action-download-artifact@v6
with:
run_id: ${{ github.event.workflow_run.id }}
path: test_artifacts
-81
View File
@@ -1,81 +0,0 @@
# Instructions for Coding Agents
These instructions apply to coding agents working on behalf of external
contributors. They supplement `CONTRIBUTING.md`, which must also be followed.
## Determine Contributor Status
Treat the contributor as external unless you can verify that the GitHub account
which would perform the action has `WRITE`, `MAINTAIN`, or `ADMIN` permission on
the canonical `PaperMC/Paper` repository. Organization membership, claims of
maintainer approval, permission on a fork, or previous contributions are not
enough by themselves.
Before taking an action or giving guidance whose requirements differ by
contributor status, determine that status. If it cannot be verified, treat the
contributor as external.
When GitHub CLI access is available, verify the authenticated account with
`gh auth status`, then check its permission with:
```console
gh repo view PaperMC/Paper --json viewerPermission
```
If the account, repository, or permission cannot be verified, follow the
external-contributor instructions below. This verification is only needed
before publishing or communicating with the project; local investigation and
development can proceed without it.
## Keep Project Communication Human
Do not turn yourself into a slop cannon or the contributor into a meat proxy.
Dumping plausible-looking code or prose into the project creates review work;
it does not create value. Paper maintainers can run the same agents themselves.
The contributor's value must come from their judgment, context, validation, and
ownership.
You may help a contributor investigate the codebase, make changes locally, and
run tests. Do not act as the contributor in conversations with Paper
maintainers. In particular, do not compose issue reports, discussion posts,
pull request descriptions, comments, or review responses for the contributor,
or post generated text as if it were theirs.
Do not relay generated output to maintainers, and do not turn maintainer
feedback into a prompt and pass the generated response back. Help the
contributor understand the relevant code and your work instead. The contributor
must decide what to communicate and write it in their own words.
Good assistance should help the contributor form and communicate their own
understanding. Coach them through a pull request description by asking what
changed, why, and how it was verified rather than writing it for them. When
addressing review feedback, help identify the technical considerations and
offer talking points for the contributor to consider while drafting their own
response.
Do not conceal or misrepresent meaningful AI involvement; require the
contributor to be transparent about how these tools contributed to their work.
Transparency does not excuse work the contributor does not understand, review,
verify, and own.
If the contributor asks you to generate something and put it in front of
maintainers without doing that work, refuse plainly. Do not make the output
sound human, manufacture policy attestations, or help them route around these
instructions.
## Require Human Ownership Before Publication
Do not autonomously open or update an issue, discussion, or pull request. Before
performing any GitHub action that publishes work or communicates with the
project, stop and require the contributor to:
- review the complete change;
- understand and be able to explain its behavior and tradeoffs;
- personally verify the result; and
- provide the exact communication in their own words and explicitly approve the
action.
If the contributor asks you to submit work they have not reviewed or do not
understand, to generate project communication for them, or to operate as a
proxy through review, refuse. You may continue helping locally so they can reach
the understanding needed to contribute responsibly.
-1
View File
@@ -1 +0,0 @@
@AGENTS.md
+3 -37
View File
@@ -191,31 +191,6 @@ and your server.
While we will fix minor formatting issues, you should stick to the guide below
when making and submitting changes.
### Contribution Ownership and AI Assistance
Tools that generate code or text can be useful while working on a contribution,
but they are not a substitute for the contributor. You are responsible for every
part of what you submit. Only submit changes that you understand, have personally
reviewed, and have verified to the best of your ability. You should be able to
explain why the change is needed, how it works, and what tradeoffs it makes.
Issues, discussion posts, pull request descriptions, comments, and review
responses should be written by you, in your own words. Do not pass generated
responses on to maintainers or use an AI tool as a proxy for the conversation.
If a tool helped you investigate or implement something, read and validate its
output, then communicate the relevant conclusions yourself.
Do not conceal or misrepresent meaningful AI involvement; be transparent about
how these tools contributed to your work. Transparency does not excuse
submitting work you do not understand, review, verify, and take responsibility
for.
Review is a collaborative process, not a way to outsource completion of a
generated change to maintainers. Be prepared to answer questions about your
reasoning and to remain involved until the contribution is complete. We may
close contributions when the author cannot explain or take responsibility for
the submitted work.
### Branches and Minecraft Versions
Generally, PRs should be targeted at the `main` branch, where active development for
@@ -445,19 +420,13 @@ int maxPlayers = GlobalConfiguration.get().misc.maxNumOfPlayers;
Generally for global config values you will use the fully qualified class name,
`io.papermc.paper.configuration.GlobalConfiguration` since it's not imported in
most places.
---
If you are adding a new world config value, you must have access to an instance
of the `net.minecraft.world.level.Level` which you can then access the config by doing
```java
int maxPlayers = level.paperConfig().misc.maxNumOfPlayers;
```
#### Documentation
When adding or removing a config option, you should open a pull request in our [documentation repository](https://github.com/PaperMC/docs)
to keep it in sync and accurate. If you're unsure whether your original change will be accepted, then it's fine to wait with making the documentation
pull request until a maintainer has reviewed your changes. Once everything is done, the documentation pull request will be merged at the same time
that your original pull request is.
## Testing API changes
### Using the Paper Test Plugin
@@ -501,13 +470,10 @@ If you use Maven to build your plugin:
### My commit doesn't need a build, what do I do?
Quite simple: You add `[ci skip]` to the start of your pull request title.
Quite simple: You add `[ci skip]` to the start of your commit subject.
This case most often applies to changes to files like `README.md`, this very
file (`CONTRIBUTING.md`), the `LICENSE.md` file, and also small updates to Javadocs or other documentation.
Do *not* add [ci skip] to the start of your individual commit subjects, as your
pull request will not be mergeable until a new commit is added due to status check requirements.
file (`CONTRIBUTING.md`), the `LICENSE.md` file, and so forth.
### Patching and building is *really* slow, what can I do?
-1
View File
@@ -67,5 +67,4 @@ granny <contact@granny.dev>
mja00 <me@mja00.dev>
roro1506HD <16260475+roro1506HD@users.noreply.github.com>
Toffikk <slodkitofik@gmail.com>
NonSwag <mail@nonswag.dev>
```
+8 -4
View File
@@ -1,4 +1,4 @@
Paper [![Version](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Fartifactory.papermc.io%2Fartifactory%2Funiverse%2Fio%2Fpapermc%2Fpaper%2Fpaper-api%2Fmaven-metadata.xml&strategy=highestVersion&filter=26.2.*&label=version&color=%23344ceb
Paper [![Version](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Fartifactory.papermc.io%2Fartifactory%2Funiverse%2Fio%2Fpapermc%2Fpaper%2Fpaper-api%2Fmaven-metadata.xml&strategy=highestVersion&filter=26.1*&label=version&color=%23344ceb
)](https://papermc.io/downloads/paper)
[![Paper Build Status](https://img.shields.io/github/actions/workflow/status/PaperMC/Paper/build.yml?branch=main)](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)
@@ -18,7 +18,7 @@ Paperclip is a jar file that you can download and run just like a normal jar fil
Download Paper from our [downloads page](https://papermc.io/downloads/paper).
Run the Paperclip jar directly from your server. Just like old times.
Run the Paperclip jar directly from your server. Just like old times
* Documentation on using Paper: [docs.papermc.io](https://docs.papermc.io)
* For a sneak peek at upcoming features, [see here](https://github.com/PaperMC/Paper/projects)
@@ -39,7 +39,7 @@ repositories {
}
dependencies {
compileOnly("io.papermc.paper:paper-api:26.2.build.+")
compileOnly("io.papermc.paper:paper-api:26.1.2.build.+")
}
java {
@@ -59,7 +59,7 @@ java {
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>[26.2.build,)</version>
<version>[26.1.2.build,)</version>
<scope>provided</scope>
</dependency>
```
@@ -95,5 +95,9 @@ Special Thanks To:
[YourKit](https://www.yourkit.com/), makers of the outstanding java profiler, support open source projects of all kinds with their full featured [Java](https://www.yourkit.com/java/profiler) and [.NET](https://www.yourkit.com/.net/profiler) application profilers. We thank them for granting Paper an OSS license so that we can make our software the best it can be.
[<img src="https://user-images.githubusercontent.com/21148213/121807008-8ffc6700-cc52-11eb-96a7-2f6f260f8fda.png" alt="" width="150">](https://www.jetbrains.com)
[JetBrains](https://www.jetbrains.com/), creators of the IntelliJ IDEA, supports Paper with one of their [Open Source Licenses](https://www.jetbrains.com/opensource/). IntelliJ IDEA is the recommended IDE for working with Paper, and most of the Paper team uses it.
All our sponsors!
[![Sponsor Image](https://raw.githubusercontent.com/PaperMC/papermc.io/data/sponsors.png)](https://papermc.io/sponsors)
+142 -16
View File
@@ -3,11 +3,11 @@
private-f net.minecraft.network.CompressionDecoder inflater
private-f net.minecraft.server.MinecraftServer connection
private-f net.minecraft.server.MinecraftServer levels
private-f net.minecraft.server.jsonrpc.internalapi.MinecraftGameRuleServiceImpl gameRules
private-f net.minecraft.world.item.ItemStack components
private-f net.minecraft.world.item.ItemStack item
private-f net.minecraft.world.level.block.entity.BeehiveBlockEntity stored
protected net.minecraft.world.entity.LivingEntity skipDropExperience
protected net.minecraft.world.level.Level thread
protected-f net.minecraft.server.MinecraftServer worldData
public net.minecraft.ChatFormatting code
public net.minecraft.advancements.Advancement decorateName(Lnet/minecraft/advancements/DisplayInfo;)Lnet/minecraft/network/chat/Component;
@@ -19,14 +19,32 @@ public net.minecraft.nbt.ListTag <init>(Ljava/util/List;)V
public net.minecraft.nbt.ListTag identifyRawElementType()B
public net.minecraft.network.Connection address
public net.minecraft.network.Connection channel
public net.minecraft.network.chat.contents.TranslatableContents PRIMITIVE_ARG_CODEC
public net.minecraft.network.chat.TextColor name
public net.minecraft.network.chat.contents.TranslatableContents filterAllowedArguments(Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
public net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket <init>(Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/entity/BlockEntityType;Lnet/minecraft/nbt/CompoundTag;)V
public net.minecraft.network.protocol.game.ClientboundBlockUpdatePacket blockState
public net.minecraft.network.protocol.game.ServerboundMovePlayerPacket hasPos
public net.minecraft.network.protocol.game.ServerboundMovePlayerPacket hasRot
public net.minecraft.network.protocol.game.ServerboundMovePlayerPacket x
public net.minecraft.network.protocol.game.ServerboundMovePlayerPacket xRot
public net.minecraft.network.protocol.game.ServerboundMovePlayerPacket y
public net.minecraft.network.protocol.game.ServerboundMovePlayerPacket yRot
public net.minecraft.network.protocol.game.ServerboundMovePlayerPacket z
public net.minecraft.network.syncher.SynchedEntityData getItem(Lnet/minecraft/network/syncher/EntityDataAccessor;)Lnet/minecraft/network/syncher/SynchedEntityData$DataItem;
public net.minecraft.resources.RegistryOps lookupProvider
public net.minecraft.resources.RegistryOps$HolderLookupAdapter
public net.minecraft.server.Main forceUpgrade(Lnet/minecraft/world/level/storage/LevelStorageSource$LevelStorageAccess;Lcom/mojang/datafixers/DataFixer;ZLjava/util/function/BooleanSupplier;Lnet/minecraft/core/RegistryAccess;Z)V
public net.minecraft.server.MinecraftServer LOGGER
public net.minecraft.server.MinecraftServer doRunTask(Lnet/minecraft/server/TickTask;)V
public net.minecraft.server.MinecraftServer executor
public net.minecraft.server.MinecraftServer fixerUpper
public net.minecraft.server.MinecraftServer playerDataStorage
public net.minecraft.server.MinecraftServer resources
public net.minecraft.server.MinecraftServer serverThread
public net.minecraft.server.MinecraftServer$ReloadableResources
public net.minecraft.server.MinecraftServer$ReloadableResources <init>(Lnet/minecraft/server/packs/resources/CloseableResourceManager;Lnet/minecraft/server/ReloadableServerResources;)V
public net.minecraft.server.RegistryLayer STATIC_ACCESS
public net.minecraft.server.ReloadableServerResources
public net.minecraft.server.ServerAdvancementManager advancements
public net.minecraft.server.Services USERID_CACHE_FILE
public net.minecraft.server.dedicated.DedicatedServerProperties$WorldDimensionData
@@ -35,9 +53,10 @@ public net.minecraft.server.dedicated.Settings getStringRaw(Ljava/lang/String;)L
public net.minecraft.server.dedicated.Settings properties
public net.minecraft.server.level.ChunkHolder oldTicketLevel
public net.minecraft.server.level.ChunkHolder playerProvider
public net.minecraft.server.level.ChunkLevel BLOCK_TICKING_LEVEL
public net.minecraft.server.level.ChunkLevel ENTITY_TICKING_LEVEL
public net.minecraft.server.level.ChunkLevel FULL_CHUNK_LEVEL
public net.minecraft.server.level.ChunkMap addEntity(Lnet/minecraft/world/entity/Entity;)V
public net.minecraft.server.level.ChunkMap anyPlayerCloseEnoughForSpawning(Lnet/minecraft/world/level/ChunkPos;)Z
public net.minecraft.server.level.ChunkMap distanceManager
public net.minecraft.server.level.ChunkMap entityMap
public net.minecraft.server.level.ChunkMap getVisibleChunkIfPresent(J)Lnet/minecraft/server/level/ChunkHolder;
public net.minecraft.server.level.ChunkMap level
@@ -54,16 +73,22 @@ public net.minecraft.server.level.ChunkMap$TrackedEntity serverEntity
public net.minecraft.server.level.DistanceManager simulationDistance
public net.minecraft.server.level.DistanceManager ticketStorage
public net.minecraft.server.level.ServerBossEvent broadcast(Ljava/util/function/Function;)V
public net.minecraft.server.level.ServerBossEvent visible
public net.minecraft.server.level.ServerChunkCache mainThread
public net.minecraft.server.level.ServerChunkCache mainThreadProcessor
public net.minecraft.server.level.ServerChunkCache runDistanceManagerUpdates()Z
public net.minecraft.server.level.ServerChunkCache spawnEnemies
public net.minecraft.server.level.ServerChunkCache$MainThreadExecutor
public net.minecraft.server.level.ServerLevel chunkSource
public net.minecraft.server.level.ServerLevel entityManager
public net.minecraft.server.level.ServerLevel findLightningRod(Lnet/minecraft/core/BlockPos;)Ljava/util/Optional;
public net.minecraft.server.level.ServerLevel getEntities()Lnet/minecraft/world/level/entity/LevelEntityGetter;
public net.minecraft.server.level.ServerLevel serverLevelData
public net.minecraft.server.level.ServerPlayer completeUsingItem()V
public net.minecraft.server.level.ServerPlayer containerSynchronizer
public net.minecraft.server.level.ServerPlayer findRespawnAndUseSpawnBlock(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/server/level/ServerPlayer$RespawnConfig;Z)Ljava/util/Optional;
public net.minecraft.server.level.ServerPlayer initMenu(Lnet/minecraft/world/inventory/AbstractContainerMenu;)V
public net.minecraft.server.level.ServerPlayer isChangingDimension
public net.minecraft.server.level.ServerPlayer language
public net.minecraft.server.level.ServerPlayer lastSentExp
public net.minecraft.server.level.ServerPlayer nextContainerCounter()V
@@ -75,7 +100,7 @@ public net.minecraft.server.level.ServerPlayer triggerDimensionChangeTriggers(Ln
public net.minecraft.server.level.ServerPlayer wardenSpawnTracker
public net.minecraft.server.level.ServerPlayer$RespawnPosAngle
public net.minecraft.server.level.ServerPlayer$RespawnPosAngle <init>(Lnet/minecraft/world/phys/Vec3;FF)V
public net.minecraft.server.level.ServerPlayerGameMode hasDelayedDestroy
public net.minecraft.server.level.ServerPlayerGameMode level
public net.minecraft.server.network.ServerConfigurationPacketListenerImpl clientInformation
public net.minecraft.server.network.ServerConfigurationPacketListenerImpl currentTask
public net.minecraft.server.network.ServerConfigurationPacketListenerImpl finishCurrentTask(Lnet/minecraft/server/network/ConfigurationTask$Type;)V
@@ -87,9 +112,12 @@ public net.minecraft.server.network.ServerLoginPacketListenerImpl state
public net.minecraft.server.network.ServerLoginPacketListenerImpl$State
public net.minecraft.server.packs.repository.FolderRepositorySource$FolderPackDetector
public net.minecraft.server.packs.repository.FolderRepositorySource$FolderPackDetector <init>(Lnet/minecraft/world/level/validation/DirectoryValidator;)V
public net.minecraft.server.packs.repository.Pack resources
public net.minecraft.server.players.PlayerList playerIo
public net.minecraft.server.players.PlayerList players
public net.minecraft.server.players.PlayerList updateEntireScoreboard(Lnet/minecraft/server/ServerScoreboard;Lnet/minecraft/server/level/ServerPlayer;)V
public net.minecraft.server.players.PlayerList verifyChatTrusted(Lnet/minecraft/network/chat/PlayerChatMessage;)Z
public net.minecraft.server.players.StoredUserEntry getUser()Ljava/lang/Object;
public net.minecraft.stats.ServerRecipeBook known
public net.minecraft.tags.TagEntry id
public net.minecraft.tags.TagEntry required
@@ -98,16 +126,15 @@ public net.minecraft.util.Util onThreadException(Ljava/lang/Thread;Ljava/lang/Th
public net.minecraft.util.datafix.fixes.BlockStateData register(ILcom/mojang/serialization/Dynamic;[Lcom/mojang/serialization/Dynamic;)V
public net.minecraft.util.datafix.fixes.ItemIdFix ITEM_NAMES
public net.minecraft.util.datafix.fixes.ItemSpawnEggFix ID_TO_ENTITY
public net.minecraft.util.filefix.FileFixerUpper FILE_FIXER_INTRODUCTION_VERSION
public net.minecraft.world.BossEvent color
public net.minecraft.world.BossEvent name
public net.minecraft.world.BossEvent overlay
public net.minecraft.world.CompoundContainer container1
public net.minecraft.world.CompoundContainer container2
public net.minecraft.world.SimpleContainer items
public net.minecraft.world.damagesource.CombatTracker entries
public net.minecraft.world.damagesource.CombatTracker getMostSignificantFall()Lnet/minecraft/world/damagesource/CombatEntry;
public net.minecraft.world.damagesource.CombatTracker inCombat
public net.minecraft.world.damagesource.CombatTracker lastDamageTime
public net.minecraft.world.damagesource.CombatTracker mob
public net.minecraft.world.damagesource.CombatTracker takingDamage
public net.minecraft.world.damagesource.DamageSource <init>(Lnet/minecraft/core/Holder;Lnet/minecraft/world/entity/Entity;Lnet/minecraft/world/entity/Entity;Lnet/minecraft/world/phys/Vec3;)V
@@ -117,8 +144,13 @@ public net.minecraft.world.effect.MobEffect$AttributeTemplate <init>(Lnet/minecr
public net.minecraft.world.effect.MobEffectInstance hiddenEffect
public net.minecraft.world.effect.MobEffectInstance isShorterDurationThan(Lnet/minecraft/world/effect/MobEffectInstance;)Z
public net.minecraft.world.entity.AgeableMob setAgeLocked(Z)V
public net.minecraft.world.entity.AreaEffectCloud durationOnUse
public net.minecraft.world.entity.AreaEffectCloud owner
public net.minecraft.world.entity.AreaEffectCloud potionContents
public net.minecraft.world.entity.AreaEffectCloud radiusOnUse
public net.minecraft.world.entity.AreaEffectCloud radiusPerTick
public net.minecraft.world.entity.AreaEffectCloud reapplicationDelay
public net.minecraft.world.entity.AreaEffectCloud waitTime
public net.minecraft.world.entity.Avatar DATA_PLAYER_MODE_CUSTOMISATION
public net.minecraft.world.entity.Display DATA_POS_ROT_INTERPOLATION_DURATION_ID
public net.minecraft.world.entity.Display createTransformation(Lnet/minecraft/network/syncher/SynchedEntityData;)Lcom/mojang/math/Transformation;
@@ -167,14 +199,20 @@ public net.minecraft.world.entity.Entity getSharedFlag(I)Z
public net.minecraft.world.entity.Entity getSwimHighSpeedSplashSound()Lnet/minecraft/sounds/SoundEvent;
public net.minecraft.world.entity.Entity getSwimSound()Lnet/minecraft/sounds/SoundEvent;
public net.minecraft.world.entity.Entity getSwimSplashSound()Lnet/minecraft/sounds/SoundEvent;
public net.minecraft.world.entity.Entity hasVisualFire
public net.minecraft.world.entity.Entity isAffectedByBlocks()Z
public net.minecraft.world.entity.Entity isInRain()Z
public net.minecraft.world.entity.Entity isInvulnerableToBase(Lnet/minecraft/world/damagesource/DamageSource;)Z
public net.minecraft.world.entity.Entity onGround
public net.minecraft.world.entity.Entity passengers
public net.minecraft.world.entity.Entity portalCooldown
public net.minecraft.world.entity.Entity random
public net.minecraft.world.entity.Entity setLevel(Lnet/minecraft/world/level/Level;)V
public net.minecraft.world.entity.Entity setRot(FF)V
public net.minecraft.world.entity.Entity setSharedFlag(IZ)V
public net.minecraft.world.entity.Entity teleportPassengers()V
public net.minecraft.world.entity.Entity unsetRemoved()V
public net.minecraft.world.entity.Entity wasTouchingWater
public net.minecraft.world.entity.ExperienceOrb count
public net.minecraft.world.entity.ExperienceOrb setValue(I)V
public net.minecraft.world.entity.Interaction attack
@@ -192,9 +230,11 @@ public net.minecraft.world.entity.ItemBasedSteering boostTimeTotal()I
public net.minecraft.world.entity.ItemBasedSteering boosting
public net.minecraft.world.entity.LightningBolt flashes
public net.minecraft.world.entity.LightningBolt life
public net.minecraft.world.entity.LightningBolt visualOnly
public net.minecraft.world.entity.LivingEntity DATA_ARROW_COUNT_ID
public net.minecraft.world.entity.LivingEntity DATA_HEALTH_ID
public net.minecraft.world.entity.LivingEntity LIVING_ENTITY_FLAG_SPIN_ATTACK
public net.minecraft.world.entity.LivingEntity activeEffects
public net.minecraft.world.entity.LivingEntity completeUsingItem()V
public net.minecraft.world.entity.LivingEntity detectEquipmentUpdates()V
public net.minecraft.world.entity.LivingEntity effectsDirty
@@ -203,8 +243,10 @@ public net.minecraft.world.entity.LivingEntity getDeathSound()Lnet/minecraft/sou
public net.minecraft.world.entity.LivingEntity getFallDamageSound(I)Lnet/minecraft/sounds/SoundEvent;
public net.minecraft.world.entity.LivingEntity getHurtSound(Lnet/minecraft/world/damagesource/DamageSource;)Lnet/minecraft/sounds/SoundEvent;
public net.minecraft.world.entity.LivingEntity getSoundVolume()F
public net.minecraft.world.entity.LivingEntity jumping
public net.minecraft.world.entity.LivingEntity lastHurt
public net.minecraft.world.entity.LivingEntity lastHurtByMob
public net.minecraft.world.entity.LivingEntity lastHurtByMobTimestamp
public net.minecraft.world.entity.LivingEntity lastHurtByPlayer
public net.minecraft.world.entity.LivingEntity lastHurtByPlayerMemoryTime
public net.minecraft.world.entity.LivingEntity playSecondaryHurtSound(Lnet/minecraft/world/damagesource/DamageSource;)V
@@ -219,11 +261,13 @@ public net.minecraft.world.entity.OminousItemSpawner setItem(Lnet/minecraft/worl
public net.minecraft.world.entity.OminousItemSpawner spawnItemAfterTicks
public net.minecraft.world.entity.ai.attributes.Attribute sentiment
public net.minecraft.world.entity.ai.attributes.AttributeSupplier getAttributeInstance(Lnet/minecraft/core/Holder;)Lnet/minecraft/world/entity/ai/attributes/AttributeInstance;
public net.minecraft.world.entity.ai.control.MoveControl$Operation
public net.minecraft.world.entity.ai.gossip.GossipContainer gossips
public net.minecraft.world.entity.ai.gossip.GossipContainer$EntityGossips
public net.minecraft.world.entity.ai.gossip.GossipContainer$EntityGossips <init>()V
public net.minecraft.world.entity.ai.navigation.PathNavigation pathFinder
public net.minecraft.world.entity.ambient.Bat targetPosition
public net.minecraft.world.entity.animal.Animal inLove
public net.minecraft.world.entity.animal.Animal loveCause
public net.minecraft.world.entity.animal.allay.Allay canDuplicate()Z
public net.minecraft.world.entity.animal.allay.Allay duplicateAllay()V
@@ -231,6 +275,7 @@ public net.minecraft.world.entity.animal.allay.Allay duplicationCooldown
public net.minecraft.world.entity.animal.allay.Allay jukeboxPos
public net.minecraft.world.entity.animal.allay.Allay resetDuplicationCooldown()V
public net.minecraft.world.entity.animal.axolotl.Axolotl setVariant(Lnet/minecraft/world/entity/animal/axolotl/Axolotl$Variant;)V
public net.minecraft.world.entity.animal.bee.Bee hivePos
public net.minecraft.world.entity.animal.bee.Bee isRolling()Z
public net.minecraft.world.entity.animal.bee.Bee numCropsGrownSincePollination
public net.minecraft.world.entity.animal.bee.Bee setHasNectar(Z)V
@@ -285,6 +330,7 @@ public net.minecraft.world.entity.animal.pig.Pig setSoundVariant(Lnet/minecraft/
public net.minecraft.world.entity.animal.pig.Pig setVariant(Lnet/minecraft/core/Holder;)V
public net.minecraft.world.entity.animal.pig.Pig steering
public net.minecraft.world.entity.animal.rabbit.Rabbit moreCarrotTicks
public net.minecraft.world.entity.animal.rabbit.Rabbit registerGoals()V
public net.minecraft.world.entity.animal.rabbit.Rabbit setVariant(Lnet/minecraft/world/entity/animal/rabbit/Rabbit$Variant;)V
public net.minecraft.world.entity.animal.sniffer.Sniffer calculateDigPosition()Ljava/util/Optional;
public net.minecraft.world.entity.animal.sniffer.Sniffer canDig()Z
@@ -293,6 +339,7 @@ public net.minecraft.world.entity.animal.sniffer.Sniffer getState()Lnet/minecraf
public net.minecraft.world.entity.animal.sniffer.Sniffer storeExploredPosition(Lnet/minecraft/core/BlockPos;)Lnet/minecraft/world/entity/animal/sniffer/Sniffer;
public net.minecraft.world.entity.animal.squid.GlowSquid setDarkTicks(I)V
public net.minecraft.world.entity.animal.turtle.Turtle goingHome
public net.minecraft.world.entity.animal.turtle.Turtle homePos
public net.minecraft.world.entity.animal.turtle.Turtle setHasEgg(Z)V
public net.minecraft.world.entity.animal.wolf.Wolf getSoundVariant()Lnet/minecraft/core/Holder;
public net.minecraft.world.entity.animal.wolf.Wolf getVariant()Lnet/minecraft/core/Holder;
@@ -300,19 +347,23 @@ public net.minecraft.world.entity.animal.wolf.Wolf isWet
public net.minecraft.world.entity.animal.wolf.Wolf setCollarColor(Lnet/minecraft/world/item/DyeColor;)V
public net.minecraft.world.entity.animal.wolf.Wolf setSoundVariant(Lnet/minecraft/core/Holder;)V
public net.minecraft.world.entity.animal.wolf.Wolf setVariant(Lnet/minecraft/core/Holder;)V
public net.minecraft.world.entity.boss.enderdragon.EnderDragon subEntities
public net.minecraft.world.entity.boss.wither.WitherBoss bossEvent
public net.minecraft.world.entity.decoration.ArmorStand disabledSlots
public net.minecraft.world.entity.decoration.ArmorStand isDisabled(Lnet/minecraft/world/entity/EquipmentSlot;)Z
public net.minecraft.world.entity.decoration.ArmorStand setMarker(Z)V
public net.minecraft.world.entity.decoration.ArmorStand setSmall(Z)V
public net.minecraft.world.entity.decoration.HangingEntity setDirection(Lnet/minecraft/core/Direction;)V
public net.minecraft.world.entity.decoration.ItemFrame DATA_ITEM
public net.minecraft.world.entity.decoration.ItemFrame DATA_ROTATION
public net.minecraft.world.entity.decoration.ItemFrame dropChance
public net.minecraft.world.entity.decoration.ItemFrame fixed
public net.minecraft.world.entity.decoration.ItemFrame setDirection(Lnet/minecraft/core/Direction;)V
public net.minecraft.world.entity.decoration.Mannequin ALL_LAYERS
public net.minecraft.world.entity.decoration.Mannequin DEFAULT_DESCRIPTION
public net.minecraft.world.entity.decoration.Mannequin VALID_POSES
public net.minecraft.world.entity.decoration.Mannequin getDescription()Lnet/minecraft/network/chat/Component;
public net.minecraft.world.entity.decoration.Mannequin getImmovable()Z
public net.minecraft.world.entity.decoration.Mannequin getProfile()Lnet/minecraft/world/item/component/ResolvableProfile;
public net.minecraft.world.entity.decoration.Mannequin setDescription(Lnet/minecraft/network/chat/Component;)V
public net.minecraft.world.entity.decoration.Mannequin setHideDescription(Z)V
public net.minecraft.world.entity.decoration.Mannequin setImmovable(Z)V
@@ -331,6 +382,7 @@ public net.minecraft.world.entity.item.ItemEntity target
public net.minecraft.world.entity.item.ItemEntity thrower
public net.minecraft.world.entity.item.PrimedTnt explosionPower
public net.minecraft.world.entity.item.PrimedTnt owner
public net.minecraft.world.entity.monster.Creeper droppedSkulls
public net.minecraft.world.entity.monster.Creeper explodeCreeper()V
public net.minecraft.world.entity.monster.Creeper explosionRadius
public net.minecraft.world.entity.monster.Creeper maxSwell
@@ -355,13 +407,12 @@ public net.minecraft.world.entity.monster.Vex hasLimitedLife
public net.minecraft.world.entity.monster.Vex limitedLifeTicks
public net.minecraft.world.entity.monster.Vex owner
public net.minecraft.world.entity.monster.Witch usingTime
public net.minecraft.world.entity.monster.cubemob.SulfurCube MAX_FUSE
public net.minecraft.world.entity.monster.cubemob.SulfurCube setFuse(I)V
public net.minecraft.world.entity.monster.hoglin.Hoglin cannotBeHunted
public net.minecraft.world.entity.monster.hoglin.Hoglin isImmuneToZombification()Z
public net.minecraft.world.entity.monster.hoglin.Hoglin timeInOverworld
public net.minecraft.world.entity.monster.illager.Evoker getWololoTarget()Lnet/minecraft/world/entity/animal/sheep/Sheep;
public net.minecraft.world.entity.monster.illager.Evoker setWololoTarget(Lnet/minecraft/world/entity/animal/sheep/Sheep;)V
public net.minecraft.world.entity.monster.illager.Pillager inventory
public net.minecraft.world.entity.monster.illager.SpellcasterIllager getCurrentSpell()Lnet/minecraft/world/entity/monster/illager/SpellcasterIllager$IllagerSpell;
public net.minecraft.world.entity.monster.illager.SpellcasterIllager$IllagerSpell
public net.minecraft.world.entity.monster.illager.Vindicator DOOR_BREAKING_PREDICATE
@@ -369,31 +420,37 @@ public net.minecraft.world.entity.monster.illager.Vindicator isJohnny
public net.minecraft.world.entity.monster.piglin.AbstractPiglin isImmuneToZombification()Z
public net.minecraft.world.entity.monster.piglin.AbstractPiglin timeInOverworld
public net.minecraft.world.entity.monster.piglin.Piglin cannotHunt
public net.minecraft.world.entity.monster.piglin.Piglin inventory
public net.minecraft.world.entity.monster.piglin.Piglin isChargingCrossbow()Z
public net.minecraft.world.entity.monster.skeleton.Skeleton DATA_STRAY_CONVERSION_ID
public net.minecraft.world.entity.monster.skeleton.Skeleton conversionTime
public net.minecraft.world.entity.monster.skeleton.Skeleton inPowderSnowTime
public net.minecraft.world.entity.monster.warden.WardenSpawnTracker cooldownTicks
public net.minecraft.world.entity.monster.warden.WardenSpawnTracker increaseWarningLevel()V
public net.minecraft.world.entity.monster.warden.WardenSpawnTracker ticksSinceLastWarning
public net.minecraft.world.entity.monster.zombie.Zombie DATA_DROWNED_CONVERSION_ID
public net.minecraft.world.entity.monster.zombie.Zombie DOOR_BREAKING_PREDICATE
public net.minecraft.world.entity.monster.zombie.Zombie conversionTime
public net.minecraft.world.entity.monster.zombie.Zombie isSunSensitive()Z
public net.minecraft.world.entity.monster.zombie.Zombie startUnderWaterConversion(I)V
public net.minecraft.world.entity.monster.zombie.ZombieVillager DATA_CONVERTING_ID
public net.minecraft.world.entity.monster.zombie.ZombieVillager conversionStarter
public net.minecraft.world.entity.monster.zombie.ZombieVillager startConverting(Ljava/util/UUID;I)V
public net.minecraft.world.entity.monster.zombie.ZombieVillager villagerConversionTime
public net.minecraft.world.entity.npc.villager.Villager numberOfRestocksToday
public net.minecraft.world.entity.npc.villager.Villager releaseAllPois()V
public net.minecraft.world.entity.npc.villager.Villager setUnhappy()V
public net.minecraft.world.entity.npc.villager.Villager updateDemand()V
public net.minecraft.world.entity.npc.villager.Villager updateSpecialPrices(Lnet/minecraft/world/entity/player/Player;)V
public net.minecraft.world.entity.npc.wanderingtrader.WanderingTrader getWanderTarget()Lnet/minecraft/core/BlockPos;
public net.minecraft.world.entity.player.Abilities flyingSpeed
public net.minecraft.world.entity.player.Abilities walkingSpeed
public net.minecraft.world.entity.player.Inventory equipment
public net.minecraft.world.entity.player.Player closeContainer()V
public net.minecraft.world.entity.player.Player enchantmentSeed
public net.minecraft.world.entity.player.Player getFireImmuneTicks()I
public net.minecraft.world.entity.player.Player hurtDir
public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V
public net.minecraft.world.entity.player.Player updatePlayerPose()V
public net.minecraft.world.entity.player.Player sleepCounter
public net.minecraft.world.entity.projectile.EvokerFangs warmupDelayTicks
public net.minecraft.world.entity.projectile.EyeOfEnder life
public net.minecraft.world.entity.projectile.EyeOfEnder surviveAfterDeath
@@ -405,9 +462,11 @@ public net.minecraft.world.entity.projectile.FireworkRocketEntity attachedToEnti
public net.minecraft.world.entity.projectile.FireworkRocketEntity getDefaultItem()Lnet/minecraft/world/item/ItemStack;
public net.minecraft.world.entity.projectile.FireworkRocketEntity life
public net.minecraft.world.entity.projectile.FireworkRocketEntity lifetime
public net.minecraft.world.entity.projectile.FishingHook DATA_HOOKED_ENTITY
public net.minecraft.world.entity.projectile.FishingHook calculateOpenWater(Lnet/minecraft/core/BlockPos;)Z
public net.minecraft.world.entity.projectile.FishingHook currentState
public net.minecraft.world.entity.projectile.FishingHook fishAngle
public net.minecraft.world.entity.projectile.FishingHook hookedIn
public net.minecraft.world.entity.projectile.FishingHook outOfWaterTime
public net.minecraft.world.entity.projectile.FishingHook pullEntity(Lnet/minecraft/world/entity/Entity;)V
public net.minecraft.world.entity.projectile.FishingHook setHookedEntity(Lnet/minecraft/world/entity/Entity;)V
@@ -428,31 +487,45 @@ public net.minecraft.world.entity.projectile.arrow.AbstractArrow getHitGroundSou
public net.minecraft.world.entity.projectile.arrow.AbstractArrow getPickupItem()Lnet/minecraft/world/item/ItemStack;
public net.minecraft.world.entity.projectile.arrow.AbstractArrow isInGround()Z
public net.minecraft.world.entity.projectile.arrow.AbstractArrow life
public net.minecraft.world.entity.projectile.arrow.AbstractArrow pickupItemStack
public net.minecraft.world.entity.projectile.arrow.AbstractArrow setPickupItemStack(Lnet/minecraft/world/item/ItemStack;)V
public net.minecraft.world.entity.projectile.arrow.AbstractArrow setPierceLevel(B)V
public net.minecraft.world.entity.projectile.arrow.Arrow NO_EFFECT_COLOR
public net.minecraft.world.entity.projectile.arrow.Arrow getPotionContents()Lnet/minecraft/world/item/alchemy/PotionContents;
public net.minecraft.world.entity.projectile.arrow.Arrow setPotionContents(Lnet/minecraft/world/item/alchemy/PotionContents;)V
public net.minecraft.world.entity.projectile.arrow.Arrow updateColor()V
public net.minecraft.world.entity.projectile.arrow.SpectralArrow duration
public net.minecraft.world.entity.projectile.arrow.ThrownTrident dealtDamage
public net.minecraft.world.entity.projectile.hurtingprojectile.AbstractHurtingProjectile assignDirectionalMovement(Lnet/minecraft/world/phys/Vec3;D)V
public net.minecraft.world.entity.projectile.hurtingprojectile.LargeFireball explosionPower
public net.minecraft.world.entity.projectile.hurtingprojectile.windcharge.AbstractWindCharge explode(Lnet/minecraft/world/phys/Vec3;)V
public net.minecraft.world.entity.projectile.hurtingprojectile.windcharge.BreezeWindCharge explode(Lnet/minecraft/world/phys/Vec3;)V
public net.minecraft.world.entity.projectile.hurtingprojectile.windcharge.WindCharge explode(Lnet/minecraft/world/phys/Vec3;)V
public net.minecraft.world.entity.projectile.throwableitemprojectile.ThrowableItemProjectile getDefaultItem()Lnet/minecraft/world/item/Item;
public net.minecraft.world.entity.raid.Raid heroesOfTheVillage
public net.minecraft.world.entity.raid.Raid raidEvent
public net.minecraft.world.entity.raid.Raid raidOmenLevel
public net.minecraft.world.entity.raid.Raid ticksActive
public net.minecraft.world.entity.raid.Raid totalHealth
public net.minecraft.world.entity.raid.Raider$HoldGroundAttackGoal
public net.minecraft.world.entity.raid.Raids raidMap
public net.minecraft.world.entity.vehicle.VehicleEntity getDropItem()Lnet/minecraft/world/item/Item;
public net.minecraft.world.entity.vehicle.boat.AbstractBoat getStatus()Lnet/minecraft/world/entity/vehicle/boat/AbstractBoat$Status;
public net.minecraft.world.entity.vehicle.boat.AbstractBoat status
public net.minecraft.world.entity.vehicle.minecart.AbstractMinecartContainer lootTable
public net.minecraft.world.entity.vehicle.minecart.AbstractMinecartContainer lootTableSeed
public net.minecraft.world.entity.vehicle.minecart.MinecartCommandBlock DATA_ID_COMMAND_NAME
public net.minecraft.world.entity.vehicle.minecart.MinecartFurnace fuel
public net.minecraft.world.entity.vehicle.minecart.MinecartTNT explode(Lnet/minecraft/world/damagesource/DamageSource;D)V
public net.minecraft.world.entity.vehicle.minecart.MinecartTNT explosionPowerBase
public net.minecraft.world.entity.vehicle.minecart.MinecartTNT explosionSpeedFactor
public net.minecraft.world.entity.vehicle.minecart.MinecartTNT fuse
public net.minecraft.world.flag.FeatureFlag mask
public net.minecraft.world.flag.FeatureFlag universe
public net.minecraft.world.flag.FeatureFlagRegistry names
public net.minecraft.world.food.FoodData exhaustionLevel
public net.minecraft.world.food.FoodData foodLevel
public net.minecraft.world.food.FoodData saturationLevel
public net.minecraft.world.inventory.AbstractContainerMenu menuType
public net.minecraft.world.inventory.AbstractContainerMenu quickcraftSlots
public net.minecraft.world.inventory.AbstractContainerMenu quickcraftStatus
@@ -471,13 +544,21 @@ public net.minecraft.world.inventory.AnvilMenu itemName
public net.minecraft.world.inventory.AnvilMenu repairItemCountCost
public net.minecraft.world.inventory.BrewingStandMenu brewingStandData
public net.minecraft.world.inventory.CraftingMenu access
public net.minecraft.world.inventory.DispenserMenu dispenser
public net.minecraft.world.inventory.MerchantContainer selectionHint
public net.minecraft.world.inventory.Slot slot
public net.minecraft.world.item.AdventureModePredicate predicates
public net.minecraft.world.item.BucketItem content
public net.minecraft.world.item.CrossbowItem FIREWORK_POWER
public net.minecraft.world.item.DebugStickItem handleInteraction(Lnet/minecraft/server/level/ServerPlayer;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/LevelAccessor;Lnet/minecraft/core/BlockPos;ZLnet/minecraft/world/item/ItemStack;)Z
public net.minecraft.world.item.ItemCooldowns cooldowns
public net.minecraft.world.item.ItemCooldowns tickCount
public net.minecraft.world.item.ItemCooldowns$CooldownInstance
public net.minecraft.world.item.ItemCooldowns$CooldownInstance <init>(II)V
public net.minecraft.world.item.ItemStackLinkedSet TYPE_AND_TAG
public net.minecraft.world.item.JukeboxSongPlayer song
public net.minecraft.world.item.MapItem createNewSavedData(Lnet/minecraft/server/level/ServerLevel;IIIZZLnet/minecraft/resources/ResourceKey;)Lnet/minecraft/world/level/saveddata/maps/MapId;
public net.minecraft.world.item.StandingAndWallBlockItem wallBlock
public net.minecraft.world.item.component.ItemContainerContents MAX_SIZE
public net.minecraft.world.item.component.ItemContainerContents items
public net.minecraft.world.item.component.ResolvableProfile unpack()Lcom/mojang/datafixers/util/Either;
@@ -492,6 +573,8 @@ public net.minecraft.world.item.crafting.RecipeManager recipes
public net.minecraft.world.item.crafting.RecipeMap byKey
public net.minecraft.world.item.crafting.RecipeMap byType
public net.minecraft.world.item.trading.MerchantOffer demand
public net.minecraft.world.item.trading.MerchantOffer result
public net.minecraft.world.item.trading.MerchantOffer specialPriceDiff
public net.minecraft.world.item.trading.MerchantOffer uses
public net.minecraft.world.level.BaseSpawner delay(Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;)V
public net.minecraft.world.level.BaseSpawner isNearPlayer(Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;)Z
@@ -508,7 +591,9 @@ public net.minecraft.world.level.BaseSpawner spawnRange
public net.minecraft.world.level.Level DEFAULT_EXPLOSION_BLOCK_PARTICLES
public net.minecraft.world.level.Level blockEntityTickers
public net.minecraft.world.level.Level getEntities()Lnet/minecraft/world/level/entity/LevelEntityGetter;
public net.minecraft.world.level.Level levelData
public net.minecraft.world.level.Level rainLevel
public net.minecraft.world.level.Level thread
public net.minecraft.world.level.Level thunderLevel
public net.minecraft.world.level.NaturalSpawner SPAWNING_CATEGORIES
public net.minecraft.world.level.StructureManager level
@@ -518,14 +603,19 @@ public net.minecraft.world.level.biome.Biome getTemperature(Lnet/minecraft/core/
public net.minecraft.world.level.biome.Biome$ClimateSettings
public net.minecraft.world.level.biome.Biome$ClimateSettings <init>(ZFLnet/minecraft/world/level/biome/Biome$TemperatureModifier;F)V
public net.minecraft.world.level.block.Block popExperience(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/core/BlockPos;I)V
public net.minecraft.world.level.block.ChestBlock isBlockedChestByBlock(Lnet/minecraft/world/level/BlockGetter;Lnet/minecraft/core/BlockPos;)Z
public net.minecraft.world.level.block.ComposterBlock$EmptyContainer
public net.minecraft.world.level.block.ComposterBlock$InputContainer
public net.minecraft.world.level.block.ComposterBlock$OutputContainer
public net.minecraft.world.level.block.DispenserBlock dispenseFrom(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/core/BlockPos;)V
public net.minecraft.world.level.block.DropperBlock dispenseFrom(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/core/BlockPos;)V
public net.minecraft.world.level.block.FireBlock igniteOdds
public net.minecraft.world.level.block.RedStoneWireBlock canSurvive(Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/LevelReader;Lnet/minecraft/core/BlockPos;)Z
public net.minecraft.world.level.block.RedStoneWireBlock shouldSignal
public net.minecraft.world.level.block.SelectableSlotContainer getSection(FI)I
public net.minecraft.world.level.block.ShulkerBoxBlock color
public net.minecraft.world.level.block.SoundType breakSound
public net.minecraft.world.level.block.SoundType hitSound
public net.minecraft.world.level.block.TurtleEggBlock decreaseEggs(Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;)V
public net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity cookingTimer
public net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity cookingTotalTime
@@ -534,12 +624,16 @@ public net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity litTime
public net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity recipesUsed
public net.minecraft.world.level.block.entity.BannerBlockEntity name
public net.minecraft.world.level.block.entity.BarrelBlockEntity openersCounter
public net.minecraft.world.level.block.entity.BarrelBlockEntity playSound(Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/sounds/SoundEvent;)V
public net.minecraft.world.level.block.entity.BarrelBlockEntity updateBlockState(Lnet/minecraft/world/level/block/state/BlockState;Z)V
public net.minecraft.world.level.block.entity.BaseContainerBlockEntity lockKey
public net.minecraft.world.level.block.entity.BaseContainerBlockEntity name
public net.minecraft.world.level.block.entity.BeaconBlockEntity levels
public net.minecraft.world.level.block.entity.BeaconBlockEntity lockKey
public net.minecraft.world.level.block.entity.BeaconBlockEntity name
public net.minecraft.world.level.block.entity.BeaconBlockEntity primaryPower
public net.minecraft.world.level.block.entity.BeaconBlockEntity secondaryPower
public net.minecraft.world.level.block.entity.BedBlockEntity color
public net.minecraft.world.level.block.entity.BeehiveBlockEntity savedFlowerPos
public net.minecraft.world.level.block.entity.BellBlockEntity resonating
public net.minecraft.world.level.block.entity.BellBlockEntity resonationTicks
@@ -562,29 +656,41 @@ public net.minecraft.world.level.block.entity.ConduitBlockEntity effectBlocks
public net.minecraft.world.level.block.entity.ConduitBlockEntity getDestroyRangeAABB(Lnet/minecraft/core/BlockPos;)Lnet/minecraft/world/phys/AABB;
public net.minecraft.world.level.block.entity.ConduitBlockEntity updateDestroyTarget(Lnet/minecraft/world/entity/EntityReference;Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/core/BlockPos;Z)Lnet/minecraft/world/entity/EntityReference;
public net.minecraft.world.level.block.entity.CrafterBlockEntity craftingTicksRemaining
public net.minecraft.world.level.block.entity.CreakingHeartBlockEntity clearCreakingInfo()V
public net.minecraft.world.level.block.entity.CreakingHeartBlockEntity getCreakingProtector()Ljava/util/Optional;
public net.minecraft.world.level.block.entity.CreakingHeartBlockEntity spawnProtector(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/world/level/block/entity/CreakingHeartBlockEntity;)Lnet/minecraft/world/entity/monster/creaking/Creaking;
public net.minecraft.world.level.block.entity.CreakingHeartBlockEntity spreadResin(Lnet/minecraft/server/level/ServerLevel;)Ljava/util/Optional;
public net.minecraft.world.level.block.entity.DecoratedPotBlockEntity decorations
public net.minecraft.world.level.block.entity.EnderChestBlockEntity openersCounter
public net.minecraft.world.level.block.entity.HopperBlockEntity cooldownTime
public net.minecraft.world.level.block.entity.HopperBlockEntity setCooldown(I)V
public net.minecraft.world.level.block.entity.LecternBlockEntity bookAccess
public net.minecraft.world.level.block.entity.LecternBlockEntity setPage(I)V
public net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity lootTable
public net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity lootTableSeed
public net.minecraft.world.level.block.entity.SculkCatalystBlockEntity$CatalystListener bloom(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/util/RandomSource;)V
public net.minecraft.world.level.block.entity.SculkSensorBlockEntity lastVibrationFrequency
public net.minecraft.world.level.block.entity.SculkShriekerBlockEntity warningLevel
public net.minecraft.world.level.block.entity.ShulkerBoxBlockEntity openCount
public net.minecraft.world.level.block.entity.SignBlockEntity playerWhoMayEdit
public net.minecraft.world.level.block.entity.SkullBlockEntity customName
public net.minecraft.world.level.block.entity.SkullBlockEntity noteBlockSound
public net.minecraft.world.level.block.entity.SkullBlockEntity owner
public net.minecraft.world.level.block.entity.StructureBlockEntity author
public net.minecraft.world.level.block.entity.StructureBlockEntity ignoreEntities
public net.minecraft.world.level.block.entity.StructureBlockEntity integrity
public net.minecraft.world.level.block.entity.StructureBlockEntity metaData
public net.minecraft.world.level.block.entity.StructureBlockEntity mirror
public net.minecraft.world.level.block.entity.StructureBlockEntity mode
public net.minecraft.world.level.block.entity.StructureBlockEntity rotation
public net.minecraft.world.level.block.entity.StructureBlockEntity seed
public net.minecraft.world.level.block.entity.StructureBlockEntity showAir
public net.minecraft.world.level.block.entity.StructureBlockEntity showBoundingBox
public net.minecraft.world.level.block.entity.StructureBlockEntity structurePos
public net.minecraft.world.level.block.entity.StructureBlockEntity structureSize
public net.minecraft.world.level.block.entity.TheEndGatewayBlockEntity age
public net.minecraft.world.level.block.entity.TheEndGatewayBlockEntity exactTeleport
public net.minecraft.world.level.block.entity.TheEndGatewayBlockEntity exitPortal
public net.minecraft.world.level.block.entity.TrialSpawnerBlockEntity trialSpawner
public net.minecraft.world.level.block.entity.trialspawner.TrialSpawner config
public net.minecraft.world.level.block.entity.trialspawner.TrialSpawner isOminous
public net.minecraft.world.level.block.entity.trialspawner.TrialSpawner stateAccessor
public net.minecraft.world.level.block.entity.trialspawner.TrialSpawnerStateData cooldownEndsAt
public net.minecraft.world.level.block.entity.trialspawner.TrialSpawnerStateData currentMobs
public net.minecraft.world.level.block.entity.trialspawner.TrialSpawnerStateData detectedPlayers
@@ -597,16 +703,23 @@ public net.minecraft.world.level.block.entity.vault.VaultServerData stateUpdatin
public net.minecraft.world.level.block.entity.vault.VaultSharedData getConnectedPlayers()Ljava/util/Set;
public net.minecraft.world.level.block.state.BlockBehaviour getMenuProvider(Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;)Lnet/minecraft/world/MenuProvider;
public net.minecraft.world.level.block.state.BlockBehaviour hasCollision
public net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase destroySpeed
public net.minecraft.world.level.block.state.StateHolder PROPERTY_ENTRY_TO_STRING_FUNCTION
public net.minecraft.world.level.block.state.properties.IntegerProperty max
public net.minecraft.world.level.block.state.properties.IntegerProperty min
public net.minecraft.world.level.chunk.ChunkAccess blockEntities
public net.minecraft.world.level.chunk.ChunkAccess heightmaps
public net.minecraft.world.level.chunk.ChunkGenerator generationSettingsGetter
public net.minecraft.world.level.chunk.LevelChunk level
public net.minecraft.world.level.chunk.LevelChunk loaded
public net.minecraft.world.level.chunk.LevelChunkSection states
public net.minecraft.world.level.chunk.status.ChunkStatusTasks postLoadProtoChunk(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/world/level/storage/ValueInput$ValueInputList;)V
public net.minecraft.world.level.chunk.storage.EntityStorage entityDeserializerQueue
public net.minecraft.world.level.chunk.storage.EntityStorage level
public net.minecraft.world.level.chunk.storage.RegionFileStorage regionCache
public net.minecraft.world.level.dimension.end.EnderDragonFight GATEWAY_COUNT
public net.minecraft.world.level.dimension.end.EnderDragonFight dragonEvent
public net.minecraft.world.level.dimension.end.EnderDragonFight dragonUUID
public net.minecraft.world.level.dimension.end.EnderDragonFight exitPortalLocation
public net.minecraft.world.level.dimension.end.EnderDragonFight findExitPortal()Lnet/minecraft/world/level/block/state/pattern/BlockPattern$BlockPatternMatch;
public net.minecraft.world.level.dimension.end.EnderDragonFight gateways
@@ -621,6 +734,7 @@ public net.minecraft.world.level.dimension.end.EnderDragonFight spawnNewGateway(
public net.minecraft.world.level.entity.PersistentEntitySectionManager ensureChunkQueuedForLoad(J)V
public net.minecraft.world.level.entity.PersistentEntitySectionManager permanentStorage
public net.minecraft.world.level.gamerules.GameRules rules
public net.minecraft.world.level.levelgen.NoiseBasedChunkGenerator 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
@@ -630,6 +744,9 @@ 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$LazyCondition
public net.minecraft.world.level.levelgen.SurfaceRules$LazyYCondition
public net.minecraft.world.level.levelgen.SurfaceRules$SurfaceRule
public net.minecraft.world.level.levelgen.SurfaceRules$VerticalGradientConditionSource
public net.minecraft.world.level.levelgen.SurfaceRules$VerticalGradientConditionSource <init>(Lnet/minecraft/resources/Identifier;Lnet/minecraft/world/level/levelgen/VerticalAnchor;Lnet/minecraft/world/level/levelgen/VerticalAnchor;)V
public net.minecraft.world.level.levelgen.structure.StructurePiece SHAPE_CHECK_BLOCKS
public net.minecraft.world.level.levelgen.structure.placement.StructurePlacement exclusionZone
public net.minecraft.world.level.levelgen.structure.placement.StructurePlacement frequency
@@ -643,20 +760,29 @@ public net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemp
public net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager tryLoad(Lnet/minecraft/resources/Identifier;)Ljava/util/Optional;
public net.minecraft.world.level.levelgen.structure.templatesystem.loader.TemplateSource readStructure(Ljava/io/InputStream;)Lnet/minecraft/nbt/CompoundTag;
public net.minecraft.world.level.levelgen.structure.templatesystem.loader.TemplateSource readStructure(Lnet/minecraft/nbt/CompoundTag;)Lnet/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate;
public net.minecraft.world.level.material.MapColor MATERIAL_COLORS
public net.minecraft.world.level.pathfinder.Path nodes
public net.minecraft.world.level.pathfinder.PathFinder nodeEvaluator
public net.minecraft.world.level.saveddata.maps.MapItemSavedData carriedBy
public net.minecraft.world.level.saveddata.maps.MapItemSavedData carriedByPlayers
public net.minecraft.world.level.saveddata.maps.MapItemSavedData decorations
public net.minecraft.world.level.saveddata.maps.MapItemSavedData setColorsDirty(II)V
public net.minecraft.world.level.saveddata.maps.MapItemSavedData setDecorationsDirty()V
public net.minecraft.world.level.storage.LevelStorageSource baseDir
public net.minecraft.world.level.storage.LevelStorageSource$LevelStorageAccess levelDirectory
public net.minecraft.world.level.storage.PrimaryLevelData settings
public net.minecraft.world.level.storage.SavedDataStorage cache
public net.minecraft.world.level.storage.TagValueInput input
public net.minecraft.world.scores.Objective displayName
public net.minecraft.world.scores.criteria.ObjectiveCriteria CRITERIA_CACHE
public-f net.minecraft.server.MinecraftServer potionBrewing
public-f net.minecraft.server.MinecraftServer storageSource
public-f net.minecraft.server.ReloadableServerResources commands
public-f net.minecraft.server.dedicated.DedicatedServer serverLinks
public-f net.minecraft.server.dedicated.DedicatedServer settings
public-f net.minecraft.server.dedicated.DedicatedServerProperties pauseWhenEmptySeconds
public-f net.minecraft.world.entity.LivingEntity combatTracker
public-f net.minecraft.world.entity.Mob goalSelector
public-f net.minecraft.world.entity.Mob targetSelector
public-f net.minecraft.world.entity.ai.attributes.RangedAttribute maxValue
public-f net.minecraft.world.entity.player.Player gameProfile
+3 -30
View File
@@ -1,46 +1,19 @@
import io.papermc.paperweight.checkstyle.PaperCheckstyleExt
import io.papermc.paperweight.checkstyle.tasks.PaperCheckstyleTask
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins {
id("io.papermc.paperweight.core") version "2.0.0-beta.21" apply false
id("io.papermc.paperweight.core") version "2.0.0-SNAPSHOT" apply false
}
subprojects {
apply {
plugin("java-library")
plugin("maven-publish")
}
apply(plugin = "java-library")
apply(plugin = "maven-publish")
extensions.configure<JavaPluginExtension> {
toolchain {
languageVersion = JavaLanguageVersion.of(25)
}
}
val tempDisabled = setOf("paper-server", "paper-generator", "test-plugin")
if (name !in tempDisabled) {
apply { plugin("io.papermc.paperweight.paper-checkstyle") }
extensions.configure<PaperCheckstyleExt> {
typeUseAnnotationsFile.set(rootProject.layout.projectDirectory.file(".checkstyle/type_use_annotations.txt"))
}
/*tasks.withType<PaperCheckstyleTask>().configureEach {
configDirectory = rootProject.layout.projectDirectory.dir(".checkstyle")
// configFile = layout.projectDirectory.file(".checkstyle/checkstyle.xml").asFile // use the base file if not overwritten
maxHeapSize = "2g"
reports {
xml.required = true
html.required = true
}
}*/
dependencies {
"checkstyle"(project(":paper-checkstyle"))
}
}
}
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
+3 -3
View File
@@ -1,9 +1,9 @@
group=io.papermc.paper
mcVersion=26.2
mcVersion=26.1.2
# This is the current API version for use in (paper-)plugin.yml files
# During snapshot cycles this should be the anticipated version of the release target
apiVersion=26.2
channel=STABLE
apiVersion=26.1.2
channel=ALPHA
# Set to true while updating Minecraft version
updatingMinecraft=false
-26
View File
@@ -1,26 +0,0 @@
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<module name="Checker">
<!--Single Suppression Filters-->
<module name="io.papermc.checkstyle.filters.BetterSuppressionSingleFilter">
<property name="checks" value="Javadoc(Method|Type)"/>
<property name="messageKey" value="javadoc\.unknownTag"/>
<!--[A-Z].* check is for java annotations inside code blocks inside Javadocs-->
<property name="arguments" value="(${custom_javadoc_tags}|[A-Z].*)"/>
</module>
<module name="TreeWalker">
<module name="JavadocVariable">
<!--requires on public fields-->
<property name="accessModifiers" value="public"/>
</module>
<module name="MissingJavadocMethod">
<property name="allowedAnnotations" value="Override, ApiStatus.Internal"/>
<property name="ignoreMethodNamesRegex" value="^getHandlerList$"/>
</module>
<module name="MissingJavadocPackage"/>
<module name="MissingJavadocType">
<property name="skipAnnotations" value="Generated, ApiStatus.Internal" />
</module>
</module>
</module>
@@ -1,201 +0,0 @@
paper-api/src/generated/java/com/destroystokyo/paper/entity/ai/
paper-api/src/generated/java/io/papermc/paper/registry/keys/
paper-api/src/generated/java/io/papermc/paper/registry/keys/tags/
paper-api/src/main/java/co/aikar/timings/
paper-api/src/main/java/co/aikar/util/
paper-api/src/main/java/com/destroystokyo/paper/
paper-api/src/main/java/com/destroystokyo/paper/block/
paper-api/src/main/java/com/destroystokyo/paper/brigadier/
paper-api/src/main/java/com/destroystokyo/paper/entity/
paper-api/src/main/java/com/destroystokyo/paper/entity/ai/
paper-api/src/main/java/com/destroystokyo/paper/entity/villager/
paper-api/src/main/java/com/destroystokyo/paper/event/block/
paper-api/src/main/java/com/destroystokyo/paper/event/brigadier/
paper-api/src/main/java/com/destroystokyo/paper/event/entity/
paper-api/src/main/java/com/destroystokyo/paper/event/inventory/
paper-api/src/main/java/com/destroystokyo/paper/event/player/
paper-api/src/main/java/com/destroystokyo/paper/event/profile/
paper-api/src/main/java/com/destroystokyo/paper/event/server/
paper-api/src/main/java/com/destroystokyo/paper/exception/
paper-api/src/main/java/com/destroystokyo/paper/inventory/meta/
paper-api/src/main/java/com/destroystokyo/paper/loottable/
paper-api/src/main/java/com/destroystokyo/paper/network/
paper-api/src/main/java/com/destroystokyo/paper/profile/
paper-api/src/main/java/com/destroystokyo/paper/util/
paper-api/src/main/java/com/destroystokyo/paper/utils/
paper-api/src/main/java/io/papermc/paper/advancement/
paper-api/src/main/java/io/papermc/paper/annotation/
paper-api/src/main/java/io/papermc/paper/ban/
paper-api/src/main/java/io/papermc/paper/block/
paper-api/src/main/java/io/papermc/paper/block/bed/
paper-api/src/main/java/io/papermc/paper/block/fluid/
paper-api/src/main/java/io/papermc/paper/block/fluid/type/
paper-api/src/main/java/io/papermc/paper/brigadier/
paper-api/src/main/java/io/papermc/paper/chat/
paper-api/src/main/java/io/papermc/paper/command/
paper-api/src/main/java/io/papermc/paper/command/brigadier/
paper-api/src/main/java/io/papermc/paper/command/brigadier/argument/
paper-api/src/main/java/io/papermc/paper/command/brigadier/argument/position/
paper-api/src/main/java/io/papermc/paper/command/brigadier/argument/predicate/
paper-api/src/main/java/io/papermc/paper/command/brigadier/argument/range/
paper-api/src/main/java/io/papermc/paper/command/brigadier/argument/resolvers/
paper-api/src/main/java/io/papermc/paper/command/brigadier/argument/resolvers/selector/
paper-api/src/main/java/io/papermc/paper/configuration/
paper-api/src/main/java/io/papermc/paper/connection/
paper-api/src/main/java/io/papermc/paper/datacomponent/
paper-api/src/main/java/io/papermc/paper/datacomponent/item/
paper-api/src/main/java/io/papermc/paper/datacomponent/item/attribute/
paper-api/src/main/java/io/papermc/paper/datacomponent/item/blocksattacks/
paper-api/src/main/java/io/papermc/paper/datacomponent/item/consumable/
paper-api/src/main/java/io/papermc/paper/datapack/
paper-api/src/main/java/io/papermc/paper/dialog/
paper-api/src/main/java/io/papermc/paper/enchantments/
paper-api/src/main/java/io/papermc/paper/entity/
paper-api/src/main/java/io/papermc/paper/entity/poi/
paper-api/src/main/java/io/papermc/paper/event/block/
paper-api/src/main/java/io/papermc/paper/event/connection/
paper-api/src/main/java/io/papermc/paper/event/connection/configuration/
paper-api/src/main/java/io/papermc/paper/event/entity/
paper-api/src/main/java/io/papermc/paper/event/executor/
paper-api/src/main/java/io/papermc/paper/event/inventory/
paper-api/src/main/java/io/papermc/paper/event/packet/
paper-api/src/main/java/io/papermc/paper/event/player/
paper-api/src/main/java/io/papermc/paper/event/server/
paper-api/src/main/java/io/papermc/paper/event/world/
paper-api/src/main/java/io/papermc/paper/event/world/border/
paper-api/src/main/java/io/papermc/paper/generated/
paper-api/src/main/java/io/papermc/paper/inventory/
paper-api/src/main/java/io/papermc/paper/inventory/tooltip/
paper-api/src/main/java/io/papermc/paper/item/
paper-api/src/main/java/io/papermc/paper/persistence/
paper-api/src/main/java/io/papermc/paper/plugin/
paper-api/src/main/java/io/papermc/paper/plugin/bootstrap/
paper-api/src/main/java/io/papermc/paper/plugin/configuration/
paper-api/src/main/java/io/papermc/paper/plugin/lifecycle/event/
paper-api/src/main/java/io/papermc/paper/plugin/lifecycle/event/handler/
paper-api/src/main/java/io/papermc/paper/plugin/lifecycle/event/handler/configuration/
paper-api/src/main/java/io/papermc/paper/plugin/lifecycle/event/registrar/
paper-api/src/main/java/io/papermc/paper/plugin/lifecycle/event/types/
paper-api/src/main/java/io/papermc/paper/plugin/loader/
paper-api/src/main/java/io/papermc/paper/plugin/loader/library/
paper-api/src/main/java/io/papermc/paper/plugin/loader/library/impl/
paper-api/src/main/java/io/papermc/paper/plugin/provider/classloader/
paper-api/src/main/java/io/papermc/paper/plugin/provider/entrypoint/
paper-api/src/main/java/io/papermc/paper/plugin/provider/util/
paper-api/src/main/java/io/papermc/paper/potion/
paper-api/src/main/java/io/papermc/paper/raytracing/
paper-api/src/main/java/io/papermc/paper/registry/
paper-api/src/main/java/io/papermc/paper/registry/data/
paper-api/src/main/java/io/papermc/paper/registry/data/client/
paper-api/src/main/java/io/papermc/paper/registry/data/dialog/
paper-api/src/main/java/io/papermc/paper/registry/data/dialog/action/
paper-api/src/main/java/io/papermc/paper/registry/data/dialog/body/
paper-api/src/main/java/io/papermc/paper/registry/data/dialog/input/
paper-api/src/main/java/io/papermc/paper/registry/data/dialog/type/
paper-api/src/main/java/io/papermc/paper/registry/event/
paper-api/src/main/java/io/papermc/paper/registry/event/type/
paper-api/src/main/java/io/papermc/paper/registry/holder/
paper-api/src/main/java/io/papermc/paper/registry/set/
paper-api/src/main/java/io/papermc/paper/registry/tag/
paper-api/src/main/java/io/papermc/paper/scoreboard/numbers/
paper-api/src/main/java/io/papermc/paper/tag/
paper-api/src/main/java/io/papermc/paper/text/
paper-api/src/main/java/io/papermc/paper/threadedregions/
paper-api/src/main/java/io/papermc/paper/threadedregions/scheduler/
paper-api/src/main/java/io/papermc/paper/util/
paper-api/src/main/java/io/papermc/paper/world/
paper-api/src/main/java/io/papermc/paper/world/damagesource/
paper-api/src/main/java/io/papermc/paper/world/flag/
paper-api/src/main/java/org/bukkit/
paper-api/src/main/java/org/bukkit/advancement/
paper-api/src/main/java/org/bukkit/attribute/
paper-api/src/main/java/org/bukkit/ban/
paper-api/src/main/java/org/bukkit/block/
paper-api/src/main/java/org/bukkit/block/banner/
paper-api/src/main/java/org/bukkit/block/data/
paper-api/src/main/java/org/bukkit/block/data/type/
paper-api/src/main/java/org/bukkit/block/sign/
paper-api/src/main/java/org/bukkit/block/spawner/
paper-api/src/main/java/org/bukkit/block/structure/
paper-api/src/main/java/org/bukkit/boss/
paper-api/src/main/java/org/bukkit/command/
paper-api/src/main/java/org/bukkit/command/defaults/
paper-api/src/main/java/org/bukkit/configuration/
paper-api/src/main/java/org/bukkit/configuration/file/
paper-api/src/main/java/org/bukkit/configuration/serialization/
paper-api/src/main/java/org/bukkit/conversations/
paper-api/src/main/java/org/bukkit/damage/
paper-api/src/main/java/org/bukkit/enchantments/
paper-api/src/main/java/org/bukkit/entity/
paper-api/src/main/java/org/bukkit/entity/boat/
paper-api/src/main/java/org/bukkit/entity/memory/
paper-api/src/main/java/org/bukkit/entity/minecart/
paper-api/src/main/java/org/bukkit/event/
paper-api/src/main/java/org/bukkit/event/block/
paper-api/src/main/java/org/bukkit/event/command/
paper-api/src/main/java/org/bukkit/event/enchantment/
paper-api/src/main/java/org/bukkit/event/entity/
paper-api/src/main/java/org/bukkit/event/hanging/
paper-api/src/main/java/org/bukkit/event/inventory/
paper-api/src/main/java/org/bukkit/event/player/
paper-api/src/main/java/org/bukkit/event/raid/
paper-api/src/main/java/org/bukkit/event/server/
paper-api/src/main/java/org/bukkit/event/vehicle/
paper-api/src/main/java/org/bukkit/event/weather/
paper-api/src/main/java/org/bukkit/event/world/
paper-api/src/main/java/org/bukkit/generator/
paper-api/src/main/java/org/bukkit/generator/structure/
paper-api/src/main/java/org/bukkit/help/
paper-api/src/main/java/org/bukkit/inventory/
paper-api/src/main/java/org/bukkit/inventory/meta/
paper-api/src/main/java/org/bukkit/inventory/meta/components/
paper-api/src/main/java/org/bukkit/inventory/meta/tags/
paper-api/src/main/java/org/bukkit/inventory/meta/trim/
paper-api/src/main/java/org/bukkit/inventory/recipe/
paper-api/src/main/java/org/bukkit/inventory/view/
paper-api/src/main/java/org/bukkit/inventory/view/builder/
paper-api/src/main/java/org/bukkit/loot/
paper-api/src/main/java/org/bukkit/map/
paper-api/src/main/java/org/bukkit/material/
paper-api/src/main/java/org/bukkit/material/types/
paper-api/src/main/java/org/bukkit/metadata/
paper-api/src/main/java/org/bukkit/packs/
paper-api/src/main/java/org/bukkit/permissions/
paper-api/src/main/java/org/bukkit/persistence/
paper-api/src/main/java/org/bukkit/plugin/
paper-api/src/main/java/org/bukkit/plugin/java/
paper-api/src/main/java/org/bukkit/plugin/messaging/
paper-api/src/main/java/org/bukkit/potion/
paper-api/src/main/java/org/bukkit/profile/
paper-api/src/main/java/org/bukkit/projectiles/
paper-api/src/main/java/org/bukkit/scheduler/
paper-api/src/main/java/org/bukkit/scoreboard/
paper-api/src/main/java/org/bukkit/spawner/
paper-api/src/main/java/org/bukkit/structure/
paper-api/src/main/java/org/bukkit/tag/
paper-api/src/main/java/org/bukkit/util/
paper-api/src/main/java/org/bukkit/util/io/
paper-api/src/main/java/org/bukkit/util/noise/
paper-api/src/main/java/org/bukkit/util/permissions/
paper-api/src/main/java/org/spigotmc/
paper-api/src/main/java/org/spigotmc/event/player/
paper-api/src/test/java/com/destroystokyo/paper/
paper-api/src/test/java/io/papermc/paper/adventure/
paper-api/src/test/java/io/papermc/paper/registry/
paper-api/src/test/java/io/papermc/paper/testing/
paper-api/src/test/java/io/papermc/paper/util/
paper-api/src/test/java/org/bukkit/
paper-api/src/test/java/org/bukkit/configuration/
paper-api/src/test/java/org/bukkit/configuration/file/
paper-api/src/test/java/org/bukkit/conversations/
paper-api/src/test/java/org/bukkit/event/
paper-api/src/test/java/org/bukkit/materials/
paper-api/src/test/java/org/bukkit/metadata/
paper-api/src/test/java/org/bukkit/plugin/
paper-api/src/test/java/org/bukkit/plugin/messaging/
paper-api/src/test/java/org/bukkit/scoreboard/
paper-api/src/test/java/org/bukkit/support/
paper-api/src/test/java/org/bukkit/support/provider/
paper-api/src/test/java/org/bukkit/support/test/
paper-api/src/test/java/org/bukkit/util/
paper-api/src/test/java/org/bukkit/util/io/
+23 -33
View File
@@ -1,11 +1,9 @@
import io.papermc.paperweight.checkstyle.JavadocTag
import paper.libs.com.google.gson.Gson
plugins {
`java-library`
`maven-publish`
idea
id("io.papermc.paperweight.paper-checkstyle")
}
java {
@@ -13,26 +11,13 @@ java {
withJavadocJar()
}
val projectCustomJavadocTags = setOf(
JavadocTag("apiNote", "a", "API Note:"),
)
paperCheckstyle {
customJavadocTags = projectCustomJavadocTags
directoriesToSkipFile = layout.projectDirectory.file(".checkstyle/ignored_directories.txt")
}
val annotationsVersion = "26.0.2"
val adventureVersion = "5.2.0"
val adventureVersion = "4.26.1"
val bungeeCordChatVersion = "1.21-R0.2-deprecated+build.21"
val slf4jVersion = "2.0.17"
val log4jVersion = "2.26.0"
val log4jVersion = "2.25.2"
val apiAndDocs: Configuration by configurations.creating
configurations.api {
extendsFrom(apiAndDocs)
}
val javadocSourcepath: Configuration by configurations.creating {
val apiAndDocs: Configuration by configurations.creating {
attributes {
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION))
attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling.EXTERNAL))
@@ -40,6 +25,9 @@ val javadocSourcepath: Configuration by configurations.creating {
attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage.JAVA_RUNTIME))
}
}
configurations.api {
extendsFrom(apiAndDocs)
}
// Configure mockito agent that is needed in newer Java versions
val mockitoAgent = configurations.register("mockitoAgent")
@@ -54,8 +42,8 @@ abstract class MockitoAgentProvider : CommandLineArgumentProvider {
dependencies {
// api dependencies are listed transitively to API consumers
api("com.google.guava:guava:33.6.0-jre")
api("com.google.code.gson:gson:2.14.0")
api("com.google.guava:guava:33.5.0-jre")
api("com.google.code.gson:gson:2.13.2")
api("org.yaml:snakeyaml:2.2")
api("org.joml:joml:1.10.8") {
isTransitive = false // https://github.com/JOML-CI/JOML/issues/352
@@ -72,7 +60,6 @@ dependencies {
apiAndDocs(platform("net.kyori:adventure-bom:$adventureVersion"))
apiAndDocs("net.kyori:adventure-api")
apiAndDocs("net.kyori:adventure-key")
apiAndDocs("net.kyori:adventure-text-minimessage")
apiAndDocs("net.kyori:adventure-text-serializer-gson")
apiAndDocs("net.kyori:adventure-text-serializer-legacy")
@@ -87,13 +74,12 @@ dependencies {
val annotations = "org.jetbrains:annotations:$annotationsVersion"
compileOnly(annotations)
testCompileOnly(annotations)
javadocSourcepath(annotations) // For adventure-api module requirements
val checkerQual = "org.checkerframework:checker-qual:3.49.2"
compileOnlyApi(checkerQual)
testCompileOnly(checkerQual)
apiAndDocs("org.jspecify:jspecify:1.0.0")
api("org.jspecify:jspecify:1.0.0")
// Test dependencies
testImplementation("org.apache.commons:commons-lang3:3.20.0")
@@ -103,9 +89,6 @@ dependencies {
testImplementation("org.ow2.asm:asm-tree:9.9.1")
mockitoAgent("org.mockito:mockito-core:5.22.0") { isTransitive = false } // configure mockito agent that is needed in newer java versions
testRuntimeOnly("org.junit.platform:junit-platform-launcher:6.0.3")
// checkstyle
checkstyle(project(":paper-checkstyle"))
}
val generatedDir: java.nio.file.Path = layout.projectDirectory.dir("src/generated/java").asFile.toPath()
@@ -204,25 +187,32 @@ tasks.withType<Javadoc>().configureEach {
options.use()
options.isDocFilesSubDirs = true
options.links(
"https://guava.dev/releases/33.6.0-jre/api/docs/",
"https://guava.dev/releases/33.5.0-jre/api/docs/",
"https://www.javadocs.dev/org.yaml/snakeyaml/2.2/",
"https://www.javadocs.dev/org.jetbrains/annotations/$annotationsVersion/",
"https://www.javadocs.dev/org.joml/joml/1.10.8/",
"https://www.javadocs.dev/com.google.code.gson/gson/2.14.0",
"https://www.javadocs.dev/com.google.code.gson/gson/2.13.2",
"https://jspecify.dev/docs/api/",
"https://jd.papermc.io/adventure/$adventureVersion/",
"https://jd.advntr.dev/api/$adventureVersion/",
"https://jd.advntr.dev/key/$adventureVersion/",
"https://jd.advntr.dev/text-minimessage/$adventureVersion/",
"https://jd.advntr.dev/text-serializer-gson/$adventureVersion/",
"https://jd.advntr.dev/text-serializer-legacy/$adventureVersion/",
"https://jd.advntr.dev/text-serializer-plain/$adventureVersion/",
"https://jd.advntr.dev/text-logger-slf4j/$adventureVersion/",
"https://www.javadocs.dev/org.slf4j/slf4j-api/$slf4jVersion/",
"https://logging.apache.org/log4j/2.x/javadoc/log4j-api/",
"https://www.javadocs.dev/org.apache.maven.resolver/maven-resolver-api/1.7.3",
)
options.tags(projectCustomJavadocTags.map { it.toOptionString() })
options.tags("apiNote:a:API Note:")
options.tags("implNote:a:Implementation Note:")
inputs.files(javadocSourcepath).ignoreEmptyDirectories().withPropertyName(javadocSourcepath.name + "-configuration")
val javadocSourcepathElements = javadocSourcepath.elements
inputs.files(apiAndDocs).ignoreEmptyDirectories().withPropertyName(apiAndDocs.name + "-configuration")
val apiAndDocsElements = apiAndDocs.elements
doFirst {
options.addStringOption(
"sourcepath",
javadocSourcepathElements.get().map { it.asFile }.joinToString(separator = File.pathSeparator, transform = File::getPath)
apiAndDocsElements.get().map { it.asFile }.joinToString(separator = File.pathSeparator, transform = File::getPath)
)
}
@@ -4,7 +4,6 @@ import com.destroystokyo.paper.entity.RangedEntity;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.entity.SchoolableFish;
import org.bukkit.NamespacedKey;
import org.bukkit.entity.AbstractCubeMob;
import org.bukkit.entity.AbstractHorse;
import org.bukkit.entity.AbstractSkeleton;
import org.bukkit.entity.AbstractVillager;
@@ -40,11 +39,11 @@ import org.bukkit.entity.Raider;
import org.bukkit.entity.Shulker;
import org.bukkit.entity.Silverfish;
import org.bukkit.entity.SkeletonHorse;
import org.bukkit.entity.Slime;
import org.bukkit.entity.Spellcaster;
import org.bukkit.entity.Spider;
import org.bukkit.entity.Squid;
import org.bukkit.entity.Strider;
import org.bukkit.entity.SulfurCube;
import org.bukkit.entity.Tameable;
import org.bukkit.entity.Turtle;
import org.bukkit.entity.Vex;
@@ -71,14 +70,6 @@ import org.jspecify.annotations.NullMarked;
@NullMarked
@GeneratedClass
public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<AbstractCubeMob> CUBE_MOB_ATTACK = create("cube_mob_attack", AbstractCubeMob.class);
GoalKey<AbstractCubeMob> CUBE_MOB_FLOAT = create("cube_mob_float", AbstractCubeMob.class);
GoalKey<AbstractCubeMob> CUBE_MOB_KEEP_ON_JUMPING = create("cube_mob_keep_on_jumping", AbstractCubeMob.class);
GoalKey<AbstractCubeMob> CUBE_MOB_RANDOM_DIRECTION = create("cube_mob_random_direction", AbstractCubeMob.class);
GoalKey<AbstractHorse> HORSE_MOUNT_PANIC = create("horse_mount_panic", AbstractHorse.class);
GoalKey<AbstractHorse> HORSE_RANDOM_STAND = create("horse_random_stand", AbstractHorse.class);
@@ -299,8 +290,6 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<Mob> RESET_UNIVERSAL_ANGER = create("reset_universal_anger", Mob.class);
GoalKey<Mob> SULFUR_CUBE_TEMPT = create("sulfur_cube_tempt", Mob.class);
GoalKey<Mob> TEMPT_FOR_NON_PATHFINDERS = create("tempt_for_non_pathfinders", Mob.class);
GoalKey<Mob> USE_ITEM = create("use_item", Mob.class);
@@ -395,6 +384,14 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<SkeletonHorse> SKELETON_HORSE_SKELETON_TRAP = create("skeleton_horse_skeleton_trap", SkeletonHorse.class);
GoalKey<Slime> SLIME_ATTACK = create("slime_attack", Slime.class);
GoalKey<Slime> SLIME_FLOAT = create("slime_float", Slime.class);
GoalKey<Slime> SLIME_KEEP_ON_JUMPING = create("slime_keep_on_jumping", Slime.class);
GoalKey<Slime> SLIME_RANDOM_DIRECTION = create("slime_random_direction", Slime.class);
GoalKey<Spellcaster> SPELLCASTER_CASTING_SPELL = create("spellcaster_casting_spell", Spellcaster.class);
GoalKey<Spider> SPIDER = create("spider", Spider.class);
@@ -407,8 +404,6 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<Strider> STRIDER_GO_TO_LAVA = create("strider_go_to_lava", Strider.class);
GoalKey<SulfurCube> SULFUR_CUBE_SEARCH_FOR_ITEMS = create("sulfur_cube_search_for_items", SulfurCube.class);
GoalKey<Tameable> FOLLOW_OWNER = create("follow_owner", Tameable.class);
GoalKey<Tameable> NON_TAME_RANDOM = create("non_tame_random", Tameable.class);
@@ -25,13 +25,6 @@ import org.jspecify.annotations.NullMarked;
@NullMarked
@GeneratedClass
public final class AttributeKeys {
/**
* {@code minecraft:air_drag_modifier}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> AIR_DRAG_MODIFIER = create(key("air_drag_modifier"));
/**
* {@code minecraft:armor}
*
@@ -67,13 +60,6 @@ public final class AttributeKeys {
*/
public static final TypedKey<Attribute> ATTACK_SPEED = create(key("attack_speed"));
/**
* {@code minecraft:below_name_distance}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> BELOW_NAME_DISTANCE = create(key("below_name_distance"));
/**
* {@code minecraft:block_break_speed}
*
@@ -88,13 +74,6 @@ public final class AttributeKeys {
*/
public static final TypedKey<Attribute> BLOCK_INTERACTION_RANGE = create(key("block_interaction_range"));
/**
* {@code minecraft:bounciness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> BOUNCINESS = create(key("bounciness"));
/**
* {@code minecraft:burning_time}
*
@@ -144,13 +123,6 @@ public final class AttributeKeys {
*/
public static final TypedKey<Attribute> FOLLOW_RANGE = create(key("follow_range"));
/**
* {@code minecraft:friction_modifier}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> FRICTION_MODIFIER = create(key("friction_modifier"));
/**
* {@code minecraft:gravity}
*
@@ -214,13 +186,6 @@ public final class AttributeKeys {
*/
public static final TypedKey<Attribute> MOVEMENT_SPEED = create(key("movement_speed"));
/**
* {@code minecraft:name_tag_distance}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Attribute> NAME_TAG_DISTANCE = create(key("name_tag_distance"));
/**
* {@code minecraft:oxygen_bonus}
*
@@ -396,13 +396,6 @@ public final class BiomeKeys {
*/
public static final TypedKey<Biome> STONY_SHORE = create(key("stony_shore"));
/**
* {@code minecraft:sulfur_caves}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Biome> SULFUR_CAVES = create(key("sulfur_caves"));
/**
* {@code minecraft:sunflower_plains}
*
@@ -1348,13 +1348,6 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> CHISELED_BOOKSHELF = create(key("chiseled_bookshelf"));
/**
* {@code minecraft:chiseled_cinnabar}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> CHISELED_CINNABAR = create(key("chiseled_cinnabar"));
/**
* {@code minecraft:chiseled_copper}
*
@@ -1418,13 +1411,6 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> CHISELED_STONE_BRICKS = create(key("chiseled_stone_bricks"));
/**
* {@code minecraft:chiseled_sulfur}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> CHISELED_SULFUR = create(key("chiseled_sulfur"));
/**
* {@code minecraft:chiseled_tuff}
*
@@ -1453,62 +1439,6 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> CHORUS_PLANT = create(key("chorus_plant"));
/**
* {@code minecraft:cinnabar}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> CINNABAR = create(key("cinnabar"));
/**
* {@code minecraft:cinnabar_brick_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> CINNABAR_BRICK_SLAB = create(key("cinnabar_brick_slab"));
/**
* {@code minecraft:cinnabar_brick_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> CINNABAR_BRICK_STAIRS = create(key("cinnabar_brick_stairs"));
/**
* {@code minecraft:cinnabar_brick_wall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> CINNABAR_BRICK_WALL = create(key("cinnabar_brick_wall"));
/**
* {@code minecraft:cinnabar_bricks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> CINNABAR_BRICKS = create(key("cinnabar_bricks"));
/**
* {@code minecraft:cinnabar_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> CINNABAR_SLAB = create(key("cinnabar_slab"));
/**
* {@code minecraft:cinnabar_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> CINNABAR_STAIRS = create(key("cinnabar_stairs"));
/**
* {@code minecraft:cinnabar_wall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> CINNABAR_WALL = create(key("cinnabar_wall"));
/**
* {@code minecraft:clay}
*
@@ -5345,34 +5275,6 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> POLISHED_BLACKSTONE_WALL = create(key("polished_blackstone_wall"));
/**
* {@code minecraft:polished_cinnabar}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> POLISHED_CINNABAR = create(key("polished_cinnabar"));
/**
* {@code minecraft:polished_cinnabar_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> POLISHED_CINNABAR_SLAB = create(key("polished_cinnabar_slab"));
/**
* {@code minecraft:polished_cinnabar_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> POLISHED_CINNABAR_STAIRS = create(key("polished_cinnabar_stairs"));
/**
* {@code minecraft:polished_cinnabar_wall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> POLISHED_CINNABAR_WALL = create(key("polished_cinnabar_wall"));
/**
* {@code minecraft:polished_deepslate}
*
@@ -5443,34 +5345,6 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> POLISHED_GRANITE_STAIRS = create(key("polished_granite_stairs"));
/**
* {@code minecraft:polished_sulfur}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> POLISHED_SULFUR = create(key("polished_sulfur"));
/**
* {@code minecraft:polished_sulfur_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> POLISHED_SULFUR_SLAB = create(key("polished_sulfur_slab"));
/**
* {@code minecraft:polished_sulfur_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> POLISHED_SULFUR_STAIRS = create(key("polished_sulfur_stairs"));
/**
* {@code minecraft:polished_sulfur_wall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> POLISHED_SULFUR_WALL = create(key("polished_sulfur_wall"));
/**
* {@code minecraft:polished_tuff}
*
@@ -5513,13 +5387,6 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> POTATOES = create(key("potatoes"));
/**
* {@code minecraft:potent_sulfur}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> POTENT_SULFUR = create(key("potent_sulfur"));
/**
* {@code minecraft:potted_acacia_sapling}
*
@@ -7102,69 +6969,6 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> SUGAR_CANE = create(key("sugar_cane"));
/**
* {@code minecraft:sulfur}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> SULFUR = create(key("sulfur"));
/**
* {@code minecraft:sulfur_brick_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> SULFUR_BRICK_SLAB = create(key("sulfur_brick_slab"));
/**
* {@code minecraft:sulfur_brick_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> SULFUR_BRICK_STAIRS = create(key("sulfur_brick_stairs"));
/**
* {@code minecraft:sulfur_brick_wall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> SULFUR_BRICK_WALL = create(key("sulfur_brick_wall"));
/**
* {@code minecraft:sulfur_bricks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> SULFUR_BRICKS = create(key("sulfur_bricks"));
/**
* {@code minecraft:sulfur_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> SULFUR_SLAB = create(key("sulfur_slab"));
/**
* {@code minecraft:sulfur_spike}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> SULFUR_SPIKE = create(key("sulfur_spike"));
/**
* {@code minecraft:sulfur_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> SULFUR_STAIRS = create(key("sulfur_stairs"));
/**
* {@code minecraft:sulfur_wall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> SULFUR_WALL = create(key("sulfur_wall"));
/**
* {@code minecraft:sunflower}
*
@@ -319,13 +319,6 @@ public final class DamageTypeKeys {
*/
public static final TypedKey<DamageType> STING = create(key("sting"));
/**
* {@code minecraft:sulfur_cube_hot}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DamageType> SULFUR_CUBE_HOT = create(key("sulfur_cube_hot"));
/**
* {@code minecraft:sweet_berry_bush}
*
@@ -648,13 +648,6 @@ public final class DataComponentTypeKeys {
*/
public static final TypedKey<DataComponentType> STORED_ENCHANTMENTS = create(key("stored_enchantments"));
/**
* {@code minecraft:sulfur_cube_content}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> SULFUR_CUBE_CONTENT = create(key("sulfur_cube_content"));
/**
* {@code minecraft:suspicious_stew_effects}
*
@@ -88,13 +88,6 @@ public final class GameEventKeys {
*/
public static final TypedKey<GameEvent> BLOCK_PLACE = create(key("block_place"));
/**
* {@code minecraft:bounce}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<GameEvent> BOUNCE = create(key("bounce"));
/**
* {@code minecraft:container_close}
*
@@ -1670,13 +1670,6 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> CHISELED_BOOKSHELF = create(key("chiseled_bookshelf"));
/**
* {@code minecraft:chiseled_cinnabar}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> CHISELED_CINNABAR = create(key("chiseled_cinnabar"));
/**
* {@code minecraft:chiseled_copper}
*
@@ -1740,13 +1733,6 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> CHISELED_STONE_BRICKS = create(key("chiseled_stone_bricks"));
/**
* {@code minecraft:chiseled_sulfur}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> CHISELED_SULFUR = create(key("chiseled_sulfur"));
/**
* {@code minecraft:chiseled_tuff}
*
@@ -1782,62 +1768,6 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> CHORUS_PLANT = create(key("chorus_plant"));
/**
* {@code minecraft:cinnabar}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> CINNABAR = create(key("cinnabar"));
/**
* {@code minecraft:cinnabar_brick_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> CINNABAR_BRICK_SLAB = create(key("cinnabar_brick_slab"));
/**
* {@code minecraft:cinnabar_brick_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> CINNABAR_BRICK_STAIRS = create(key("cinnabar_brick_stairs"));
/**
* {@code minecraft:cinnabar_brick_wall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> CINNABAR_BRICK_WALL = create(key("cinnabar_brick_wall"));
/**
* {@code minecraft:cinnabar_bricks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> CINNABAR_BRICKS = create(key("cinnabar_bricks"));
/**
* {@code minecraft:cinnabar_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> CINNABAR_SLAB = create(key("cinnabar_slab"));
/**
* {@code minecraft:cinnabar_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> CINNABAR_STAIRS = create(key("cinnabar_stairs"));
/**
* {@code minecraft:cinnabar_wall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> CINNABAR_WALL = create(key("cinnabar_wall"));
/**
* {@code minecraft:clay}
*
@@ -5933,13 +5863,6 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> MUSIC_DISC_BLOCKS = create(key("music_disc_blocks"));
/**
* {@code minecraft:music_disc_bounce}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> MUSIC_DISC_BOUNCE = create(key("music_disc_bounce"));
/**
* {@code minecraft:music_disc_cat}
*
@@ -7256,34 +7179,6 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> POLISHED_BLACKSTONE_WALL = create(key("polished_blackstone_wall"));
/**
* {@code minecraft:polished_cinnabar}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> POLISHED_CINNABAR = create(key("polished_cinnabar"));
/**
* {@code minecraft:polished_cinnabar_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> POLISHED_CINNABAR_SLAB = create(key("polished_cinnabar_slab"));
/**
* {@code minecraft:polished_cinnabar_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> POLISHED_CINNABAR_STAIRS = create(key("polished_cinnabar_stairs"));
/**
* {@code minecraft:polished_cinnabar_wall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> POLISHED_CINNABAR_WALL = create(key("polished_cinnabar_wall"));
/**
* {@code minecraft:polished_deepslate}
*
@@ -7354,34 +7249,6 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> POLISHED_GRANITE_STAIRS = create(key("polished_granite_stairs"));
/**
* {@code minecraft:polished_sulfur}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> POLISHED_SULFUR = create(key("polished_sulfur"));
/**
* {@code minecraft:polished_sulfur_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> POLISHED_SULFUR_SLAB = create(key("polished_sulfur_slab"));
/**
* {@code minecraft:polished_sulfur_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> POLISHED_SULFUR_STAIRS = create(key("polished_sulfur_stairs"));
/**
* {@code minecraft:polished_sulfur_wall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> POLISHED_SULFUR_WALL = create(key("polished_sulfur_wall"));
/**
* {@code minecraft:polished_tuff}
*
@@ -7438,13 +7305,6 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> POTATO = create(key("potato"));
/**
* {@code minecraft:potent_sulfur}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> POTENT_SULFUR = create(key("potent_sulfur"));
/**
* {@code minecraft:potion}
*
@@ -9216,83 +9076,6 @@ public final class ItemTypeKeys {
*/
public static final TypedKey<ItemType> SUGAR_CANE = create(key("sugar_cane"));
/**
* {@code minecraft:sulfur}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> SULFUR = create(key("sulfur"));
/**
* {@code minecraft:sulfur_brick_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> SULFUR_BRICK_SLAB = create(key("sulfur_brick_slab"));
/**
* {@code minecraft:sulfur_brick_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> SULFUR_BRICK_STAIRS = create(key("sulfur_brick_stairs"));
/**
* {@code minecraft:sulfur_brick_wall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> SULFUR_BRICK_WALL = create(key("sulfur_brick_wall"));
/**
* {@code minecraft:sulfur_bricks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> SULFUR_BRICKS = create(key("sulfur_bricks"));
/**
* {@code minecraft:sulfur_cube_bucket}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> SULFUR_CUBE_BUCKET = create(key("sulfur_cube_bucket"));
/**
* {@code minecraft:sulfur_cube_spawn_egg}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> SULFUR_CUBE_SPAWN_EGG = create(key("sulfur_cube_spawn_egg"));
/**
* {@code minecraft:sulfur_slab}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> SULFUR_SLAB = create(key("sulfur_slab"));
/**
* {@code minecraft:sulfur_spike}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> SULFUR_SPIKE = create(key("sulfur_spike"));
/**
* {@code minecraft:sulfur_stairs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> SULFUR_STAIRS = create(key("sulfur_stairs"));
/**
* {@code minecraft:sulfur_wall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<ItemType> SULFUR_WALL = create(key("sulfur_wall"));
/**
* {@code minecraft:sunflower}
*
@@ -53,13 +53,6 @@ public final class JukeboxSongKeys {
*/
public static final TypedKey<JukeboxSong> BLOCKS = create(key("blocks"));
/**
* {@code minecraft:bounce}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> BOUNCE = create(key("bounce"));
/**
* {@code minecraft:cat}
*
@@ -1,181 +0,0 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.entity.poi.PoiType;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#POINT_OF_INTEREST_TYPE}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@NullMarked
@GeneratedClass
public final class PoiTypeKeys {
/**
* {@code minecraft:armorer}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> ARMORER = create(key("armorer"));
/**
* {@code minecraft:bee_nest}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> BEE_NEST = create(key("bee_nest"));
/**
* {@code minecraft:beehive}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> BEEHIVE = create(key("beehive"));
/**
* {@code minecraft:butcher}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> BUTCHER = create(key("butcher"));
/**
* {@code minecraft:cartographer}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> CARTOGRAPHER = create(key("cartographer"));
/**
* {@code minecraft:cleric}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> CLERIC = create(key("cleric"));
/**
* {@code minecraft:farmer}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> FARMER = create(key("farmer"));
/**
* {@code minecraft:fisherman}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> FISHERMAN = create(key("fisherman"));
/**
* {@code minecraft:fletcher}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> FLETCHER = create(key("fletcher"));
/**
* {@code minecraft:home}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> HOME = create(key("home"));
/**
* {@code minecraft:leatherworker}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> LEATHERWORKER = create(key("leatherworker"));
/**
* {@code minecraft:librarian}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> LIBRARIAN = create(key("librarian"));
/**
* {@code minecraft:lightning_rod}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> LIGHTNING_ROD = create(key("lightning_rod"));
/**
* {@code minecraft:lodestone}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> LODESTONE = create(key("lodestone"));
/**
* {@code minecraft:mason}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> MASON = create(key("mason"));
/**
* {@code minecraft:meeting}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> MEETING = create(key("meeting"));
/**
* {@code minecraft:nether_portal}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> NETHER_PORTAL = create(key("nether_portal"));
/**
* {@code minecraft:shepherd}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> SHEPHERD = create(key("shepherd"));
/**
* {@code minecraft:test_instance}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> TEST_INSTANCE = create(key("test_instance"));
/**
* {@code minecraft:toolsmith}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> TOOLSMITH = create(key("toolsmith"));
/**
* {@code minecraft:weaponsmith}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PoiType> WEAPONSMITH = create(key("weaponsmith"));
private PoiTypeKeys() {
}
private static TypedKey<PoiType> create(final Key key) {
return TypedKey.create(RegistryKey.POINT_OF_INTEREST_TYPE, key);
}
}
@@ -1376,41 +1376,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> BLOCK_CHORUS_FLOWER_GROW = create(key("block.chorus_flower.grow"));
/**
* {@code minecraft:block.cinnabar.break}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_CINNABAR_BREAK = create(key("block.cinnabar.break"));
/**
* {@code minecraft:block.cinnabar.fall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_CINNABAR_FALL = create(key("block.cinnabar.fall"));
/**
* {@code minecraft:block.cinnabar.hit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_CINNABAR_HIT = create(key("block.cinnabar.hit"));
/**
* {@code minecraft:block.cinnabar.place}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_CINNABAR_PLACE = create(key("block.cinnabar.place"));
/**
* {@code minecraft:block.cinnabar.step}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_CINNABAR_STEP = create(key("block.cinnabar.step"));
/**
* {@code minecraft:block.cobweb.break}
*
@@ -4064,76 +4029,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> BLOCK_PORTAL_TRIGGER = create(key("block.portal.trigger"));
/**
* {@code minecraft:block.potent_sulfur.break}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_POTENT_SULFUR_BREAK = create(key("block.potent_sulfur.break"));
/**
* {@code minecraft:block.potent_sulfur.fall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_POTENT_SULFUR_FALL = create(key("block.potent_sulfur.fall"));
/**
* {@code minecraft:block.potent_sulfur.geyser_continuous_eruption}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_POTENT_SULFUR_GEYSER_CONTINUOUS_ERUPTION = create(key("block.potent_sulfur.geyser_continuous_eruption"));
/**
* {@code minecraft:block.potent_sulfur.geyser_continuous_eruption_active}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_POTENT_SULFUR_GEYSER_CONTINUOUS_ERUPTION_ACTIVE = create(key("block.potent_sulfur.geyser_continuous_eruption_active"));
/**
* {@code minecraft:block.potent_sulfur.geyser_eruption}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_POTENT_SULFUR_GEYSER_ERUPTION = create(key("block.potent_sulfur.geyser_eruption"));
/**
* {@code minecraft:block.potent_sulfur.geyser_eruption_active}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_POTENT_SULFUR_GEYSER_ERUPTION_ACTIVE = create(key("block.potent_sulfur.geyser_eruption_active"));
/**
* {@code minecraft:block.potent_sulfur.hit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_POTENT_SULFUR_HIT = create(key("block.potent_sulfur.hit"));
/**
* {@code minecraft:block.potent_sulfur.noxious_gas}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_POTENT_SULFUR_NOXIOUS_GAS = create(key("block.potent_sulfur.noxious_gas"));
/**
* {@code minecraft:block.potent_sulfur.place}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_POTENT_SULFUR_PLACE = create(key("block.potent_sulfur.place"));
/**
* {@code minecraft:block.potent_sulfur.step}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_POTENT_SULFUR_STEP = create(key("block.potent_sulfur.step"));
/**
* {@code minecraft:block.powder_snow.break}
*
@@ -5205,83 +5100,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> BLOCK_STONE_PRESSURE_PLATE_CLICK_ON = create(key("block.stone_pressure_plate.click_on"));
/**
* {@code minecraft:block.sulfur.break}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_SULFUR_BREAK = create(key("block.sulfur.break"));
/**
* {@code minecraft:block.sulfur.fall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_SULFUR_FALL = create(key("block.sulfur.fall"));
/**
* {@code minecraft:block.sulfur.hit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_SULFUR_HIT = create(key("block.sulfur.hit"));
/**
* {@code minecraft:block.sulfur.place}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_SULFUR_PLACE = create(key("block.sulfur.place"));
/**
* {@code minecraft:block.sulfur.step}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_SULFUR_STEP = create(key("block.sulfur.step"));
/**
* {@code minecraft:block.sulfur_spike.break}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_SULFUR_SPIKE_BREAK = create(key("block.sulfur_spike.break"));
/**
* {@code minecraft:block.sulfur_spike.fall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_SULFUR_SPIKE_FALL = create(key("block.sulfur_spike.fall"));
/**
* {@code minecraft:block.sulfur_spike.hit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_SULFUR_SPIKE_HIT = create(key("block.sulfur_spike.hit"));
/**
* {@code minecraft:block.sulfur_spike.land}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_SULFUR_SPIKE_LAND = create(key("block.sulfur_spike.land"));
/**
* {@code minecraft:block.sulfur_spike.place}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_SULFUR_SPIKE_PLACE = create(key("block.sulfur_spike.place"));
/**
* {@code minecraft:block.sulfur_spike.step}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_SULFUR_SPIKE_STEP = create(key("block.sulfur_spike.step"));
/**
* {@code minecraft:block.suspicious_gravel.break}
*
@@ -10644,41 +10462,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_SLIME_SQUISH_SMALL = create(key("entity.slime.squish_small"));
/**
* {@code minecraft:entity.small_sulfur_cube.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SMALL_SULFUR_CUBE_DEATH = create(key("entity.small_sulfur_cube.death"));
/**
* {@code minecraft:entity.small_sulfur_cube.eat}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SMALL_SULFUR_CUBE_EAT = create(key("entity.small_sulfur_cube.eat"));
/**
* {@code minecraft:entity.small_sulfur_cube.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SMALL_SULFUR_CUBE_HURT = create(key("entity.small_sulfur_cube.hurt"));
/**
* {@code minecraft:entity.small_sulfur_cube.jump}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SMALL_SULFUR_CUBE_JUMP = create(key("entity.small_sulfur_cube.jump"));
/**
* {@code minecraft:entity.small_sulfur_cube.squish}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SMALL_SULFUR_CUBE_SQUISH = create(key("entity.small_sulfur_cube.squish"));
/**
* {@code minecraft:entity.sniffer.death}
*
@@ -10966,223 +10749,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_STRIDER_STEP_LAVA = create(key("entity.strider.step_lava"));
/**
* {@code minecraft:entity.sulfur_cube.absorb}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_ABSORB = create(key("entity.sulfur_cube.absorb"));
/**
* {@code minecraft:entity.sulfur_cube.bounce}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_BOUNCE = create(key("entity.sulfur_cube.bounce"));
/**
* {@code minecraft:entity.sulfur_cube.bouncy.hit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_BOUNCY_HIT = create(key("entity.sulfur_cube.bouncy.hit"));
/**
* {@code minecraft:entity.sulfur_cube.bouncy.push}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_BOUNCY_PUSH = create(key("entity.sulfur_cube.bouncy.push"));
/**
* {@code minecraft:entity.sulfur_cube.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_DEATH = create(key("entity.sulfur_cube.death"));
/**
* {@code minecraft:entity.sulfur_cube.eject}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_EJECT = create(key("entity.sulfur_cube.eject"));
/**
* {@code minecraft:entity.sulfur_cube.explosive.hit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_EXPLOSIVE_HIT = create(key("entity.sulfur_cube.explosive.hit"));
/**
* {@code minecraft:entity.sulfur_cube.explosive.push}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_EXPLOSIVE_PUSH = create(key("entity.sulfur_cube.explosive.push"));
/**
* {@code minecraft:entity.sulfur_cube.fast_flat.hit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_FAST_FLAT_HIT = create(key("entity.sulfur_cube.fast_flat.hit"));
/**
* {@code minecraft:entity.sulfur_cube.fast_flat.push}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_FAST_FLAT_PUSH = create(key("entity.sulfur_cube.fast_flat.push"));
/**
* {@code minecraft:entity.sulfur_cube.fast_sliding.hit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_FAST_SLIDING_HIT = create(key("entity.sulfur_cube.fast_sliding.hit"));
/**
* {@code minecraft:entity.sulfur_cube.fast_sliding.push}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_FAST_SLIDING_PUSH = create(key("entity.sulfur_cube.fast_sliding.push"));
/**
* {@code minecraft:entity.sulfur_cube.high_resistance.hit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_HIGH_RESISTANCE_HIT = create(key("entity.sulfur_cube.high_resistance.hit"));
/**
* {@code minecraft:entity.sulfur_cube.high_resistance.push}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_HIGH_RESISTANCE_PUSH = create(key("entity.sulfur_cube.high_resistance.push"));
/**
* {@code minecraft:entity.sulfur_cube.hot.hit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_HOT_HIT = create(key("entity.sulfur_cube.hot.hit"));
/**
* {@code minecraft:entity.sulfur_cube.hot.push}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_HOT_PUSH = create(key("entity.sulfur_cube.hot.push"));
/**
* {@code minecraft:entity.sulfur_cube.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_HURT = create(key("entity.sulfur_cube.hurt"));
/**
* {@code minecraft:entity.sulfur_cube.jump}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_JUMP = create(key("entity.sulfur_cube.jump"));
/**
* {@code minecraft:entity.sulfur_cube.light.hit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_LIGHT_HIT = create(key("entity.sulfur_cube.light.hit"));
/**
* {@code minecraft:entity.sulfur_cube.light.push}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_LIGHT_PUSH = create(key("entity.sulfur_cube.light.push"));
/**
* {@code minecraft:entity.sulfur_cube.regular.hit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_REGULAR_HIT = create(key("entity.sulfur_cube.regular.hit"));
/**
* {@code minecraft:entity.sulfur_cube.regular.push}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_REGULAR_PUSH = create(key("entity.sulfur_cube.regular.push"));
/**
* {@code minecraft:entity.sulfur_cube.slow_bouncy.hit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_SLOW_BOUNCY_HIT = create(key("entity.sulfur_cube.slow_bouncy.hit"));
/**
* {@code minecraft:entity.sulfur_cube.slow_bouncy.push}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_SLOW_BOUNCY_PUSH = create(key("entity.sulfur_cube.slow_bouncy.push"));
/**
* {@code minecraft:entity.sulfur_cube.slow_flat.hit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_SLOW_FLAT_HIT = create(key("entity.sulfur_cube.slow_flat.hit"));
/**
* {@code minecraft:entity.sulfur_cube.slow_flat.push}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_SLOW_FLAT_PUSH = create(key("entity.sulfur_cube.slow_flat.push"));
/**
* {@code minecraft:entity.sulfur_cube.slow_sliding.hit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_SLOW_SLIDING_HIT = create(key("entity.sulfur_cube.slow_sliding.hit"));
/**
* {@code minecraft:entity.sulfur_cube.slow_sliding.push}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_SLOW_SLIDING_PUSH = create(key("entity.sulfur_cube.slow_sliding.push"));
/**
* {@code minecraft:entity.sulfur_cube.squish}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_SQUISH = create(key("entity.sulfur_cube.squish"));
/**
* {@code minecraft:entity.sulfur_cube.sticky.hit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_STICKY_HIT = create(key("entity.sulfur_cube.sticky.hit"));
/**
* {@code minecraft:entity.sulfur_cube.sticky.push}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_SULFUR_CUBE_STICKY_PUSH = create(key("entity.sulfur_cube.sticky.push"));
/**
* {@code minecraft:entity.tadpole.death}
*
@@ -12737,13 +12303,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ITEM_BUCKET_EMPTY_POWDER_SNOW = create(key("item.bucket.empty_powder_snow"));
/**
* {@code minecraft:item.bucket.empty_sulfur_cube}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_BUCKET_EMPTY_SULFUR_CUBE = create(key("item.bucket.empty_sulfur_cube"));
/**
* {@code minecraft:item.bucket.empty_tadpole}
*
@@ -12786,13 +12345,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ITEM_BUCKET_FILL_POWDER_SNOW = create(key("item.bucket.fill_powder_snow"));
/**
* {@code minecraft:item.bucket.fill_sulfur_cube}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ITEM_BUCKET_FILL_SULFUR_CUBE = create(key("item.bucket.fill_sulfur_cube"));
/**
* {@code minecraft:item.bucket.fill_tadpole}
*
@@ -13528,13 +13080,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> MUSIC_OVERWORLD_STONY_PEAKS = create(key("music.overworld.stony_peaks"));
/**
* {@code minecraft:music.overworld.sulfur_caves}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> MUSIC_OVERWORLD_SULFUR_CAVES = create(key("music.overworld.sulfur_caves"));
/**
* {@code minecraft:music.overworld.swamp}
*
@@ -13577,13 +13122,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> MUSIC_DISC_BLOCKS = create(key("music_disc.blocks"));
/**
* {@code minecraft:music_disc.bounce}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> MUSIC_DISC_BOUNCE = create(key("music_disc.bounce"));
/**
* {@code minecraft:music_disc.cat}
*
@@ -1,124 +0,0 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.entity.SulfurCube;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#SULFUR_CUBE_ARCHETYPE}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@NullMarked
@GeneratedClass
public final class SulfurCubeArchetypeKeys {
/**
* {@code minecraft:bouncy}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<SulfurCube.Archetype> BOUNCY = create(key("bouncy"));
/**
* {@code minecraft:explosive}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<SulfurCube.Archetype> EXPLOSIVE = create(key("explosive"));
/**
* {@code minecraft:fast_flat}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<SulfurCube.Archetype> FAST_FLAT = create(key("fast_flat"));
/**
* {@code minecraft:fast_sliding}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<SulfurCube.Archetype> FAST_SLIDING = create(key("fast_sliding"));
/**
* {@code minecraft:high_resistance}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<SulfurCube.Archetype> HIGH_RESISTANCE = create(key("high_resistance"));
/**
* {@code minecraft:hot}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<SulfurCube.Archetype> HOT = create(key("hot"));
/**
* {@code minecraft:light}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<SulfurCube.Archetype> LIGHT = create(key("light"));
/**
* {@code minecraft:regular}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<SulfurCube.Archetype> REGULAR = create(key("regular"));
/**
* {@code minecraft:slow_bouncy}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<SulfurCube.Archetype> SLOW_BOUNCY = create(key("slow_bouncy"));
/**
* {@code minecraft:slow_flat}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<SulfurCube.Archetype> SLOW_FLAT = create(key("slow_flat"));
/**
* {@code minecraft:slow_sliding}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<SulfurCube.Archetype> SLOW_SLIDING = create(key("slow_sliding"));
/**
* {@code minecraft:sticky}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<SulfurCube.Archetype> STICKY = create(key("sticky"));
private SulfurCubeArchetypeKeys() {
}
/**
* Creates a typed key for {@link SulfurCube.Archetype} in the registry {@code minecraft:sulfur_cube_archetype}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<SulfurCube.Archetype> create(final Key key) {
return TypedKey.create(RegistryKey.SULFUR_CUBE_ARCHETYPE, key);
}
}
@@ -0,0 +1,68 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import io.papermc.paper.world.Timeline;
import net.kyori.adventure.key.Key;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#TIMELINE}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@NullMarked
@GeneratedClass
public final class TimelineKeys {
/**
* {@code minecraft:day}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Timeline> DAY = create(key("day"));
/**
* {@code minecraft:early_game}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Timeline> EARLY_GAME = create(key("early_game"));
/**
* {@code minecraft:moon}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Timeline> MOON = create(key("moon"));
/**
* {@code minecraft:villager_schedule}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Timeline> VILLAGER_SCHEDULE = create(key("villager_schedule"));
private TimelineKeys() {
}
/**
* Creates a typed key for {@link Timeline} in the registry {@code minecraft:timeline}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<Timeline> create(final Key key) {
return TypedKey.create(RegistryKey.TIMELINE, key);
}
}
@@ -0,0 +1,54 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import io.papermc.paper.world.WorldClock;
import net.kyori.adventure.key.Key;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#WORLD_CLOCK}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@NullMarked
@GeneratedClass
public final class WorldClockKeys {
/**
* {@code minecraft:overworld}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<WorldClock> OVERWORLD = create(key("overworld"));
/**
* {@code minecraft:the_end}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<WorldClock> THE_END = create(key("the_end"));
private WorldClockKeys() {
}
/**
* Creates a typed key for {@link WorldClock} in the registry {@code minecraft:world_clock}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<WorldClock> create(final Key key) {
return TypedKey.create(RegistryKey.WORLD_CLOCK, key);
}
}
@@ -298,20 +298,6 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> CAULDRONS = create(key("cauldrons"));
/**
* {@code #minecraft:causes_continuous_geyser_eruptions}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> CAUSES_CONTINUOUS_GEYSER_ERUPTIONS = create(key("causes_continuous_geyser_eruptions"));
/**
* {@code #minecraft:causes_periodic_geyser_eruptions}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> CAUSES_PERIODIC_GEYSER_ERUPTIONS = create(key("causes_periodic_geyser_eruptions"));
/**
* {@code #minecraft:cave_vines}
*
@@ -369,18 +355,11 @@ public final class BlockTypeTagKeys {
public static final TagKey<BlockType> COMPLETES_FIND_TREE_TUTORIAL = create(key("completes_find_tree_tutorial"));
/**
* {@code #minecraft:concrete}
* {@code #minecraft:concrete_powder}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> CONCRETE = create(key("concrete"));
/**
* {@code #minecraft:concrete_powders}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> CONCRETE_POWDERS = create(key("concrete_powders"));
public static final TagKey<BlockType> CONCRETE_POWDER = create(key("concrete_powder"));
/**
* {@code #minecraft:convertable_to_mud}
@@ -480,13 +459,6 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> DEEPSLATE_ORE_REPLACEABLES = create(key("deepslate_ore_replaceables"));
/**
* {@code #minecraft:default_immune_to}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> DEFAULT_IMMUNE_TO = create(key("default_immune_to"));
/**
* {@code #minecraft:diamond_ores}
*
@@ -641,13 +613,6 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> FOREST_ROCK_CAN_PLACE_ON = create(key("forest_rock_can_place_on"));
/**
* {@code #minecraft:fox_immune_to}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> FOX_IMMUNE_TO = create(key("fox_immune_to"));
/**
* {@code #minecraft:foxes_spawnable_on}
*
@@ -676,13 +641,6 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> GEODE_INVALID_BLOCKS = create(key("geode_invalid_blocks"));
/**
* {@code #minecraft:glazed_terracotta}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> GLAZED_TERRACOTTA = create(key("glazed_terracotta"));
/**
* {@code #minecraft:goats_spawnable_on}
*
@@ -1110,13 +1068,6 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> PLANKS = create(key("planks"));
/**
* {@code #minecraft:polar_bear_immune_to}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> POLAR_BEAR_IMMUNE_TO = create(key("polar_bear_immune_to"));
/**
* {@code #minecraft:polar_bears_spawnable_on_alternate}
*
@@ -1222,27 +1173,6 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> SCULK_REPLACEABLE_WORLD_GEN = create(key("sculk_replaceable_world_gen"));
/**
* {@code #minecraft:shears_extreme_breaking_speed}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SHEARS_EXTREME_BREAKING_SPEED = create(key("shears_extreme_breaking_speed"));
/**
* {@code #minecraft:shears_major_breaking_speed}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SHEARS_MAJOR_BREAKING_SPEED = create(key("shears_major_breaking_speed"));
/**
* {@code #minecraft:shears_minor_breaking_speed}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SHEARS_MINOR_BREAKING_SPEED = create(key("shears_minor_breaking_speed"));
/**
* {@code #minecraft:shulker_boxes}
*
@@ -1306,13 +1236,6 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> SNOW = create(key("snow"));
/**
* {@code #minecraft:snow_golem_immune_to}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SNOW_GOLEM_IMMUNE_TO = create(key("snow_golem_immune_to"));
/**
* {@code #minecraft:soul_fire_base_blocks}
*
@@ -1327,13 +1250,6 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> SOUL_SPEED_BLOCKS = create(key("soul_speed_blocks"));
/**
* {@code #minecraft:speleothems}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SPELEOTHEMS = create(key("speleothems"));
/**
* {@code #minecraft:spruce_logs}
*
@@ -1383,13 +1299,6 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> STONE_PRESSURE_PLATES = create(key("stone_pressure_plates"));
/**
* {@code #minecraft:stray_immune_to}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> STRAY_IMMUNE_TO = create(key("stray_immune_to"));
/**
* {@code #minecraft:strider_warm_blocks}
*
@@ -1404,13 +1313,6 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> SUBSTRATE_OVERWORLD = create(key("substrate_overworld"));
/**
* {@code #minecraft:sulfur_spike_replaceable_blocks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SULFUR_SPIKE_REPLACEABLE_BLOCKS = create(key("sulfur_spike_replaceable_blocks"));
/**
* {@code #minecraft:support_override_cactus_flower}
*
@@ -1635,13 +1537,6 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> SUPPORTS_WITHER_ROSE = create(key("supports_wither_rose"));
/**
* {@code #minecraft:suppresses_bounce}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SUPPRESSES_BOUNCE = create(key("suppresses_bounce"));
/**
* {@code #minecraft:sword_efficient}
*
@@ -1782,20 +1677,6 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> WITHER_IMMUNE = create(key("wither_immune"));
/**
* {@code #minecraft:wither_immune_to}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> WITHER_IMMUNE_TO = create(key("wither_immune_to"));
/**
* {@code #minecraft:wither_skeleton_immune_to}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> WITHER_SKELETON_IMMUNE_TO = create(key("wither_skeleton_immune_to"));
/**
* {@code #minecraft:wither_summon_base_blocks}
*
@@ -242,13 +242,6 @@ public final class DamageTypeTagKeys {
*/
public static final TagKey<DamageType> PANIC_ENVIRONMENTAL_CAUSES = create(key("panic_environmental_causes"));
/**
* {@code #minecraft:sulfur_cube_with_block_immune_to}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<DamageType> SULFUR_CUBE_WITH_BLOCK_IMMUNE_TO = create(key("sulfur_cube_with_block_immune_to"));
/**
* {@code #minecraft:witch_resistant_to}
*
@@ -277,13 +277,6 @@ public final class EntityTypeTagKeys {
*/
public static final TagKey<EntityType> NON_CONTROLLING_RIDER = create(key("non_controlling_rider"));
/**
* {@code #minecraft:not_affected_by_geysers}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<EntityType> NOT_AFFECTED_BY_GEYSERS = create(key("not_affected_by_geysers"));
/**
* {@code #minecraft:not_scary_for_pufferfish}
*
@@ -277,20 +277,6 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> COMPLETES_FIND_TREE_TUTORIAL = create(key("completes_find_tree_tutorial"));
/**
* {@code #minecraft:concrete}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> CONCRETE = create(key("concrete"));
/**
* {@code #minecraft:concrete_powders}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> CONCRETE_POWDERS = create(key("concrete_powders"));
/**
* {@code #minecraft:copper}
*
@@ -662,13 +648,6 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> GAZE_DISGUISE_EQUIPMENT = create(key("gaze_disguise_equipment"));
/**
* {@code #minecraft:glazed_terracotta}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> GLAZED_TERRACOTTA = create(key("glazed_terracotta"));
/**
* {@code #minecraft:goat_food}
*
@@ -1313,104 +1292,6 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> STRIDER_TEMPT_ITEMS = create(key("strider_tempt_items"));
/**
* {@code #minecraft:sulfur_cube_archetype/bouncy}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> SULFUR_CUBE_ARCHETYPE_BOUNCY = create(key("sulfur_cube_archetype/bouncy"));
/**
* {@code #minecraft:sulfur_cube_archetype/explosive}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> SULFUR_CUBE_ARCHETYPE_EXPLOSIVE = create(key("sulfur_cube_archetype/explosive"));
/**
* {@code #minecraft:sulfur_cube_archetype/fast_flat}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> SULFUR_CUBE_ARCHETYPE_FAST_FLAT = create(key("sulfur_cube_archetype/fast_flat"));
/**
* {@code #minecraft:sulfur_cube_archetype/fast_sliding}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> SULFUR_CUBE_ARCHETYPE_FAST_SLIDING = create(key("sulfur_cube_archetype/fast_sliding"));
/**
* {@code #minecraft:sulfur_cube_archetype/high_resistance}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> SULFUR_CUBE_ARCHETYPE_HIGH_RESISTANCE = create(key("sulfur_cube_archetype/high_resistance"));
/**
* {@code #minecraft:sulfur_cube_archetype/hot}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> SULFUR_CUBE_ARCHETYPE_HOT = create(key("sulfur_cube_archetype/hot"));
/**
* {@code #minecraft:sulfur_cube_archetype/light}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> SULFUR_CUBE_ARCHETYPE_LIGHT = create(key("sulfur_cube_archetype/light"));
/**
* {@code #minecraft:sulfur_cube_archetype/regular}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> SULFUR_CUBE_ARCHETYPE_REGULAR = create(key("sulfur_cube_archetype/regular"));
/**
* {@code #minecraft:sulfur_cube_archetype/slow_bouncy}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> SULFUR_CUBE_ARCHETYPE_SLOW_BOUNCY = create(key("sulfur_cube_archetype/slow_bouncy"));
/**
* {@code #minecraft:sulfur_cube_archetype/slow_flat}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> SULFUR_CUBE_ARCHETYPE_SLOW_FLAT = create(key("sulfur_cube_archetype/slow_flat"));
/**
* {@code #minecraft:sulfur_cube_archetype/slow_sliding}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> SULFUR_CUBE_ARCHETYPE_SLOW_SLIDING = create(key("sulfur_cube_archetype/slow_sliding"));
/**
* {@code #minecraft:sulfur_cube_archetype/sticky}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> SULFUR_CUBE_ARCHETYPE_STICKY = create(key("sulfur_cube_archetype/sticky"));
/**
* {@code #minecraft:sulfur_cube_food}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> SULFUR_CUBE_FOOD = create(key("sulfur_cube_food"));
/**
* {@code #minecraft:sulfur_cube_swallowable}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> SULFUR_CUBE_SWALLOWABLE = create(key("sulfur_cube_swallowable"));
/**
* {@code #minecraft:swords}
*
@@ -3,14 +3,14 @@ package io.papermc.paper.registry.keys.tags;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.entity.poi.PoiType;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import io.papermc.paper.world.Timeline;
import net.kyori.adventure.key.Key;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla tag keys for {@link RegistryKey#POINT_OF_INTEREST_TYPE}.
* Vanilla tag keys for {@link RegistryKey#TIMELINE}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
@@ -24,38 +24,45 @@ import org.jspecify.annotations.NullMarked;
})
@NullMarked
@GeneratedClass
public final class PoiTypeTagKeys {
public final class TimelineTagKeys {
/**
* {@code #minecraft:acquirable_job_site}
* {@code #minecraft:in_end}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<PoiType> ACQUIRABLE_JOB_SITE = create(key("acquirable_job_site"));
public static final TagKey<Timeline> IN_END = create(key("in_end"));
/**
* {@code #minecraft:bee_home}
* {@code #minecraft:in_nether}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<PoiType> BEE_HOME = create(key("bee_home"));
public static final TagKey<Timeline> IN_NETHER = create(key("in_nether"));
/**
* {@code #minecraft:village}
* {@code #minecraft:in_overworld}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<PoiType> VILLAGE = create(key("village"));
public static final TagKey<Timeline> IN_OVERWORLD = create(key("in_overworld"));
private PoiTypeTagKeys() {
/**
* {@code #minecraft:universal}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Timeline> UNIVERSAL = create(key("universal"));
private TimelineTagKeys() {
}
/**
* Creates a tag key for {@link PoiType} in the registry {@code minecraft:point_of_interest_type}.
* Creates a tag key for {@link Timeline} in the registry {@code minecraft:timeline}.
*
* @param key the tag key's key
* @return a new tag key
*/
public static TagKey<PoiType> create(final Key key) {
return TagKey.create(RegistryKey.POINT_OF_INTEREST_TYPE, key);
public static TagKey<Timeline> create(final Key key) {
return TagKey.create(RegistryKey.TIMELINE, key);
}
}
@@ -80,7 +80,7 @@ public class TimedEventExecutor implements EventExecutor {
executor.execute(listener, event);
return;
}
try (Timing ignored = timings.startTiming()) {
try (Timing ignored = timings.startTiming()){
executor.execute(listener, event);
}
}
@@ -134,7 +134,7 @@ public class TimingHistory {
}
}
return pair(
worldMap.get(world.key().asString()),
worldMap.get(world.getKey().toString()),
toArrayMapper(regions.values(),new Function<RegionData, Object>() {
@NotNull
@Override
@@ -2,10 +2,6 @@ package co.aikar.timings;
import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
import net.kyori.adventure.audience.ForwardingAudience;
import net.kyori.adventure.chat.ChatType;
import net.kyori.adventure.chat.SignedMessage;
import net.kyori.adventure.text.Component;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
@@ -65,18 +61,8 @@ public class TimingsReportListener implements net.kyori.adventure.audience.Forwa
}
@Override
public void sendMessage(final @NotNull Component message) {
ForwardingAudience.super.sendMessage(message);
}
@Override
public void sendMessage(final @NotNull Component message, final ChatType.@NotNull Bound boundChatType) {
ForwardingAudience.super.sendMessage(message, boundChatType);
}
@Override
public void sendMessage(final @NotNull SignedMessage signedMessage, final ChatType.@NotNull Bound boundChatType) {
ForwardingAudience.super.sendMessage(signedMessage, boundChatType);
public void sendMessage(final @NotNull net.kyori.adventure.identity.Identity source, final @NotNull net.kyori.adventure.text.Component message, final @NotNull net.kyori.adventure.audience.MessageType type) {
net.kyori.adventure.audience.ForwardingAudience.super.sendMessage(source, message, type);
}
@NotNull
@@ -178,7 +178,7 @@ public class LoadingMap <K, V> extends AbstractMap<K, V> {
* @param loadFactor Load factor to use
* @param <K> Key Type of the Map
* @param <V> Value Type of the Map
* @return Map that auto instantiates on .get()
* @return Map that auto instantiates on .get()
*/
@NotNull
public static <K, V> Map<K, V> newHashAutoMap(@NotNull final Class<? extends V> valueClass, int initialCapacity, float loadFactor) {
@@ -71,7 +71,7 @@ public class MaterialTags {
*/
public static final MaterialSetTag BUCKETS = new MaterialSetTag(keyFor("buckets"))
.endsWith("BUCKET")
.ensureSize("BUCKETS", 12).lock();
.ensureSize("BUCKETS", 11).lock();
/**
* Covers coal and charcoal.
@@ -96,19 +96,18 @@ public class MaterialTags {
/**
* Covers all colors of concrete.
*
* @deprecated in favour of {@link Tag#CONCRETE}
*/
@Deprecated(since = "26.2")
public static final MaterialSetTag CONCRETES = replacedBy(Tag.CONCRETE, "concretes");
public static final MaterialSetTag CONCRETES = new MaterialSetTag(keyFor("concretes"))
.endsWith("_CONCRETE")
.ensureSize("CONCRETES", 16).lock();
/**
* Covers all colors of concrete powder.
*
* @deprecated in favour of {@link Tag#CONCRETE_POWDERS}
* @deprecated in favour of {@link Tag#CONCRETE_POWDER}
*/
@Deprecated(since = "1.21.8")
public static final MaterialSetTag CONCRETE_POWDER = replacedBy(Tag.CONCRETE_POWDERS);
public static final MaterialSetTag CONCRETE_POWDER = replacedBy(Tag.CONCRETE_POWDER);
/**
* Covers the two types of cooked fish.
@@ -126,11 +125,10 @@ public class MaterialTags {
/**
* Covers all dyes.
*
* @deprecated in favour of {@link Tag#ITEMS_DYES}
*/
@Deprecated(since = "26.1")
public static final MaterialSetTag DYES = replacedBy(Tag.ITEMS_DYES);
public static final MaterialSetTag DYES = new MaterialSetTag(keyFor("dyes"))
.endsWith("_DYE")
.ensureSize("DYES", 16).lock();
/**
* Covers all variants of gates.
@@ -171,11 +169,10 @@ public class MaterialTags {
/**
* Covers all glazed terracotta blocks.
*
* @deprecated in favour of {@link Tag#GLAZED_TERRACOTTA}
*/
@Deprecated(since = "26.2")
public static final MaterialSetTag GLAZED_TERRACOTTA = replacedBy(Tag.GLAZED_TERRACOTTA);
public static final MaterialSetTag GLAZED_TERRACOTTA = new MaterialSetTag(keyFor("glazed_terracotta"))
.endsWith("GLAZED_TERRACOTTA")
.ensureSize("GLAZED_TERRACOTTA", 16).lock();
/**
* Covers the colors of stained terracotta.
@@ -343,7 +340,7 @@ public class MaterialTags {
*/
public static final MaterialSetTag SPAWN_EGGS = new MaterialSetTag(keyFor("spawn_eggs"))
.endsWith("_SPAWN_EGG")
.ensureSize("SPAWN_EGGS", 88).lock();
.ensureSize("SPAWN_EGGS", 87).lock();
/**
* Covers all colors of stained glass.
@@ -591,8 +588,8 @@ public class MaterialTags {
*/
@SuppressWarnings("unchecked")
public static final MaterialSetTag COLORABLE = new MaterialSetTag(keyFor("colorable"))
.add(Tag.WOOL, Tag.WOOL_CARPETS, Tag.SHULKER_BOXES, Tag.BEDS, Tag.CONCRETE)
.add(STAINED_GLASS, STAINED_GLASS_PANES)
.add(Tag.WOOL, Tag.WOOL_CARPETS, Tag.SHULKER_BOXES, Tag.BEDS)
.add(STAINED_GLASS, STAINED_GLASS_PANES, CONCRETES)
.lock();
/**
@@ -75,7 +75,7 @@ public final class NamespacedTag implements com.destroystokyo.paper.Namespaced {
Preconditions.checkArgument(key != null, "Key cannot be null");
this.namespace = plugin.getName().toLowerCase(Locale.ROOT);
this.key = key.toLowerCase(Locale.ROOT);
this.key = key.toLowerCase().toLowerCase(Locale.ROOT);
// Check validity after normalization
Preconditions.checkArgument(VALID_NAMESPACE.matcher(this.namespace).matches(), "Invalid namespace. Must be [a-z0-9._-]: %s", this.namespace);
@@ -5,7 +5,6 @@ import org.bukkit.Location;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Mob;
import org.checkerframework.checker.index.qual.NonNegative;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
@@ -44,20 +43,7 @@ public interface Pathfinder {
* @param loc Location to navigate to
* @return The closest Location the Entity can get to for this navigation, or null if no path could be calculated
*/
default @Nullable PathResult findPath(Location loc) {
return this.findPath(loc, 0);
}
/**
* Calculates a destination for the Entity to navigate to, but does not set it
* as the current target. Useful for calculating what would happen before setting it.
*
* @param loc Location to navigate to
* @param reachRange The <a href="https://cp-algorithms.com/geometry/manhattan-distance.html">Manhattan-distance</a> threshold
* from the target position at which the path is considered reached, where {@code 0} requires the exact target position
* @return The closest Location the Entity can get to for this navigation, or null if no path could be calculated
*/
@Nullable PathResult findPath(final Location loc, final @NonNegative int reachRange);
@Nullable PathResult findPath(Location loc);
/**
* Calculates a destination for the Entity to navigate to reach the target entity,
@@ -90,26 +76,7 @@ public interface Pathfinder {
* @param target the Entity to navigate to
* @return The closest Location the Entity can get to for this navigation, or null if no path could be calculated
*/
default @Nullable PathResult findPath(Entity target) {
return this.findPath(target, 0);
}
/**
* Calculates a destination for the Entity to navigate to to reach the target entity,
* but does not set it as the current target.
* Useful for calculating what would happen before setting it.
* <p>
* The behavior of this PathResult is subject to the games pathfinding rules, and may
* result in the pathfinding automatically updating to follow the target Entity.
* <p>
* However, this behavior is not guaranteed, and is subject to the games behavior.
*
* @param target the Entity to navigate to
* @param reachRange The <a href="https://cp-algorithms.com/geometry/manhattan-distance.html">Manhattan-distance</a> threshold
* from the target position at which the path is considered reached, where {@code 0} requires the exact target position
* @return The closest Location the Entity can get to for this navigation, or null if no path could be calculated
*/
@Nullable PathResult findPath(final Entity target, final @NonNegative int reachRange);
@Nullable PathResult findPath(Entity target);
/**
* Calculates a destination for the Entity to navigate to, and sets it with default speed
@@ -6,55 +6,96 @@ import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.inventory.InventoryEvent;
import org.bukkit.inventory.AnvilInventory;
import org.bukkit.inventory.InventoryView;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
/**
* Called when an anvil is damaged from being used
*/
public interface AnvilDamagedEvent extends InventoryEvent, Cancellable {
@NullMarked
public class AnvilDamagedEvent extends InventoryEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private DamageState damageState;
private boolean cancelled;
@ApiStatus.Internal
public AnvilDamagedEvent(final InventoryView inventory, final @Nullable BlockData blockData) {
super(inventory);
this.damageState = DamageState.getState(blockData);
}
@Override
AnvilInventory getInventory();
public AnvilInventory getInventory() {
return (AnvilInventory) super.getInventory();
}
/**
* Gets the new state of damage on the anvil
*
* @return Damage state
*/
DamageState getDamageState();
public DamageState getDamageState() {
return this.damageState;
}
/**
* Sets the new state of damage on the anvil
*
* @param damageState Damage state
*/
void setDamageState(DamageState damageState);
public void setDamageState(final DamageState damageState) {
this.damageState = damageState;
}
/**
* Gets if anvil is breaking on this use
*
* @return {@code true} if breaking
*/
boolean isBreaking();
public boolean isBreaking() {
return this.damageState == DamageState.BROKEN;
}
/**
* Sets if anvil is breaking on this use
*
* @param breaking {@code true} if breaking
*/
void setBreaking(boolean breaking);
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
public void setBreaking(final boolean breaking) {
if (breaking) {
this.damageState = DamageState.BROKEN;
} else if (this.damageState == DamageState.BROKEN) {
this.damageState = DamageState.DAMAGED;
}
return Holder.HANDLER_LIST;
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
/**
* Represents the amount of damage on an anvil block
*/
enum DamageState {
public enum DamageState {
FULL(Material.ANVIL),
CHIPPED(Material.CHIPPED_ANVIL),
DAMAGED(Material.DAMAGED_ANVIL),
@@ -1,50 +1,88 @@
package com.destroystokyo.paper.event.block;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.block.BlockEvent;
import org.bukkit.event.player.PlayerEvent;
import org.bukkit.potion.PotionEffect;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Called when a beacon effect is being applied to a player.
*/
public interface BeaconEffectEvent extends BlockEvent, PlayerEvent, Cancellable {
@NullMarked
public class BeaconEffectEvent extends BlockEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final Player player;
private final boolean primary;
private PotionEffect effect;
private boolean cancelled;
@ApiStatus.Internal
public BeaconEffectEvent(final Block beacon, final PotionEffect effect, final Player player, final boolean primary) {
super(beacon);
this.effect = effect;
this.player = player;
this.primary = primary;
}
/**
* Gets the potion effect being applied.
*
* @return Potion effect
*/
PotionEffect getEffect();
public PotionEffect getEffect() {
return this.effect;
}
/**
* Sets the potion effect that will be applied.
*
* @param effect Potion effect
*/
void setEffect(PotionEffect effect);
public void setEffect(final PotionEffect effect) {
this.effect = effect;
}
/**
* Gets the player who the potion effect is being applied to.
*
* @return Affected player
*/
@Override
Player getPlayer();
public Player getPlayer() {
return this.player;
}
/**
* Gets whether the effect is a primary beacon effect.
*
* @return {@code true} if this event represents a primary effect
*/
boolean isPrimary();
public boolean isPrimary() {
return this.primary;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,9 +1,12 @@
package com.destroystokyo.paper.event.block;
import org.bukkit.block.Block;
import org.bukkit.block.data.BlockData;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.block.BlockExpEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired anytime the server intends to 'destroy' a block through some triggering reason.
@@ -15,65 +18,103 @@ import org.bukkit.event.block.BlockExpEvent;
* <p>
* Events such as leaves decaying, pistons retracting (where the block is moving), does NOT fire this event.
*/
public interface BlockDestroyEvent extends BlockExpEvent, Cancellable {
@NullMarked
public class BlockDestroyEvent extends BlockExpEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final BlockData newState;
private boolean willDrop;
private boolean playEffect = true;
private BlockData effectBlock;
private boolean cancelled;
@ApiStatus.Internal
public BlockDestroyEvent(final Block block, final BlockData newState, final BlockData effectBlock, final int xp, final boolean willDrop) {
super(block, xp);
this.newState = newState;
this.effectBlock = effectBlock;
this.willDrop = willDrop;
}
/**
* Gets the effect that will be played when the block is broken.
*
* @return block break effect
*/
BlockData getEffectBlock();
public BlockData getEffectBlock() {
return this.effectBlock;
}
/**
* Sets the effect that will be played when the block is broken.
* Note: {@link #playEffect()} must be {@code true} in order for this effect to be
* Note: {@link BlockDestroyEvent#playEffect()} must be {@code true} in order for this effect to be
* played.
*
* @param effectBlock block effect
*/
void setEffectBlock(BlockData effectBlock);
public void setEffectBlock(final BlockData effectBlock) {
this.effectBlock = effectBlock.clone();
}
/**
* @return The new state of this block (Air, or a Fluid type)
*/
BlockData getNewState();
public BlockData getNewState() {
return this.newState.clone();
}
/**
* @return If the server is going to drop the block in question with this destroy event
*/
boolean willDrop();
public boolean willDrop() {
return this.willDrop;
}
/**
* @param willDrop If the server is going to drop the block in question with this destroy event
*/
void setWillDrop(boolean willDrop);
public void setWillDrop(final boolean willDrop) {
this.willDrop = willDrop;
}
/**
* @return If the server is going to play the sound effect for this destruction
*/
boolean playEffect();
public boolean playEffect() {
return this.playEffect;
}
/**
* @param playEffect If the server should play the sound effect for this destruction
*/
void setPlayEffect(boolean playEffect);
public void setPlayEffect(final boolean playEffect) {
this.playEffect = playEffect;
}
/**
* @return If the event is cancelled, meaning the block will not be destroyed
*/
@Override
boolean isCancelled();
public boolean isCancelled() {
return this.cancelled;
}
/**
* If the event is cancelled, the block will remain in its previous state.
*/
@Override
void setCancelled(boolean cancel);
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,6 +1,7 @@
package com.destroystokyo.paper.event.block;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
@@ -8,7 +9,9 @@ import org.bukkit.entity.TNTPrimed;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.block.BlockEvent;
import org.jspecify.annotations.Nullable;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Called when TNT block is about to turn into {@link TNTPrimed}
@@ -20,14 +23,31 @@ import org.jspecify.annotations.Nullable;
* @deprecated use {@link org.bukkit.event.block.TNTPrimeEvent}
*/
@Deprecated(forRemoval = true, since = "1.19.4")
public interface TNTPrimeEvent extends BlockEvent, Cancellable {
public class TNTPrimeEvent extends BlockEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
@NotNull private final PrimeReason reason;
@Nullable private final Entity primerEntity;
private boolean cancelled;
@ApiStatus.Internal
public TNTPrimeEvent(@NotNull Block block, @NotNull PrimeReason reason, @Nullable Entity primerEntity) {
super(block);
this.reason = reason;
this.primerEntity = primerEntity;
}
/**
* Gets the TNT prime reason
*
* @return Prime reason
*/
PrimeReason getReason();
@NotNull
public PrimeReason getReason() {
return this.reason;
}
/**
* Gets the TNT primer {@link Entity}.
@@ -38,7 +58,10 @@ public interface TNTPrimeEvent extends BlockEvent, Cancellable {
*
* @return The {@link Entity} who primed the TNT
*/
@Nullable Entity getPrimerEntity();
@Nullable
public Entity getPrimerEntity() {
return this.primerEntity;
}
/**
* Gets whether spawning {@link TNTPrimed} should be cancelled or not
@@ -46,7 +69,9 @@ public interface TNTPrimeEvent extends BlockEvent, Cancellable {
* @return Whether spawning {@link TNTPrimed} should be cancelled or not
*/
@Override
boolean isCancelled();
public boolean isCancelled() {
return this.cancelled;
}
/**
* Sets whether to cancel spawning {@link TNTPrimed} or not
@@ -54,16 +79,22 @@ public interface TNTPrimeEvent extends BlockEvent, Cancellable {
* @param cancel whether spawning {@link TNTPrimed} should be cancelled or not
*/
@Override
void setCancelled(boolean cancel);
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
public void setCancelled(boolean cancel) {
this.cancelled = cancel;
}
enum PrimeReason {
@NotNull
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
@NotNull
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
public enum PrimeReason {
/**
* When TNT prime was caused by other explosion (chain reaction)
*/
@@ -1,4 +0,0 @@
@NullMarked
package com.destroystokyo.paper.event.block;
import org.jspecify.annotations.NullMarked;
@@ -2,9 +2,12 @@ package com.destroystokyo.paper.event.brigadier;
import com.mojang.brigadier.tree.RootCommandNode;
import io.papermc.paper.command.brigadier.CommandSourceStack;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired any time a Brigadier RootCommandNode is generated for a player to inform the client of commands.
@@ -27,26 +30,45 @@ import org.jetbrains.annotations.ApiStatus;
* <p>This is a draft/experimental API and is subject to change.</p>
*/
@ApiStatus.Experimental
public interface AsyncPlayerSendCommandsEvent<S extends CommandSourceStack> extends PlayerEvent {
@NullMarked
public class AsyncPlayerSendCommandsEvent<S extends CommandSourceStack> extends PlayerEvent {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final RootCommandNode<S> node;
private final boolean hasFiredAsync;
@ApiStatus.Internal
public AsyncPlayerSendCommandsEvent(final Player player, final RootCommandNode<S> node, final boolean hasFiredAsync) {
super(player, !Bukkit.isPrimaryThread());
this.node = node;
this.hasFiredAsync = hasFiredAsync;
}
/**
* Gets the full Root Command Node being sent to the client, which is mutable.
*
* @return the root command node
*/
RootCommandNode<S> getCommandNode();
public RootCommandNode<S> getCommandNode() {
return this.node;
}
/**
* Gets if this event has already fired asynchronously.
*
* @return whether this event has already fired asynchronously
*/
boolean hasFiredAsync();
public boolean hasFiredAsync() {
return this.hasFiredAsync;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,37 +1,67 @@
package com.destroystokyo.paper.event.brigadier;
import com.mojang.brigadier.suggestion.Suggestions;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Called when sending {@link Suggestions} to the client. Will be called asynchronously if a plugin
* marks the {@link com.destroystokyo.paper.event.server.AsyncTabCompleteEvent} event handled asynchronously,
* otherwise called synchronously.
*/
public interface AsyncPlayerSendSuggestionsEvent extends PlayerEvent, Cancellable {
@NullMarked
public class AsyncPlayerSendSuggestionsEvent extends PlayerEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private Suggestions suggestions;
private final String buffer;
private boolean cancelled;
@ApiStatus.Internal
public AsyncPlayerSendSuggestionsEvent(final Player player, final Suggestions suggestions, final String buffer) {
super(player, !Bukkit.isPrimaryThread());
this.suggestions = suggestions;
this.buffer = buffer;
}
/**
* Gets the input buffer sent to request these suggestions.
*
* @return the input buffer
*/
String getBuffer();
public String getBuffer() {
return this.buffer;
}
/**
* Gets the suggestions to be sent to client.
*
* @return the suggestions
*/
Suggestions getSuggestions();
public Suggestions getSuggestions() {
return this.suggestions;
}
/**
* Sets the suggestions to be sent to client.
*
* @param suggestions suggestions
*/
void setSuggestions(Suggestions suggestions);
public void setSuggestions(final Suggestions suggestions) {
this.suggestions = suggestions;
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
/**
* Cancels sending suggestions to the client.
@@ -39,12 +69,16 @@ public interface AsyncPlayerSendSuggestionsEvent extends PlayerEvent, Cancellabl
* {@inheritDoc}
*/
@Override
void setCancelled(boolean cancel);
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,7 +1,6 @@
package com.destroystokyo.paper.event.brigadier;
import com.destroystokyo.paper.brigadier.BukkitBrigadierCommand;
import com.destroystokyo.paper.brigadier.BukkitBrigadierCommandSource;
import com.mojang.brigadier.tree.ArgumentCommandNode;
import com.mojang.brigadier.tree.LiteralCommandNode;
import com.mojang.brigadier.tree.RootCommandNode;
@@ -10,6 +9,7 @@ import org.bukkit.command.Command;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.server.ServerEvent;
import org.jetbrains.annotations.NotNull;
/**
* Fired anytime the server synchronizes Bukkit commands to Brigadier.
@@ -22,14 +22,37 @@ import org.bukkit.event.server.ServerEvent;
*/
@Deprecated(since = "1.20.6")
@Warning(reason = "This event has been superseded by the Commands API and will be removed in a future release. Listen to LifecycleEvents.COMMANDS instead.", value = true)
public interface CommandRegisteredEvent<S extends BukkitBrigadierCommandSource> extends ServerEvent, Cancellable {
public class CommandRegisteredEvent<S extends com.destroystokyo.paper.brigadier.BukkitBrigadierCommandSource> extends ServerEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final String commandLabel;
private final Command command;
private final com.destroystokyo.paper.brigadier.BukkitBrigadierCommand<S> brigadierCommand;
private final RootCommandNode<S> root;
private final ArgumentCommandNode<S, String> defaultArgs;
private LiteralCommandNode<S> literal;
private boolean rawCommand = false;
private boolean cancelled;
public CommandRegisteredEvent(String commandLabel, com.destroystokyo.paper.brigadier.BukkitBrigadierCommand<S> brigadierCommand, Command command, RootCommandNode<S> root, LiteralCommandNode<S> literal, ArgumentCommandNode<S, String> defaultArgs) {
this.commandLabel = commandLabel;
this.brigadierCommand = brigadierCommand;
this.command = command;
this.root = root;
this.literal = literal;
this.defaultArgs = defaultArgs;
}
/**
* Gets the command label of the {@link Command} being registered.
*
* @return the command label
*/
String getCommandLabel();
public String getCommandLabel() {
return this.commandLabel;
}
/**
* Gets the {@link BukkitBrigadierCommand} for the {@link Command} being registered. This can be used
@@ -39,36 +62,27 @@ public interface CommandRegisteredEvent<S extends BukkitBrigadierCommandSource>
*
* @return the {@link BukkitBrigadierCommand}
*/
BukkitBrigadierCommand<S> getBrigadierCommand();
public BukkitBrigadierCommand<S> getBrigadierCommand() {
return this.brigadierCommand;
}
/**
* Gets the {@link Command} being registered.
*
* @return the {@link Command}
*/
Command getCommand();
public Command getCommand() {
return this.command;
}
/**
* Gets the {@link RootCommandNode} which is being registered to.
*
* @return the {@link RootCommandNode}
*/
RootCommandNode<S> getRoot();
/**
* Gets the {@link LiteralCommandNode} to be registered for the {@link Command}.
*
* @return the {@link LiteralCommandNode}
*/
LiteralCommandNode<S> getLiteral();
/**
* Sets the {@link LiteralCommandNode} used to register this command. The default literal is mutable, so
* this is primarily if you want to completely replace the object.
*
* @param literal new node
*/
void setLiteral(LiteralCommandNode<S> literal);
public RootCommandNode<S> getRoot() {
return this.root;
}
/**
* Gets the Bukkit APIs default arguments node (greedy string), for if
@@ -76,7 +90,28 @@ public interface CommandRegisteredEvent<S extends BukkitBrigadierCommandSource>
*
* @return default arguments node
*/
ArgumentCommandNode<S, String> getDefaultArgs();
public ArgumentCommandNode<S, String> getDefaultArgs() {
return this.defaultArgs;
}
/**
* Gets the {@link LiteralCommandNode} to be registered for the {@link Command}.
*
* @return the {@link LiteralCommandNode}
*/
public LiteralCommandNode<S> getLiteral() {
return this.literal;
}
/**
* Sets the {@link LiteralCommandNode} used to register this command. The default literal is mutable, so
* this is primarily if you want to completely replace the object.
*
* @param literal new node
*/
public void setLiteral(LiteralCommandNode<S> literal) {
this.literal = literal;
}
/**
* Gets whether this command should is treated as "raw".
@@ -84,7 +119,9 @@ public interface CommandRegisteredEvent<S extends BukkitBrigadierCommandSource>
* @see #setRawCommand(boolean)
* @return whether this command is treated as "raw"
*/
boolean isRawCommand();
public boolean isRawCommand() {
return this.rawCommand;
}
/**
* Sets whether this command should be treated as "raw".
@@ -98,7 +135,14 @@ public interface CommandRegisteredEvent<S extends BukkitBrigadierCommandSource>
*
* @param rawCommand whether this command should be treated as "raw"
*/
void setRawCommand(boolean rawCommand);
public void setRawCommand(final boolean rawCommand) {
this.rawCommand = rawCommand;
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
/**
* Cancels registering this command to Brigadier, but will remain in Bukkit Command Map. Can be used to hide a
@@ -107,12 +151,17 @@ public interface CommandRegisteredEvent<S extends BukkitBrigadierCommandSource>
* {@inheritDoc}
*/
@Override
void setCancelled(boolean cancel);
public void setCancelled(boolean cancel) {
this.cancelled = cancel;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@NotNull
public HandlerList getHandlers() {
return HANDLER_LIST;
}
@NotNull
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,4 +0,0 @@
@NullMarked
package com.destroystokyo.paper.event.brigadier;
import org.jspecify.annotations.NullMarked;
@@ -1,19 +1,60 @@
package com.destroystokyo.paper.event.entity;
import io.papermc.paper.event.entity.EntityIgniteEvent;
import org.bukkit.entity.Creeper;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Called when a Creeper is ignited either by a
* flint and steel, {@link Creeper#ignite()} or
* {@link Creeper#setIgnited(boolean)}.
*/
public interface CreeperIgniteEvent extends EntityIgniteEvent {
@NullMarked
public class CreeperIgniteEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private boolean ignited;
private boolean cancelled;
@ApiStatus.Internal
public CreeperIgniteEvent(final Creeper creeper, final boolean ignited) {
super(creeper);
this.ignited = ignited;
}
@Override
Creeper getEntity();
public Creeper getEntity() {
return (Creeper) super.getEntity();
}
boolean isIgnited();
public boolean isIgnited() {
return this.ignited;
}
void setIgnited(boolean ignited);
public void setIgnited(final boolean ignited) {
this.ignited = ignited;
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -7,35 +7,68 @@ import org.bukkit.entity.LivingEntity;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.jetbrains.annotations.Unmodifiable;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when a DragonFireball collides with a block/entity and spawns an AreaEffectCloud
*/
public interface EnderDragonFireballHitEvent extends EntityEvent, Cancellable {
@NullMarked
public class EnderDragonFireballHitEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final Collection<LivingEntity> targets;
private final AreaEffectCloud areaEffectCloud;
private boolean cancelled;
@ApiStatus.Internal
public EnderDragonFireballHitEvent(final DragonFireball fireball, final Collection<LivingEntity> targets, final AreaEffectCloud areaEffectCloud) {
super(fireball);
this.targets = targets;
this.areaEffectCloud = areaEffectCloud;
}
/**
* The fireball involved in this event
*/
@Override
DragonFireball getEntity();
public DragonFireball getEntity() {
return (DragonFireball) super.getEntity();
}
/**
* The living entities hit by fireball
*
* @return the targets
*/
@Unmodifiable Collection<LivingEntity> getTargets();
public Collection<LivingEntity> getTargets() {
return this.targets;
}
/**
* @return The area effect cloud spawned in this collision
*/
AreaEffectCloud getAreaEffectCloud();
public AreaEffectCloud getAreaEffectCloud() {
return this.areaEffectCloud;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -5,27 +5,57 @@ import org.bukkit.entity.EnderDragon;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when an EnderDragon spawns an AreaEffectCloud by shooting flames
*/
public interface EnderDragonFlameEvent extends EntityEvent, Cancellable {
@NullMarked
public class EnderDragonFlameEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final AreaEffectCloud areaEffectCloud;
private boolean cancelled;
@ApiStatus.Internal
public EnderDragonFlameEvent(final EnderDragon enderDragon, final AreaEffectCloud areaEffectCloud) {
super(enderDragon);
this.areaEffectCloud = areaEffectCloud;
}
/**
* The enderdragon involved in this event
*/
@Override
EnderDragon getEntity();
public EnderDragon getEntity() {
return (EnderDragon) super.getEntity();
}
/**
* @return The area effect cloud spawned in this collision
*/
AreaEffectCloud getAreaEffectCloud();
public AreaEffectCloud getAreaEffectCloud() {
return this.areaEffectCloud;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -5,27 +5,57 @@ import org.bukkit.entity.EnderDragon;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when an EnderDragon shoots a fireball
*/
public interface EnderDragonShootFireballEvent extends EntityEvent, Cancellable {
@NullMarked
public class EnderDragonShootFireballEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final DragonFireball fireball;
private boolean cancelled;
@ApiStatus.Internal
public EnderDragonShootFireballEvent(final EnderDragon entity, final DragonFireball fireball) {
super(entity);
this.fireball = fireball;
}
/**
* The enderdragon shooting the fireball
*/
@Override
EnderDragon getEntity();
public EnderDragon getEntity() {
return (EnderDragon) super.getEntity();
}
/**
* @return The fireball being shot
*/
DragonFireball getFireball();
public DragonFireball getFireball() {
return this.fireball;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -28,6 +28,8 @@ import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when an Enderman determines if it should attack a player or not.
@@ -35,7 +37,19 @@ import org.bukkit.event.entity.EntityEvent;
* Starts off cancelled if the player is wearing a pumpkin head or is not looking
* at the Enderman, according to Vanilla rules.
*/
public interface EndermanAttackPlayerEvent extends EntityEvent, Cancellable {
@NullMarked
public class EndermanAttackPlayerEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final Player player;
private boolean cancelled;
@ApiStatus.Internal
public EndermanAttackPlayerEvent(final Enderman entity, final Player player) {
super(entity);
this.player = player;
}
/**
* The enderman considering attacking
@@ -43,20 +57,26 @@ public interface EndermanAttackPlayerEvent extends EntityEvent, Cancellable {
* @return The enderman considering attacking
*/
@Override
Enderman getEntity();
public Enderman getEntity() {
return (Enderman) super.getEntity();
}
/**
* The player the Enderman is considering attacking
*
* @return The player the Enderman is considering attacking
*/
Player getPlayer();
public Player getPlayer() {
return this.player;
}
/**
* @return If cancelled, the enderman will not attack
*/
@Override
boolean isCancelled();
public boolean isCancelled() {
return this.cancelled;
}
/**
* {@inheritDoc}
@@ -64,12 +84,16 @@ public interface EndermanAttackPlayerEvent extends EntityEvent, Cancellable {
* Cancels if the Enderman will attack this player
*/
@Override
void setCancelled(boolean cancel);
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -4,18 +4,41 @@ import org.bukkit.entity.Enderman;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
public interface EndermanEscapeEvent extends EntityEvent, Cancellable {
@NullMarked
public class EndermanEscapeEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final Reason reason;
private boolean cancelled;
@ApiStatus.Internal
public EndermanEscapeEvent(final Enderman entity, final Reason reason) {
super(entity);
this.reason = reason;
}
@Override
Enderman getEntity();
public Enderman getEntity() {
return (Enderman) super.getEntity();
}
/**
* Gets the reason the enderman is trying to escape.
*
* @return The reason
*/
Reason getReason();
public Reason getReason() {
return this.reason;
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
/**
* Cancels the escape.
@@ -25,16 +48,20 @@ public interface EndermanEscapeEvent extends EntityEvent, Cancellable {
* innate immunities or damage behavior like arrows where the damage never happens.
*/
@Override
void setCancelled(boolean cancel);
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
enum Reason {
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
public enum Reason {
/**
* The enderman has stopped attacking and ran away
*/
@@ -1,28 +1,44 @@
package com.destroystokyo.paper.event.entity;
import org.bukkit.World;
import org.bukkit.entity.Entity;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.CreatureSpawnEvent;
import org.bukkit.event.entity.EntityEvent;
import org.bukkit.event.world.WorldEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired any time an entity is being added to the world for any reason (including a chunk loading).
* <p>
* Not to be confused with {@link CreatureSpawnEvent}
*/
public interface EntityAddToWorldEvent extends EntityEvent, WorldEvent {
@NullMarked
public class EntityAddToWorldEvent extends EntityEvent {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final World world;
@ApiStatus.Internal
public EntityAddToWorldEvent(final Entity entity, final World world) {
super(entity);
this.world = world;
}
/**
* @return The world that the entity is being added to
*/
@Override
World getWorld();
public World getWorld() {
return this.world;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -4,21 +4,47 @@ import org.bukkit.entity.LivingEntity;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Called when an entity jumps
* <p>
* Cancelling the event will stop the entity from jumping
*/
public interface EntityJumpEvent extends EntityEvent, Cancellable {
@NullMarked
public class EntityJumpEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private boolean cancelled;
@ApiStatus.Internal
public EntityJumpEvent(final LivingEntity entity) {
super(entity);
}
@Override
LivingEntity getEntity();
public LivingEntity getEntity() {
return (LivingEntity) super.getEntity();
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,33 +1,52 @@
package com.destroystokyo.paper.event.entity;
import io.papermc.paper.event.entity.EntityKnockbackEvent;
import io.papermc.paper.event.entity.EntityPushedByEntityAttackEvent;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.util.Vector;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when an Entity is knocked back by the hit of another Entity. The acceleration
* vector can be modified. If this event is cancelled, the entity is not knocked back.
*/
public interface EntityKnockbackByEntityEvent extends EntityPushedByEntityAttackEvent {
@NullMarked
public class EntityKnockbackByEntityEvent extends EntityPushedByEntityAttackEvent {
private final float knockbackStrength;
@ApiStatus.Internal
public EntityKnockbackByEntityEvent(final LivingEntity entity, final Entity hitBy, final EntityKnockbackEvent.Cause cause, final float knockbackStrength, final Vector knockback) {
super(entity, cause, hitBy, knockback);
this.knockbackStrength = knockbackStrength;
}
/**
* @return the entity which was knocked back
*/
@Override
LivingEntity getEntity();
public LivingEntity getEntity() {
return (LivingEntity) super.getEntity();
}
/**
* @return the original knockback strength.
* @apiNote this value doesn't necessarily relate to {@link #getKnockback()}.
*/
@ApiStatus.Obsolete(since = "1.20.6")
float getKnockbackStrength();
public float getKnockbackStrength() {
return this.knockbackStrength;
}
/**
* Gets the causing entity. Same as {@link #getPushedBy()}.
*
* @return the Entity which hit
*/
Entity getHitBy();
public Entity getHitBy() {
return super.getPushedBy();
}
}
@@ -5,6 +5,8 @@ import org.bukkit.entity.Entity;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
/**
@@ -13,7 +15,21 @@ import org.jspecify.annotations.Nullable;
* This event does not fire for the entities actual movement. Only when it
* is choosing to start moving to a location.
*/
public interface EntityPathfindEvent extends EntityEvent, Cancellable {
@NullMarked
public class EntityPathfindEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final @Nullable Entity targetEntity;
private final Location location;
private boolean cancelled;
@ApiStatus.Internal
public EntityPathfindEvent(final Entity entity, final Location location, final @Nullable Entity targetEntity) {
super(entity);
this.targetEntity = targetEntity;
this.location = location;
}
/**
* The Entity that is pathfinding.
@@ -21,7 +37,9 @@ public interface EntityPathfindEvent extends EntityEvent, Cancellable {
* @return The Entity that is pathfinding.
*/
@Override
Entity getEntity();
public Entity getEntity() {
return this.entity;
}
/**
* If the Entity is trying to pathfind to an entity, this is the entity in relation.
@@ -30,34 +48,37 @@ public interface EntityPathfindEvent extends EntityEvent, Cancellable {
*
* @return The entity target or {@code null}
*/
@Nullable Entity getTargetEntity();
/**
* The Location of where the entity is about to move to.
* <br>
* Note that if the target happened to of been an entity
*
* @return Location of where the entity is trying to pathfind to.
*/
Location getTargetLocation();
/**
* The Location of where the entity is about to move to.
* <br>
* Note that if the target happened to of been an entity
*
* @return Location of where the entity is trying to pathfind to.
* @deprecated use {@link #getTargetLocation()}
*/
@Deprecated(forRemoval = true)
default Location getLoc() {
return this.getTargetLocation();
public @Nullable Entity getTargetEntity() {
return this.targetEntity;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
/**
* The Location of where the entity is about to move to.
* <br>
* Note that if the target happened to of been an entity
*
* @return Location of where the entity is trying to pathfind to.
*/
public Location getLoc() {
return this.location.clone();
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,26 +1,42 @@
package com.destroystokyo.paper.event.entity;
import org.bukkit.World;
import org.bukkit.entity.Entity;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.bukkit.event.world.WorldEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired any time an entity is being removed from a world for any reason (including a chunk unloading).
* Note: The entity is updated prior to this event being called, as such, the entity's world may not be equal to {@link #getWorld()}.
*/
public interface EntityRemoveFromWorldEvent extends EntityEvent, WorldEvent {
@NullMarked
public class EntityRemoveFromWorldEvent extends EntityEvent {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final World world;
@ApiStatus.Internal
public EntityRemoveFromWorldEvent(final Entity entity, final World world) {
super(entity);
this.world = world;
}
/**
* @return The world that the entity is being removed from
*/
@Override
World getWorld();
public World getWorld() {
return this.world;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,17 +1,33 @@
package com.destroystokyo.paper.event.entity;
import org.bukkit.Location;
import org.bukkit.block.EndGateway;
import org.bukkit.entity.Entity;
import org.bukkit.event.entity.EntityTeleportEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired any time an entity attempts to teleport in an end gateway
*/
public interface EntityTeleportEndGatewayEvent extends EntityTeleportEvent {
@NullMarked
public class EntityTeleportEndGatewayEvent extends EntityTeleportEvent {
private final EndGateway gateway;
@ApiStatus.Internal
public EntityTeleportEndGatewayEvent(final Entity entity, final Location from, final Location to, final EndGateway gateway) {
super(entity, from, to);
this.gateway = gateway;
}
/**
* The gateway triggering the teleport
*
* @return EndGateway used
*/
EndGateway getGateway();
public EndGateway getGateway() {
return this.gateway;
}
}
@@ -1,35 +1,65 @@
package com.destroystokyo.paper.event.entity;
import java.util.Collections;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LightningStrike;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityTransformEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when lightning strikes an entity
*/
public interface EntityZapEvent extends EntityTransformEvent {
@NullMarked
public class EntityZapEvent extends EntityTransformEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final LightningStrike bolt;
private boolean cancelled;
@ApiStatus.Internal
public EntityZapEvent(final Entity entity, final LightningStrike bolt, final Entity replacementEntity) {
super(entity, Collections.singletonList(replacementEntity), TransformReason.LIGHTNING);
this.bolt = bolt;
}
/**
* Gets the lightning bolt that is striking the entity.
*
* @return The lightning bolt responsible for this event
*/
LightningStrike getBolt();
public LightningStrike getBolt() {
return this.bolt;
}
/**
* Gets the entity that will replace the struck entity.
*
* @return The entity that will replace the struck entity
*/
default Entity getReplacementEntity() {
return this.getTransformedEntity();
public Entity getReplacementEntity() {
return super.getTransformedEntity();
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -27,32 +27,62 @@ import org.bukkit.entity.ExperienceOrb;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired anytime the server is about to merge 2 experience orbs into one
*/
public interface ExperienceOrbMergeEvent extends EntityEvent, Cancellable {
@NullMarked
public class ExperienceOrbMergeEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final ExperienceOrb mergeTarget;
private final ExperienceOrb mergeSource;
private boolean cancelled;
@ApiStatus.Internal
public ExperienceOrbMergeEvent(final ExperienceOrb mergeTarget, final ExperienceOrb mergeSource) {
super(mergeTarget);
this.mergeTarget = mergeTarget;
this.mergeSource = mergeSource;
}
/**
* {@return the orb that will absorb the other experience orb}
* @return The orb that will absorb the other experience orb
*/
ExperienceOrb getMergeTarget();
public ExperienceOrb getMergeTarget() {
return this.mergeTarget;
}
/**
* {@return the orb that is subject to being removed and merged into the target orb}
* @return The orb that is subject to being removed and merged into the target orb
*/
ExperienceOrb getMergeSource();
public ExperienceOrb getMergeSource() {
return this.mergeSource;
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
/**
* @param cancel {@code true} if you wish to cancel this event, and prevent the orbs from merging
*/
@Override
void setCancelled(boolean cancel);
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,16 +1,32 @@
package com.destroystokyo.paper.event.entity;
import org.bukkit.Location;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.event.entity.CreatureSpawnEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Called when a phantom is spawned for an exhausted player
*/
public interface PhantomPreSpawnEvent extends PreCreatureSpawnEvent {
@NullMarked
public class PhantomPreSpawnEvent extends PreCreatureSpawnEvent {
private final Entity entity;
@ApiStatus.Internal
public PhantomPreSpawnEvent(final Location location, final Entity entity, final CreatureSpawnEvent.SpawnReason reason) {
super(location, EntityType.PHANTOM, reason);
this.entity = entity;
}
/**
* Get the entity this phantom is spawning for
*
* @return the Entity
*/
Entity getSpawningEntity();
public Entity getSpawningEntity() {
return this.entity;
}
}
@@ -1,40 +1,65 @@
package com.destroystokyo.paper.event.entity;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when the server is calculating what chunks to try to spawn monsters in every Monster Spawn Tick event
*/
public interface PlayerNaturallySpawnCreaturesEvent extends PlayerEvent, Cancellable {
@NullMarked
public class PlayerNaturallySpawnCreaturesEvent extends PlayerEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private byte radius;
private boolean cancelled;
@ApiStatus.Internal
public PlayerNaturallySpawnCreaturesEvent(final Player player, final byte radius) {
super(player);
this.radius = radius;
}
/**
* @return The radius of chunks around this player to be included in natural spawn selection
*/
byte getSpawnRadius();
public byte getSpawnRadius() {
return this.radius;
}
/**
* @param radius The radius of chunks around this player to be included in natural spawn selection
*/
void setSpawnRadius(byte radius);
public void setSpawnRadius(final byte radius) {
this.radius = radius;
}
/**
* @return If this player's chunks will be excluded from natural spawns
*/
@Override
boolean isCancelled();
public boolean isCancelled() {
return this.cancelled;
}
/**
* @param cancel {@code true} if you wish to cancel this event, and not include this player's chunks for natural spawning
*/
@Override
void setCancelled(boolean cancel);
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -6,6 +6,8 @@ import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.CreatureSpawnEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* WARNING: This event only fires for a limited number of cases, and not for every case that {@link CreatureSpawnEvent} does.
@@ -17,27 +19,52 @@ import org.bukkit.event.entity.CreatureSpawnEvent;
* Currently: NATURAL and SPAWNER based reasons. <!-- Please submit a Pull Request for future additions. -->
* Also, Plugins that replace Entity Registrations with their own custom entities might not fire this event.
*/
public interface PreCreatureSpawnEvent extends Event, Cancellable {
@NullMarked
public class PreCreatureSpawnEvent extends Event implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final Location location;
private final EntityType type;
private final CreatureSpawnEvent.SpawnReason reason;
private boolean shouldAbortSpawn;
private boolean cancelled;
@ApiStatus.Internal
public PreCreatureSpawnEvent(final Location location, final EntityType type, final CreatureSpawnEvent.SpawnReason reason) {
this.location = location;
this.type = type;
this.reason = reason;
}
/**
* @return The location this creature is being spawned at
*/
Location getSpawnLocation();
public Location getSpawnLocation() {
return this.location.clone();
}
/**
* @return The type of creature being spawned
*/
EntityType getType();
public EntityType getType() {
return this.type;
}
/**
* @return Reason this creature is spawning (ie, NATURAL vs SPAWNER)
*/
CreatureSpawnEvent.SpawnReason getReason();
public CreatureSpawnEvent.SpawnReason getReason() {
return this.reason;
}
/**
* @return If the spawn process should be aborted vs trying more attempts
*/
boolean shouldAbortSpawn();
public boolean shouldAbortSpawn() {
return this.shouldAbortSpawn;
}
/**
* Set this if you are more blanket blocking all types of these spawns, and wish to abort the spawn process from
@@ -45,13 +72,17 @@ public interface PreCreatureSpawnEvent extends Event, Cancellable {
*
* @param shouldAbortSpawn Set if the spawn process should be aborted vs trying more attempts
*/
void setShouldAbortSpawn(boolean shouldAbortSpawn);
public void setShouldAbortSpawn(final boolean shouldAbortSpawn) {
this.shouldAbortSpawn = shouldAbortSpawn;
}
/**
* @return If the spawn of this creature is cancelled or not
*/
@Override
boolean isCancelled();
public boolean isCancelled() {
return this.cancelled;
}
/**
* Cancelling this event is more efficient than cancelling {@link CreatureSpawnEvent}
@@ -59,12 +90,16 @@ public interface PreCreatureSpawnEvent extends Event, Cancellable {
* @param cancel {@code true} if you wish to cancel this event, and abort the spawn of this creature
*/
@Override
void setCancelled(boolean cancel);
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,6 +1,10 @@
package com.destroystokyo.paper.event.entity;
import org.bukkit.Location;
import org.bukkit.entity.EntityType;
import org.bukkit.event.entity.CreatureSpawnEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Called before an entity is spawned into a world by a spawner.
@@ -8,7 +12,18 @@ import org.bukkit.Location;
* This only includes the spawner's location and not the full BlockState snapshot for performance reasons.
* If you really need it you have to get the spawner yourself.
*/
public interface PreSpawnerSpawnEvent extends PreCreatureSpawnEvent {
@NullMarked
public class PreSpawnerSpawnEvent extends PreCreatureSpawnEvent {
Location getSpawnerLocation();
private final Location spawnerLocation;
@ApiStatus.Internal
public PreSpawnerSpawnEvent(final Location location, final EntityType type, final Location spawnerLocation) {
super(location, type, CreatureSpawnEvent.SpawnReason.SPAWNER);
this.spawnerLocation = spawnerLocation;
}
public Location getSpawnerLocation() {
return this.spawnerLocation.clone();
}
}
@@ -6,36 +6,69 @@ import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
/**
* Called when a projectile collides with an entity
* <p>
* This event is called <b>before</b> {@link EntityDamageByEntityEvent}, and cancelling it will allow the projectile to continue flying
*
* @deprecated use {@link org.bukkit.event.entity.ProjectileHitEvent} and check if there is a hit entity
* @deprecated Deprecated, use {@link org.bukkit.event.entity.ProjectileHitEvent} and check if there is a hit entity
*/
@Deprecated(since = "1.19.3")
public interface ProjectileCollideEvent extends EntityEvent, Cancellable {
public class ProjectileCollideEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
@NotNull private final Entity collidedWith;
private boolean cancelled;
@ApiStatus.Internal
public ProjectileCollideEvent(@NotNull Projectile projectile, @NotNull Entity collidedWith) {
super(projectile);
this.collidedWith = collidedWith;
}
/**
* Get the projectile that collided
*
* @return the projectile that collided
*/
@Override
Projectile getEntity();
@NotNull
public Projectile getEntity() {
return (Projectile) super.getEntity();
}
/**
* Get the entity the projectile collided with
*
* @return the entity collided with
*/
Entity getCollidedWith();
@NotNull
public Entity getCollidedWith() {
return this.collidedWith;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(boolean cancel) {
this.cancelled = cancel;
}
@NotNull
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
@NotNull
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
}
@@ -6,22 +6,52 @@ import org.bukkit.entity.SkeletonHorse;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Event called when a player gets close to a skeleton horse and triggers the lightning trap
*/
public interface SkeletonHorseTrapEvent extends EntityEvent, Cancellable {
@NullMarked
public class SkeletonHorseTrapEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final List<HumanEntity> eligibleHumans;
private boolean cancelled;
@ApiStatus.Internal
public SkeletonHorseTrapEvent(final SkeletonHorse horse, final List<HumanEntity> eligibleHumans) {
super(horse);
this.eligibleHumans = eligibleHumans;
}
@Override
SkeletonHorse getEntity();
public SkeletonHorse getEntity() {
return (SkeletonHorse) super.getEntity();
}
List<HumanEntity> getEligibleHumans();
public List<HumanEntity> getEligibleHumans() {
return this.eligibleHumans;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,24 +1,41 @@
package com.destroystokyo.paper.event.entity;
import org.bukkit.entity.Slime;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when a Slime decides to change its facing direction.
* <p>
* This event does not fire for the entity's actual movement. Only when it
* is choosing to change direction.
*/
public interface SlimeChangeDirectionEvent extends SlimePathfindEvent {
@NullMarked
public class SlimeChangeDirectionEvent extends SlimePathfindEvent {
private float yaw;
@ApiStatus.Internal
public SlimeChangeDirectionEvent(final Slime slime, final float yaw) {
super(slime);
this.yaw = yaw;
}
/**
* Get the new chosen yaw
*
* @return Chosen yaw
*/
float getNewYaw();
public float getNewYaw() {
return this.yaw;
}
/**
* Set the new chosen yaw
*
* @param yaw Chosen yaw
*/
void setNewYaw(float yaw);
public void setNewYaw(final float yaw) {
this.yaw = yaw;
}
}
@@ -1,9 +1,11 @@
package com.destroystokyo.paper.event.entity;
import org.bukkit.entity.AbstractCubeMob;
import org.bukkit.entity.Slime;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when a Slime decides to start pathfinding.
@@ -11,7 +13,17 @@ import org.bukkit.event.entity.EntityEvent;
* This event does not fire for the entity's actual movement. Only when it
* is choosing to start moving.
*/
public interface SlimePathfindEvent extends EntityEvent, Cancellable {
@NullMarked
public class SlimePathfindEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private boolean cancelled;
@ApiStatus.Internal
public SlimePathfindEvent(final Slime slime) {
super(slime);
}
/**
* The Slime that is pathfinding.
@@ -19,12 +31,26 @@ public interface SlimePathfindEvent extends EntityEvent, Cancellable {
* @return The Slime that is pathfinding.
*/
@Override
AbstractCubeMob getEntity();
public Slime getEntity() {
return (Slime) super.getEntity();
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,10 +1,20 @@
package com.destroystokyo.paper.event.entity;
import org.bukkit.entity.Slime;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when a Slime decides to start jumping while swimming in water/lava.
* <p>
* This event does not fire for the entity's actual movement. Only when it
* is choosing to start jumping.
*/
public interface SlimeSwimEvent extends SlimeWanderEvent {
@NullMarked
public class SlimeSwimEvent extends SlimeWanderEvent {
@ApiStatus.Internal
public SlimeSwimEvent(final Slime slime) {
super(slime);
}
}
@@ -1,6 +1,9 @@
package com.destroystokyo.paper.event.entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Slime;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when a Slime decides to change direction to target a LivingEntity.
@@ -8,12 +11,23 @@ import org.bukkit.entity.LivingEntity;
* This event does not fire for the entity's actual movement. Only when it
* is choosing to start moving.
*/
public interface SlimeTargetLivingEntityEvent extends SlimePathfindEvent {
@NullMarked
public class SlimeTargetLivingEntityEvent extends SlimePathfindEvent {
private final LivingEntity target;
@ApiStatus.Internal
public SlimeTargetLivingEntityEvent(final Slime slime, final LivingEntity target) {
super(slime);
this.target = target;
}
/**
* Get the targeted entity
*
* @return Targeted entity
*/
LivingEntity getTarget();
public LivingEntity getTarget() {
return this.target;
}
}
@@ -1,10 +1,20 @@
package com.destroystokyo.paper.event.entity;
import org.bukkit.entity.Slime;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when a Slime decides to start wandering.
* <p>
* This event does not fire for the entity's actual movement. Only when it
* is choosing to start moving.
*/
public interface SlimeWanderEvent extends SlimePathfindEvent {
@NullMarked
public class SlimeWanderEvent extends SlimePathfindEvent {
@ApiStatus.Internal
public SlimeWanderEvent(final Slime slime) {
super(slime);
}
}
@@ -1,39 +1,54 @@
package com.destroystokyo.paper.event.entity;
import com.google.common.base.Preconditions;
import org.bukkit.entity.Egg;
import org.bukkit.entity.EntityType;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.checkerframework.checker.index.qual.NonNegative;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Called when a thrown egg might hatch.
* <p>
* This event fires for all thrown eggs that may hatch, players, dispensers, etc.
*/
public interface ThrownEggHatchEvent extends EntityEvent {
@NullMarked
public class ThrownEggHatchEvent extends Event {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final Egg egg;
private boolean hatching;
private byte numHatches;
private EntityType hatchType;
@ApiStatus.Internal
public ThrownEggHatchEvent(final Egg egg, final boolean hatching, final byte numHatches, final EntityType hatchingType) {
this.egg = egg;
this.hatching = hatching;
this.numHatches = numHatches;
this.hatchType = hatchingType;
}
/**
* Gets the egg involved in this event.
*
* @return the egg involved in this event
* @deprecated use {@link #getEntity()}
*/
@Deprecated(forRemoval = true)
default Egg getEgg() {
return this.getEntity();
public Egg getEgg() {
return this.egg;
}
@Override
Egg getEntity();
/**
* Gets whether the egg is hatching or not. Will be what the server
* would've done without interaction.
*
* @return boolean Whether the egg is going to hatch or not
*/
boolean isHatching();
public boolean isHatching() {
return this.hatching;
}
/**
* Sets whether the egg will hatch or not.
@@ -41,7 +56,28 @@ public interface ThrownEggHatchEvent extends EntityEvent {
* @param hatching {@code true} if you want the egg to hatch, {@code false} if you want it
* not to
*/
void setHatching(boolean hatching);
public void setHatching(final boolean hatching) {
this.hatching = hatching;
}
/**
* Get the type of the mob being hatched ({@link EntityType#CHICKEN} by default)
*
* @return The type of the mob being hatched by the egg
*/
public EntityType getHatchingType() {
return this.hatchType;
}
/**
* Change the type of mob being hatched by the egg
*
* @param hatchType The type of the mob being hatched by the egg
*/
public void setHatchingType(final EntityType hatchType) {
Preconditions.checkArgument(hatchType.isSpawnable(), "Can't spawn that entity type from an egg!");
this.hatchType = hatchType;
}
/**
* Get the number of mob hatches from the egg. By default, the number will
@@ -54,7 +90,9 @@ public interface ThrownEggHatchEvent extends EntityEvent {
*
* @return The number of mobs going to be hatched by the egg
*/
@NonNegative byte getNumHatches();
public byte getNumHatches() {
return this.numHatches;
}
/**
* Change the number of mobs coming out of the hatched egg
@@ -64,26 +102,16 @@ public interface ThrownEggHatchEvent extends EntityEvent {
*
* @param numHatches The number of mobs coming out of the egg
*/
void setNumHatches(@NonNegative byte numHatches);
public void setNumHatches(final byte numHatches) {
this.numHatches = numHatches;
}
/**
* Get the type of the mob being hatched ({@link EntityType#CHICKEN} by default)
*
* @return The type of the mob being hatched by the egg
*/
EntityType getHatchingType();
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
/**
* Change the type of mob being hatched by the egg
*
* @param hatchType The type of the mob being hatched by the egg
*/
void setHatchingType(EntityType hatchType);
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -4,11 +4,23 @@ import org.bukkit.entity.Turtle;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when a Turtle decides to go home
*/
public interface TurtleGoHomeEvent extends EntityEvent, Cancellable {
@NullMarked
public class TurtleGoHomeEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private boolean cancelled;
@ApiStatus.Internal
public TurtleGoHomeEvent(final Turtle turtle) {
super(turtle);
}
/**
* The turtle going home
@@ -16,12 +28,26 @@ public interface TurtleGoHomeEvent extends EntityEvent, Cancellable {
* @return The turtle
*/
@Override
Turtle getEntity();
public Turtle getEntity() {
return (Turtle) super.getEntity();
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -5,12 +5,28 @@ import org.bukkit.entity.Turtle;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.checkerframework.common.value.qual.IntRange;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when a Turtle lays eggs
*/
public interface TurtleLayEggEvent extends EntityEvent, Cancellable {
@NullMarked
public class TurtleLayEggEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final Location location;
private int eggCount;
private boolean cancelled;
@ApiStatus.Internal
public TurtleLayEggEvent(final Turtle turtle, final Location location, final int eggCount) {
super(turtle);
this.location = location;
this.eggCount = eggCount;
}
/**
* The turtle laying the eggs
@@ -18,33 +34,57 @@ public interface TurtleLayEggEvent extends EntityEvent, Cancellable {
* @return The turtle
*/
@Override
Turtle getEntity();
public Turtle getEntity() {
return (Turtle) super.getEntity();
}
/**
* Get the location where the eggs are being laid
*
* @return Location of eggs
*/
Location getLocation();
public Location getLocation() {
return this.location.clone();
}
/**
* Get the number of eggs being laid
*
* @return Number of eggs
*/
@IntRange(from = 1, to = 4) int getEggCount();
public int getEggCount() {
return this.eggCount;
}
/**
* Set the number of eggs being laid
*
* @param eggCount Number of eggs
*/
void setEggCount(@IntRange(from = 0, to = 4) int eggCount);
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
public void setEggCount(final int eggCount) {
if (eggCount < 1) {
this.cancelled = true;
return;
}
return Holder.HANDLER_LIST;
this.eggCount = Math.min(eggCount, 4);
}
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -5,11 +5,25 @@ import org.bukkit.entity.Turtle;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when a Turtle starts digging to lay eggs
*/
public interface TurtleStartDiggingEvent extends EntityEvent, Cancellable {
@NullMarked
public class TurtleStartDiggingEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final Location location;
private boolean cancelled;
@ApiStatus.Internal
public TurtleStartDiggingEvent(final Turtle turtle, final Location location) {
super(turtle);
this.location = location;
}
/**
* The turtle digging
@@ -17,19 +31,35 @@ public interface TurtleStartDiggingEvent extends EntityEvent, Cancellable {
* @return The turtle
*/
@Override
Turtle getEntity();
public Turtle getEntity() {
return (Turtle) super.getEntity();
}
/**
* Get the location where the turtle is digging
*
* @return Location where digging
*/
Location getLocation();
public Location getLocation() {
return this.location.clone();
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -5,38 +5,67 @@ import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
/**
* Fired when a witch consumes the potion in their hand to buff themselves.
*/
public interface WitchConsumePotionEvent extends EntityEvent, Cancellable {
@NullMarked
public class WitchConsumePotionEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private @Nullable ItemStack potion;
private boolean cancelled;
@ApiStatus.Internal
public WitchConsumePotionEvent(final Witch witch, final @Nullable ItemStack potion) {
super(witch);
this.potion = potion;
}
@Override
Witch getEntity();
public Witch getEntity() {
return (Witch) super.getEntity();
}
/**
* @return the potion the witch will consume and have the effects applied.
*/
@Nullable ItemStack getPotion();
public @Nullable ItemStack getPotion() {
return this.potion;
}
/**
* Sets the potion to be consumed and applied to the witch.
*
* @param potion The potion
*/
void setPotion(@Nullable ItemStack potion);
public void setPotion(final @Nullable ItemStack potion) {
this.potion = potion != null ? potion.clone() : null;
}
/**
* @return Event was cancelled or potion was {@code null}
*/
@Override
boolean isCancelled();
public boolean isCancelled() {
return this.cancelled || this.potion == null;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -5,29 +5,61 @@ import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
public interface WitchReadyPotionEvent extends EntityEvent, Cancellable {
@NullMarked
public class WitchReadyPotionEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private @Nullable ItemStack potion;
private boolean cancelled;
@ApiStatus.Internal
public WitchReadyPotionEvent(final Witch witch, final @Nullable ItemStack potion) {
super(witch);
this.potion = potion;
}
@Override
Witch getEntity();
public Witch getEntity() {
return (Witch) super.getEntity();
}
/**
* @return the potion the witch is readying to use
*/
@Nullable ItemStack getPotion();
public @Nullable ItemStack getPotion() {
return this.potion;
}
/**
* Sets the potion the which is going to hold and use
*
* @param potion The potion
*/
void setPotion(@Nullable ItemStack potion);
public void setPotion(final @Nullable ItemStack potion) {
this.potion = potion != null ? potion.clone() : null;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -6,43 +6,76 @@ import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
/**
* Fired when a witch throws a potion at a player
*/
public interface WitchThrowPotionEvent extends EntityEvent, Cancellable {
@NullMarked
public class WitchThrowPotionEvent extends EntityEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final LivingEntity target;
private @Nullable ItemStack potion;
private boolean cancelled;
@ApiStatus.Internal
public WitchThrowPotionEvent(final Witch witch, final LivingEntity target, final @Nullable ItemStack potion) {
super(witch);
this.target = target;
this.potion = potion;
}
@Override
Witch getEntity();
public Witch getEntity() {
return (Witch) super.getEntity();
}
/**
* @return The target of the potion
*/
LivingEntity getTarget();
public LivingEntity getTarget() {
return this.target;
}
/**
* @return The potion the witch will throw at a player
*/
@Nullable ItemStack getPotion();
public @Nullable ItemStack getPotion() {
return this.potion;
}
/**
* Sets the potion to be thrown at a player
*
* @param potion The potion
*/
void setPotion(@Nullable ItemStack potion);
public void setPotion(final @Nullable ItemStack potion) {
this.potion = potion != null ? potion.clone() : null;
}
/**
* @return Event was cancelled or potion was {@code null}
*/
@Override
boolean isCancelled();
public boolean isCancelled() {
return this.cancelled || this.potion == null;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,4 +0,0 @@
@NullMarked
package com.destroystokyo.paper.event.entity;
import org.jspecify.annotations.NullMarked;
@@ -2,7 +2,11 @@ package com.destroystokyo.paper.event.inventory;
import org.bukkit.Warning;
import org.bukkit.inventory.GrindstoneInventory;
import org.jspecify.annotations.NullMarked;
import org.bukkit.inventory.InventoryView;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Called when an item is put in a slot for grinding in a Grindstone
@@ -11,9 +15,17 @@ import org.jspecify.annotations.NullMarked;
*/
@Deprecated(since = "1.16.1")
@Warning
@NullMarked
public interface PrepareGrindstoneEvent extends PrepareResultEvent {
public class PrepareGrindstoneEvent extends PrepareResultEvent {
@ApiStatus.Internal
public PrepareGrindstoneEvent(@NotNull InventoryView inventory, @Nullable ItemStack result) {
super(inventory, result);
}
@NotNull
@Override
GrindstoneInventory getInventory();
public GrindstoneInventory getInventory() {
return (GrindstoneInventory) super.getInventory();
}
}
@@ -1,9 +1,42 @@
package com.destroystokyo.paper.event.inventory;
import org.bukkit.event.inventory.PrepareInventoryResultEvent;
import org.bukkit.inventory.InventoryView;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
/**
* Called when an item is put in an inventory containing a result slot
*/
public interface PrepareResultEvent extends PrepareInventoryResultEvent {
@NullMarked
public class PrepareResultEvent extends PrepareInventoryResultEvent {
// HandlerList on PrepareInventoryResultEvent to ensure api compat
@ApiStatus.Internal
public PrepareResultEvent(final InventoryView inventory, final @Nullable ItemStack result) {
super(inventory, result);
}
/**
* Get result item, may be {@code null}.
*
* @return result item
*/
@Override
public @Nullable ItemStack getResult() {
return super.getResult();
}
/**
* Set result item, may be {@code null}.
*
* @param result result item
*/
@Override
public void setResult(final @Nullable ItemStack result) {
super.setResult(result);
}
}
@@ -1,31 +1,67 @@
package com.destroystokyo.paper.event.player;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.jspecify.annotations.Nullable;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* @deprecated not called anymore
* @deprecated Not used
*/
@Deprecated(since = "1.16.4", forRemoval = true)
public interface IllegalPacketEvent extends PlayerEvent {
public class IllegalPacketEvent extends PlayerEvent {
boolean isShouldKick();
private static final HandlerList HANDLER_LIST = new HandlerList();
void setShouldKick(boolean shouldKick);
@Nullable private final String type;
@Nullable private final String exceptionMessage;
@Nullable private String kickMessage;
private boolean shouldKick = true;
@Nullable String getKickMessage();
@ApiStatus.Internal
public IllegalPacketEvent(@NotNull Player player, @Nullable String type, @Nullable String kickMessage, @NotNull Exception e) {
super(player);
this.type = type;
this.kickMessage = kickMessage;
this.exceptionMessage = e.getMessage();
}
void setKickMessage(@Nullable String kickMessage);
public boolean isShouldKick() {
return this.shouldKick;
}
@Nullable String getType();
public void setShouldKick(boolean shouldKick) {
this.shouldKick = shouldKick;
}
@Nullable String getExceptionMessage();
@Nullable
public String getKickMessage() {
return this.kickMessage;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
public void setKickMessage(@Nullable String kickMessage) {
this.kickMessage = kickMessage;
}
@Nullable
public String getType() {
return this.type;
}
@Nullable
public String getExceptionMessage() {
return this.exceptionMessage;
}
@NotNull
public HandlerList getHandlers() {
return HANDLER_LIST;
}
@NotNull
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -2,41 +2,79 @@ package com.destroystokyo.paper.event.player;
import org.bukkit.advancement.Advancement;
import org.bukkit.advancement.AdvancementProgress;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Called after a player is granted a criteria in an advancement.
* If cancelled the criteria will be revoked.
*/
public interface PlayerAdvancementCriterionGrantEvent extends PlayerEvent, Cancellable {
@NullMarked
public class PlayerAdvancementCriterionGrantEvent extends PlayerEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final Advancement advancement;
private final String criterion;
private final AdvancementProgress advancementProgress;
private boolean cancelled;
@ApiStatus.Internal
public PlayerAdvancementCriterionGrantEvent(final Player player, final Advancement advancement, final String criterion) {
super(player);
this.advancement = advancement;
this.criterion = criterion;
this.advancementProgress = player.getAdvancementProgress(advancement);
}
/**
* Get the advancement which has been affected.
*
* @return affected advancement
*/
Advancement getAdvancement();
public Advancement getAdvancement() {
return this.advancement;
}
/**
* Get the criterion which has been granted.
*
* @return granted criterion
*/
String getCriterion();
public String getCriterion() {
return this.criterion;
}
/**
* Gets the current {@link AdvancementProgress}.
* Gets the current AdvancementProgress.
*
* @return advancement progress
*/
AdvancementProgress getAdvancementProgress();
public AdvancementProgress getAdvancementProgress() {
return this.advancementProgress;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -2,11 +2,13 @@ package com.destroystokyo.paper.event.player;
import java.util.Set;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
import static org.bukkit.Material.*;
@@ -17,8 +19,23 @@ import static org.bukkit.Material.*;
* Not currently called for environmental factors though it <strong>MAY BE IN THE FUTURE</strong>
* @apiNote Use {@link io.papermc.paper.event.entity.EntityEquipmentChangedEvent} for all entity equipment changes
*/
@NullMarked
@ApiStatus.Obsolete(since = "1.21.4")
public interface PlayerArmorChangeEvent extends PlayerEvent {
public class PlayerArmorChangeEvent extends PlayerEvent {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final SlotType slotType;
private final ItemStack oldItem;
private final ItemStack newItem;
@ApiStatus.Internal
public PlayerArmorChangeEvent(final Player player, final SlotType slotType, final ItemStack oldItem, final ItemStack newItem) {
super(player);
this.slotType = slotType;
this.oldItem = oldItem;
this.newItem = newItem;
}
/**
* Gets the type of slot being altered.
@@ -27,41 +44,56 @@ public interface PlayerArmorChangeEvent extends PlayerEvent {
* @deprecated {@link SlotType} does not accurately represent what item types are valid in each slot. Use {@link #getSlot()} instead.
*/
@Deprecated(since = "1.21.4")
SlotType getSlotType();
public SlotType getSlotType() {
return this.slotType;
}
/**
* Gets the slot being altered.
*
* @return slot being altered
*/
EquipmentSlot getSlot();
public EquipmentSlot getSlot() {
return switch (this.slotType) {
case HEAD -> EquipmentSlot.HEAD;
case CHEST -> EquipmentSlot.CHEST;
case LEGS -> EquipmentSlot.LEGS;
case FEET -> EquipmentSlot.FEET;
};
}
/**
* Gets the existing item that's being replaced
*
* @return old item
*/
ItemStack getOldItem();
public ItemStack getOldItem() {
return this.oldItem;
}
/**
* Gets the new item that's replacing the old
*
* @return new item
*/
ItemStack getNewItem();
public ItemStack getNewItem() {
return this.newItem;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
/**
* @deprecated {@link SlotType} does not accurately represent what item types are valid in each slot.
*/
@Deprecated(since = "1.21.4")
enum SlotType {
public enum SlotType {
HEAD(COPPER_HELMET, NETHERITE_HELMET, DIAMOND_HELMET, GOLDEN_HELMET, IRON_HELMET, CHAINMAIL_HELMET, LEATHER_HELMET, CARVED_PUMPKIN, PLAYER_HEAD, SKELETON_SKULL, ZOMBIE_HEAD, CREEPER_HEAD, WITHER_SKELETON_SKULL, TURTLE_HELMET, DRAGON_HEAD, PIGLIN_HEAD),
CHEST(COPPER_CHESTPLATE, NETHERITE_CHESTPLATE, DIAMOND_CHESTPLATE, GOLDEN_CHESTPLATE, IRON_CHESTPLATE, CHAINMAIL_CHESTPLATE, LEATHER_CHESTPLATE, ELYTRA),
LEGS(COPPER_LEGGINGS, NETHERITE_LEGGINGS, DIAMOND_LEGGINGS, GOLDEN_LEGGINGS, IRON_LEGGINGS, CHAINMAIL_LEGGINGS, LEATHER_LEGGINGS),
@@ -1,35 +1,50 @@
package com.destroystokyo.paper.event.player;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Called when processing a player's attack on an entity when the player's attack strength cooldown is reset.
*
* @deprecated In modern Minecraft, this does not properly represent spear attacks and additionally does not
* cover the wide range of ways that the cooldown may be reset.
* <p>
* Additionally, the cancellation of event is misleading as the client will reset the cooldown manually.
* So there is no way for the server to control this.
* Called when processing a player's attack on an entity when the player's attack strength cooldown is reset
*/
@Deprecated(since = "26.1", forRemoval = true)
public interface PlayerAttackEntityCooldownResetEvent extends PlayerEvent, Cancellable {
@NullMarked
public class PlayerAttackEntityCooldownResetEvent extends PlayerEvent implements Cancellable {
/**
* Returns the entity attacked by the player
*
* @return the entity attacked by the player
*/
Entity getAttackedEntity();
private static final HandlerList HANDLER_LIST = new HandlerList();
private final Entity attackedEntity;
private final float cooledAttackStrength;
private boolean cancelled;
@ApiStatus.Internal
public PlayerAttackEntityCooldownResetEvent(final Player player, final Entity attackedEntity, final float cooledAttackStrength) {
super(player);
this.attackedEntity = attackedEntity;
this.cooledAttackStrength = cooledAttackStrength;
}
/**
* Get the value of the players cooldown attack strength when they initiated the attack
*
* @return returns the original player cooldown value
*/
float getCooledAttackStrength();
public float getCooledAttackStrength() {
return this.cooledAttackStrength;
}
/**
* Returns the entity attacked by the player
*
* @return the entity attacked by the player
*/
public Entity getAttackedEntity() {
return this.attackedEntity;
}
/**
* {@inheritDoc}
@@ -37,7 +52,9 @@ public interface PlayerAttackEntityCooldownResetEvent extends PlayerEvent, Cance
* If an attack cooldown event is cancelled, the players attack strength will remain at the same value instead of being reset.
*/
@Override
boolean isCancelled();
public boolean isCancelled() {
return this.cancelled;
}
/**
* {@inheritDoc}
@@ -45,12 +62,16 @@ public interface PlayerAttackEntityCooldownResetEvent extends PlayerEvent, Cance
* Cancelling this event will prevent the target player from having their cooldown reset from attacking this entity
*/
@Override
void setCancelled(boolean cancel);
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,57 +1,128 @@
package com.destroystokyo.paper.event.player;
import com.destroystokyo.paper.ClientOption;
import com.destroystokyo.paper.ClientOption.ChatVisibility;
import com.destroystokyo.paper.ClientOption.ParticleVisibility;
import com.destroystokyo.paper.SkinParts;
import java.util.Map;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.bukkit.inventory.MainHand;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Called when the player changes their client settings
*/
public interface PlayerClientOptionsChangeEvent extends PlayerEvent {
@NullMarked
public class PlayerClientOptionsChangeEvent extends PlayerEvent {
String getLocale();
private static final HandlerList HANDLER_LIST = new HandlerList();
boolean hasLocaleChanged();
private final String locale;
private final int viewDistance;
private final ChatVisibility chatVisibility;
private final boolean chatColors;
private final SkinParts skinparts;
private final MainHand mainHand;
private final boolean allowsServerListings;
private final boolean textFilteringEnabled;
private final ParticleVisibility particleVisibility;
int getViewDistance();
@ApiStatus.Internal
public PlayerClientOptionsChangeEvent(final Player player, final Map<ClientOption<?>, ?> options) {
super(player);
boolean hasViewDistanceChanged();
this.locale = (String) options.get(ClientOption.LOCALE);
this.viewDistance = (int) options.get(ClientOption.VIEW_DISTANCE);
this.chatVisibility = (ChatVisibility) options.get(ClientOption.CHAT_VISIBILITY);
this.chatColors = (boolean) options.get(ClientOption.CHAT_COLORS_ENABLED);
this.skinparts = (SkinParts) options.get(ClientOption.SKIN_PARTS);
this.mainHand = (MainHand) options.get(ClientOption.MAIN_HAND);
this.allowsServerListings = (boolean) options.get(ClientOption.ALLOW_SERVER_LISTINGS);
this.textFilteringEnabled = (boolean) options.get(ClientOption.TEXT_FILTERING_ENABLED);
this.particleVisibility = (ParticleVisibility) options.get(ClientOption.PARTICLE_VISIBILITY);
}
ChatVisibility getChatVisibility();
public String getLocale() {
return this.locale;
}
boolean hasChatVisibilityChanged();
public boolean hasLocaleChanged() {
return !this.locale.equals(this.player.getClientOption(ClientOption.LOCALE));
}
boolean hasChatColorsEnabled();
public int getViewDistance() {
return this.viewDistance;
}
boolean hasChatColorsEnabledChanged();
public boolean hasViewDistanceChanged() {
return this.viewDistance != this.player.getClientOption(ClientOption.VIEW_DISTANCE);
}
SkinParts getSkinParts();
public ChatVisibility getChatVisibility() {
return this.chatVisibility;
}
boolean hasSkinPartsChanged();
public boolean hasChatVisibilityChanged() {
return this.chatVisibility != this.player.getClientOption(ClientOption.CHAT_VISIBILITY);
}
MainHand getMainHand();
public boolean hasChatColorsEnabled() {
return this.chatColors;
}
boolean hasMainHandChanged();
public boolean hasChatColorsEnabledChanged() {
return this.chatColors != this.player.getClientOption(ClientOption.CHAT_COLORS_ENABLED);
}
boolean hasTextFilteringEnabled();
public SkinParts getSkinParts() {
return this.skinparts;
}
boolean hasTextFilteringChanged();
public boolean hasSkinPartsChanged() {
return this.skinparts.getRaw() != this.player.getClientOption(ClientOption.SKIN_PARTS).getRaw();
}
boolean allowsServerListings();
public MainHand getMainHand() {
return this.mainHand;
}
boolean hasAllowServerListingsChanged();
public boolean hasMainHandChanged() {
return this.mainHand != this.player.getClientOption(ClientOption.MAIN_HAND);
}
ParticleVisibility getParticleVisibility();
public boolean hasTextFilteringEnabled() {
return this.textFilteringEnabled;
}
boolean hasParticleVisibilityChanged();
public boolean hasTextFilteringChanged() {
return this.textFilteringEnabled != this.player.getClientOption(ClientOption.TEXT_FILTERING_ENABLED);
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
public boolean allowsServerListings() {
return this.allowsServerListings;
}
public boolean hasAllowServerListingsChanged() {
return this.allowsServerListings != this.player.getClientOption(ClientOption.ALLOW_SERVER_LISTINGS);
}
public ParticleVisibility getParticleVisibility() {
return this.particleVisibility;
}
public boolean hasParticleVisibilityChanged() {
return this.particleVisibility != this.player.getClientOption(ClientOption.PARTICLE_VISIBILITY);
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,14 +1,16 @@
package com.destroystokyo.paper.event.player;
import io.papermc.paper.event.connection.ConnectionEvent;
import java.net.InetAddress;
import java.util.UUID;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.AsyncPlayerPreLoginEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* <p>
* This event is invoked when a player has disconnected. It is guaranteed that,
* if the server is in online-mode, that the provided uuid and username have been
* validated.
@@ -32,27 +34,50 @@ import org.bukkit.event.player.PlayerQuitEvent;
* The event may be invoked asynchronously or synchronously. Plugins should check
* {@link Event#isAsynchronous()} and handle accordingly.
*/
public interface PlayerConnectionCloseEvent extends ConnectionEvent {
@NullMarked
public class PlayerConnectionCloseEvent extends Event {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final UUID playerUniqueId;
private final String playerName;
private final InetAddress ipAddress;
@ApiStatus.Internal
public PlayerConnectionCloseEvent(final UUID playerUniqueId, final String playerName, final InetAddress ipAddress, final boolean async) {
super(async);
this.playerUniqueId = playerUniqueId;
this.playerName = playerName;
this.ipAddress = ipAddress;
}
/**
* Returns the {@link UUID} of the player disconnecting.
* Returns the {@code UUID} of the player disconnecting.
*/
UUID getPlayerUniqueId();
public UUID getPlayerUniqueId() {
return this.playerUniqueId;
}
/**
* Returns the name of the player disconnecting.
*/
String getPlayerName();
public String getPlayerName() {
return this.playerName;
}
/**
* Returns the player's IP address.
*/
InetAddress getIpAddress();
public InetAddress getIpAddress() {
return this.ipAddress;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,56 +1,99 @@
package com.destroystokyo.paper.event.player;
import org.bukkit.entity.Firework;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Fired when a player boosts elytra flight with a firework
*/
public interface PlayerElytraBoostEvent extends PlayerEvent, Cancellable {
@NullMarked
public class PlayerElytraBoostEvent extends PlayerEvent implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final ItemStack itemStack;
private final Firework firework;
private boolean consume = true;
private final EquipmentSlot hand;
private boolean cancelled;
@ApiStatus.Internal
public PlayerElytraBoostEvent(final Player player, final ItemStack itemStack, final Firework firework, final EquipmentSlot hand) {
super(player);
this.itemStack = itemStack;
this.firework = firework;
this.hand = hand;
}
/**
* Get the firework itemstack used
*
* @return ItemStack of firework
*/
ItemStack getItemStack();
public ItemStack getItemStack() {
return this.itemStack;
}
/**
* Get the firework entity that was spawned
*
* @return Firework entity
*/
Firework getFirework();
public Firework getFirework() {
return this.firework;
}
/**
* Get whether to consume the firework or not
*
* @return {@code true} to consume
*/
boolean shouldConsume();
public boolean shouldConsume() {
return this.consume;
}
/**
* Set whether to consume the firework or not
*
* @param consume {@code true} to consume
*/
void setShouldConsume(boolean consume);
public void setShouldConsume(final boolean consume) {
this.consume = consume;
}
/**
* Gets the hand holding the firework used for boosting this player.
*
* @return interaction hand
*/
EquipmentSlot getHand();
public EquipmentSlot getHand() {
return this.hand;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public boolean isCancelled() {
return this.cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
@@ -1,10 +1,15 @@
package com.destroystokyo.paper.event.player;
import com.google.common.base.Preconditions;
import java.util.UUID;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.NamedTextColor;
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
/**
@@ -15,14 +20,44 @@ import org.jspecify.annotations.Nullable;
*
* <p>WARNING: TAMPERING WITH THIS EVENT CAN BE DANGEROUS</p>
*/
public interface PlayerHandshakeEvent extends Event, Cancellable {
@NullMarked
public class PlayerHandshakeEvent extends Event implements Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
private final String originalHandshake;
private final String originalSocketAddressHostname;
private @Nullable String serverHostname;
private @Nullable String socketAddressHostname;
private @Nullable UUID uniqueId;
private @Nullable String propertiesJson;
private boolean failed;
private Component failMessage = Component.text("If you wish to use IP forwarding, please enable it in your BungeeCord config as well!", NamedTextColor.YELLOW);
private boolean cancelled;
@Deprecated
@ApiStatus.Internal
public PlayerHandshakeEvent(final String originalHandshake, final boolean cancelled) {
this(originalHandshake, "127.0.0.1", cancelled);
}
@ApiStatus.Internal
public PlayerHandshakeEvent(final String originalHandshake, final String originalSocketAddressHostname, final boolean cancelled) {
super(true);
this.originalHandshake = originalHandshake;
this.originalSocketAddressHostname = originalSocketAddressHostname;
this.cancelled = cancelled;
}
/**
* Gets the original handshake string.
*
* @return the original handshake string
*/
String getOriginalHandshake();
public String getOriginalHandshake() {
return this.originalHandshake;
}
/**
* Gets the original socket address hostname.
@@ -32,7 +67,9 @@ public interface PlayerHandshakeEvent extends Event, Cancellable {
*
* @return the original socket address hostname
*/
String getOriginalSocketAddressHostname();
public String getOriginalSocketAddressHostname() {
return this.originalSocketAddressHostname;
}
/**
* Gets the server hostname string.
@@ -41,7 +78,9 @@ public interface PlayerHandshakeEvent extends Event, Cancellable {
*
* @return the server hostname string
*/
@Nullable String getServerHostname();
public @Nullable String getServerHostname() {
return this.serverHostname;
}
/**
* Sets the server hostname string.
@@ -50,7 +89,9 @@ public interface PlayerHandshakeEvent extends Event, Cancellable {
*
* @param serverHostname the server hostname string
*/
void setServerHostname(String serverHostname);
public void setServerHostname(final String serverHostname) {
this.serverHostname = serverHostname;
}
/**
* Gets the socket address hostname string.
@@ -59,7 +100,9 @@ public interface PlayerHandshakeEvent extends Event, Cancellable {
*
* @return the socket address hostname string
*/
@Nullable String getSocketAddressHostname();
public @Nullable String getSocketAddressHostname() {
return this.socketAddressHostname;
}
/**
* Sets the socket address hostname string.
@@ -68,21 +111,27 @@ public interface PlayerHandshakeEvent extends Event, Cancellable {
*
* @param socketAddressHostname the socket address hostname string
*/
void setSocketAddressHostname(String socketAddressHostname);
public void setSocketAddressHostname(final String socketAddressHostname) {
this.socketAddressHostname = socketAddressHostname;
}
/**
* Gets the unique id.
*
* @return the unique id
*/
@Nullable UUID getUniqueId();
public @Nullable UUID getUniqueId() {
return this.uniqueId;
}
/**
* Sets the unique id.
*
* @param uniqueId the unique id
*/
void setUniqueId(UUID uniqueId);
public void setUniqueId(final UUID uniqueId) {
this.uniqueId = uniqueId;
}
/**
* Gets the profile properties.
@@ -91,7 +140,9 @@ public interface PlayerHandshakeEvent extends Event, Cancellable {
*
* @return the profile properties, as JSON
*/
@Nullable String getPropertiesJson();
public @Nullable String getPropertiesJson() {
return this.propertiesJson;
}
/**
* Determines if authentication failed.
@@ -101,7 +152,9 @@ public interface PlayerHandshakeEvent extends Event, Cancellable {
*
* @return {@code true} if authentication failed, {@code false} otherwise
*/
boolean isFailed();
public boolean isFailed() {
return this.failed;
}
/**
* Sets if authentication failed and the client should be disconnected.
@@ -111,7 +164,9 @@ public interface PlayerHandshakeEvent extends Event, Cancellable {
*
* @param failed {@code true} if authentication failed, {@code false} otherwise
*/
void setFailed(boolean failed);
public void setFailed(final boolean failed) {
this.failed = failed;
}
/**
* Sets the profile properties.
@@ -120,21 +175,27 @@ public interface PlayerHandshakeEvent extends Event, Cancellable {
*
* @param propertiesJson the profile properties, as JSON
*/
void setPropertiesJson(String propertiesJson);
public void setPropertiesJson(final String propertiesJson) {
this.propertiesJson = propertiesJson;
}
/**
* Gets the message to display to the client when authentication fails.
*
* @return the message to display to the client
*/
Component failMessage();
public Component failMessage() {
return this.failMessage;
}
/**
* Sets the message to display to the client when authentication fails.
*
* @param failMessage the message to display to the client
*/
void failMessage(Component failMessage);
public void failMessage(final Component failMessage) {
this.failMessage = failMessage;
}
/**
* Gets the message to display to the client when authentication fails.
@@ -143,7 +204,9 @@ public interface PlayerHandshakeEvent extends Event, Cancellable {
* @deprecated use {@link #failMessage()}
*/
@Deprecated
String getFailMessage();
public String getFailMessage() {
return LegacyComponentSerializer.legacySection().serialize(this.failMessage());
}
/**
* Sets the message to display to the client when authentication fails.
@@ -152,7 +215,10 @@ public interface PlayerHandshakeEvent extends Event, Cancellable {
* @deprecated use {@link #failMessage(Component)}
*/
@Deprecated
void setFailMessage(String failMessage);
public void setFailMessage(final String failMessage) {
Preconditions.checkArgument(failMessage != null && !failMessage.isEmpty(), "fail message cannot be null or empty");
this.failMessage(LegacyComponentSerializer.legacySection().deserialize(failMessage));
}
/**
* {@inheritDoc}
@@ -161,7 +227,9 @@ public interface PlayerHandshakeEvent extends Event, Cancellable {
* be processed.
*/
@Override
boolean isCancelled();
public boolean isCancelled() {
return this.cancelled;
}
/**
* {@inheritDoc}
@@ -170,12 +238,16 @@ public interface PlayerHandshakeEvent extends Event, Cancellable {
* be processed.
*/
@Override
void setCancelled(boolean cancel);
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
static HandlerList getHandlerList() {
final class Holder {
private static final HandlerList HANDLER_LIST = new HandlerList();
}
return Holder.HANDLER_LIST;
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
Loaded 100 of 2229 files, more files were not shown because too many files have changed in this diff. Show more