-
Notifications
You must be signed in to change notification settings - Fork 71
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
bf4419a
commit 566f8c7
Showing
7 changed files
with
148 additions
and
0 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
8 changes: 8 additions & 0 deletions
8
src/main/java/com/laytonsmith/abstraction/enums/MCUnleashReason.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,8 @@ | ||
package com.laytonsmith.abstraction.enums; | ||
|
||
public enum MCUnleashReason { | ||
HOLDER_GONE, | ||
PLAYER_UNLEASH, | ||
DISTANCE, | ||
UNKNOWN | ||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/com/laytonsmith/abstraction/enums/bukkit/BukkitMCUnleashReason.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,24 @@ | ||
package com.laytonsmith.abstraction.enums.bukkit; | ||
|
||
import com.laytonsmith.abstraction.Implementation; | ||
import com.laytonsmith.abstraction.enums.EnumConvertor; | ||
import com.laytonsmith.abstraction.enums.MCUnleashReason; | ||
import com.laytonsmith.annotations.abstractionenum; | ||
import org.bukkit.event.entity.EntityUnleashEvent.UnleashReason; | ||
|
||
@abstractionenum( | ||
implementation = Implementation.Type.BUKKIT, | ||
forAbstractEnum = MCUnleashReason.class, | ||
forConcreteEnum = UnleashReason.class | ||
) | ||
public class BukkitMCUnleashReason extends EnumConvertor<MCUnleashReason, UnleashReason> { | ||
|
||
private static BukkitMCUnleashReason instance; | ||
|
||
public static BukkitMCUnleashReason getConvertor() { | ||
if(instance == null) { | ||
instance = new BukkitMCUnleashReason(); | ||
} | ||
return instance; | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/main/java/com/laytonsmith/abstraction/events/MCEntityUnleashEvent.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,12 @@ | ||
package com.laytonsmith.abstraction.events; | ||
import com.laytonsmith.abstraction.MCEntity; | ||
import com.laytonsmith.abstraction.enums.MCUnleashReason; | ||
import com.laytonsmith.core.events.BindableEvent; | ||
|
||
public interface MCEntityUnleashEvent extends BindableEvent { | ||
|
||
MCEntity getEntity(); | ||
|
||
MCUnleashReason getReason(); | ||
|
||
} |
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