-
Notifications
You must be signed in to change notification settings - Fork 0
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
38cfcaa
commit 52309e0
Showing
13 changed files
with
112 additions
and
80 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
api/src/main/java/com/redmagic/undefinedapi/customEvents/EntityMoveEvent.kt
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.redmagic.undefinedapi.customEvents | ||
|
||
import com.redmagic.undefinedapi.event.UndefinedEvent | ||
import org.bukkit.Location | ||
import org.bukkit.entity.Entity | ||
|
||
class EntityMoveEvent(val entity: Entity, val newLocation: Location): UndefinedEvent() { | ||
} |
8 changes: 4 additions & 4 deletions
8
api/src/main/java/com/redmagic/undefinedapi/customEvents/FireEvents.kt
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,19 +1,19 @@ | ||
package com.redmagic.undefinedapi.customEvents | ||
|
||
import com.redmagic.undefinedapi.event.UndefinedEvent | ||
import org.bukkit.entity.Player | ||
import org.bukkit.entity.Entity | ||
|
||
/** | ||
* Represents an event that is triggered when a player is ignited. | ||
* | ||
* @property player The player that is ignited. | ||
* @constructor Creates a new instance of [PlayerIgniteEvent]. | ||
* @constructor Creates a new instance of [EntityIgniteEvent]. | ||
*/ | ||
class PlayerIgniteEvent(val player: Player): UndefinedEvent() | ||
class EntityIgniteEvent(val entity: Entity): UndefinedEvent() | ||
|
||
/** | ||
* Represents a PlayerExtinguishEvent that is triggered when a player's fire is extinguished. | ||
* | ||
* @property player The player affected by the extinguish event. | ||
*/ | ||
class PlayerExtinguishEvent(val player: Player): UndefinedEvent() | ||
class EntityExtinguishEvent(val entity: Entity): UndefinedEvent() |
49 changes: 0 additions & 49 deletions
49
api/src/main/java/com/redmagic/undefinedapi/customEvents/PlayerMoveEvent.kt
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
4 changes: 3 additions & 1 deletion
4
api/src/main/java/com/redmagic/undefinedapi/nms/extensions/AnyExtensions.kt
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,3 +1,5 @@ | ||
package com.redmagic.undefinedapi.nms.extensions | ||
|
||
fun <T : Any> Any.getPrivateField(fieldName: String): T = javaClass.getDeclaredField(fieldName).apply { isAccessible = true }[this] as T | ||
fun <T : Any> Any.getPrivateField(fieldName: String): T = javaClass.getDeclaredField(fieldName).apply { isAccessible = true }[this] as T | ||
|
||
fun <T : Any> Any.getPrivateFieldFromSuper(fieldName: String): T = javaClass.superclass.getDeclaredField(fieldName).apply { isAccessible = true }[this] as T |
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
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