-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7a78f5a
commit a22fc36
Showing
61 changed files
with
400 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
api/src/main/java/kr/toxicity/healthbar/api/condition/HealthBarCondition.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
api/src/main/java/kr/toxicity/healthbar/api/event/HealthBarCreateEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package kr.toxicity.healthbar.api.event; | ||
|
||
import kr.toxicity.healthbar.api.entity.HealthBarEntity; | ||
import kr.toxicity.healthbar.api.healthbar.HealthBar; | ||
import kr.toxicity.healthbar.api.player.HealthBarPlayer; | ||
import kr.toxicity.healthbar.api.trigger.HealthBarTrigger; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import org.bukkit.event.Cancellable; | ||
import org.bukkit.event.Event; | ||
import org.bukkit.event.HandlerList; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
@Getter | ||
@Setter | ||
public class HealthBarCreateEvent extends Event implements Cancellable { | ||
|
||
private static final HandlerList HANDLER_LIST = new HandlerList(); | ||
|
||
private final @NotNull HealthBar healthBar; | ||
private final @NotNull HealthBarTrigger trigger; | ||
private final @NotNull HealthBarPlayer player; | ||
private final @NotNull HealthBarEntity entity; | ||
|
||
private boolean cancelled; | ||
|
||
public HealthBarCreateEvent(@NotNull HealthBar healthBar, @NotNull HealthBarTrigger trigger, @NotNull HealthBarPlayer player, @NotNull HealthBarEntity entity) { | ||
super(true); | ||
this.healthBar = healthBar; | ||
this.trigger = trigger; | ||
this.player = player; | ||
this.entity = entity; | ||
} | ||
|
||
@Override | ||
public @NotNull HandlerList getHandlers() { | ||
return HANDLER_LIST; | ||
} | ||
|
||
public static @NotNull HandlerList getHandlerList() { | ||
return HANDLER_LIST; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 0 additions & 14 deletions
14
api/src/main/java/kr/toxicity/healthbar/api/healthbar/HealthBarData.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
api/src/main/java/kr/toxicity/healthbar/api/listener/HealthBarListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
package kr.toxicity.healthbar.api.listener; | ||
|
||
import kr.toxicity.healthbar.api.healthbar.HealthBarData; | ||
import kr.toxicity.healthbar.api.event.HealthBarCreateEvent; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public interface HealthBarListener { | ||
HealthBarListener ZERO = e -> 0; | ||
HealthBarListener INVALID = e -> -1; | ||
|
||
double value(@NotNull HealthBarData entity); | ||
double value(@NotNull HealthBarCreateEvent entity); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
api/src/main/java/kr/toxicity/healthbar/api/placeholder/HealthBarPlaceholder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
api/src/main/java/kr/toxicity/healthbar/api/scheduler/WrappedTask.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
package kr.toxicity.healthbar.api.scheduler; | ||
|
||
@FunctionalInterface | ||
public interface WrappedTask { | ||
void cancel(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.