-
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
9ce401e
commit 92556f8
Showing
6 changed files
with
43 additions
and
5 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
src/main/java/com/fortlisa/mythicsk/skript/activemob/expressions/ExprGetEntity.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,38 @@ | ||
package com.fortlisa.mythicsk.skript.activemob.expressions; | ||
|
||
import ch.njol.skript.doc.Description; | ||
import ch.njol.skript.doc.Examples; | ||
import ch.njol.skript.doc.Name; | ||
import ch.njol.skript.expressions.base.SimplePropertyExpression; | ||
import io.lumine.mythic.core.mobs.ActiveMob; | ||
import org.bukkit.Bukkit; | ||
import org.bukkit.entity.Entity; | ||
|
||
@Name("caster") | ||
@Description({ | ||
"Get the entity from the activemob. Returns a skript entity." | ||
}) | ||
@Examples({ | ||
"set {_activeMob} to spawn mythicmob \"Gouliath\" at location of player", | ||
"\nset {_mob} to entity of {_activeMob}" | ||
}) | ||
public class ExprGetEntity extends SimplePropertyExpression<ActiveMob, Entity> { | ||
static { | ||
register(ExprGetEntity.class, Entity.class, "entity", "activemob"); | ||
} | ||
|
||
@Override | ||
public Entity convert(ActiveMob activeMob) { | ||
return activeMob.getEntity().getBukkitEntity(); | ||
} | ||
|
||
@Override | ||
protected String getPropertyName() { | ||
return "entity"; | ||
} | ||
|
||
@Override | ||
public Class<? extends Entity> getReturnType() { | ||
return Entity.class; | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...ript/skill/expressions/ExprGetCaster.java → .../skilldata/expressions/ExprGetCaster.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
2 changes: 1 addition & 1 deletion
2
...ill/expressions/ExprGetEntityTargets.java → ...ata/expressions/ExprGetEntityTargets.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
2 changes: 1 addition & 1 deletion
2
...pt/skill/expressions/ExprGetMetadata.java → ...killdata/expressions/ExprGetMetadata.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
2 changes: 1 addition & 1 deletion
2
...l/expressions/ExprGetTargetLocations.java → ...a/expressions/ExprGetTargetLocations.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
2 changes: 1 addition & 1 deletion
2
...ipt/skill/expressions/ExprGetTrigger.java → ...skilldata/expressions/ExprGetTrigger.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