Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add RadiationDamageEvent to the api #4225

Merged
merged 7 commits into from
Sep 6, 2024
Merged

Conversation

1vers1on
Copy link
Contributor

@1vers1on 1vers1on commented Aug 22, 2024

Description

Adds a RadiationDamageEvent so that addons can cancel radiation damage.

Proposed changes

Add an event that is called when the player takes radiation damga

Related Issues (if applicable)

Checklist

  • I have fully tested the proposed changes and promise that they will not break everything into chaos.
  • I have also tested the proposed changes in combination with various popular addons and can confirm my changes do not break them.
  • I have made sure that the proposed changes do not break compatibility across the supported Minecraft versions (1.16.* - 1.20.*).
  • I followed the existing code standards and didn't mess up the formatting.
  • I did my best to add documentation to any public classes or methods I added.
  • I have added Nonnull and Nullable annotations to my methods to indicate their behaviour for null values
  • I added sufficient Unit Tests to cover my code.

@1vers1on 1vers1on requested a review from a team as a code owner August 22, 2024 20:44
Copy link
Contributor

Pro Tip!
You can help us label your Pull Requests by using the following branch naming convention next time you create a pull request. ❤️

Branch naming convention Label
feature/** 🎈 Feature
fix/** ✨ Fix
chore/** 🧹 Chores
api/** 🔧 API
performance/** 💡 Performance Optimization
compatibility/** 🤝 Compatibility

If your changes do not fall into any of these categories, don't worry. You can just ignore this message in that case! 👀

private static final HandlerList handlers = new HandlerList();

private final Player player;
private int exposure;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't final so I assume it's meant to be mutable, but I don't see a setExposure method

@JustAHuman-xD JustAHuman-xD added the 🔧 API This Pull Request introduces API changes. label Aug 23, 2024
@JustAHuman-xD JustAHuman-xD self-assigned this Aug 23, 2024
Copy link
Contributor

github-actions bot commented Aug 23, 2024

Slimefun preview build

A Slimefun preview build is available for testing!
Commit: 104c0b6

https://preview-builds.walshy.dev/download/Slimefun/4225/104c0b6d

Note: This is not a supported build and is only here for the purposes of testing.
Do not run this on a live server and do not report bugs anywhere but this PR!

JustAHuman-xD
JustAHuman-xD previously approved these changes Aug 23, 2024
Copy link
Contributor

@JustAHuman-xD JustAHuman-xD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good addition

@JustAHuman-xD
Copy link
Contributor

Might be worth changing it to be per symptom but idk

J3fftw1
J3fftw1 previously approved these changes Aug 25, 2024
Copy link
Contributor

@J3fftw1 J3fftw1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
Nice addition.

…n/tasks/armor/RadiationTask.java

Co-authored-by: J3fftw <[email protected]>
@1vers1on 1vers1on dismissed stale reviews from J3fftw1 and JustAHuman-xD via f93f0b3 August 26, 2024 15:42
Copy link
Contributor

@JustAHuman-xD JustAHuman-xD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Sfiguz7 Sfiguz7 merged commit f1363ce into Slimefun:master Sep 6, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔧 API This Pull Request introduces API changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants