-
Notifications
You must be signed in to change notification settings - Fork 546
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
Conversation
Pro Tip!
If your changes do not fall into any of these categories, don't worry. You can just ignore this message in that case! 👀 |
src/main/java/io/github/thebusybiscuit/slimefun4/api/events/RadiationDamageEvent.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/api/events/RadiationDamageEvent.java
Outdated
Show resolved
Hide resolved
private static final HandlerList handlers = new HandlerList(); | ||
|
||
private final Player player; | ||
private int exposure; |
There was a problem hiding this comment.
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
Slimefun preview buildA Slimefun preview build is available for testing! https://preview-builds.walshy.dev/download/Slimefun/4225/104c0b6d
|
…diationDamageEvent.java Co-authored-by: JustAHuman-xD <[email protected]>
…diationDamageEvent.java Co-authored-by: JustAHuman-xD <[email protected]>
src/main/java/io/github/thebusybiscuit/slimefun4/api/events/RadiationDamageEvent.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, good addition
Might be worth changing it to be per symptom but idk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Nice addition.
src/main/java/io/github/thebusybiscuit/slimefun4/implementation/tasks/armor/RadiationTask.java
Outdated
Show resolved
Hide resolved
…n/tasks/armor/RadiationTask.java Co-authored-by: J3fftw <[email protected]>
f93f0b3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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
Nonnull
andNullable
annotations to my methods to indicate their behaviour for null values