Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Efnilite committed Sep 22, 2024
1 parent f0a12da commit 987ff80
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 32 deletions.
5 changes: 2 additions & 3 deletions src/main/java/ch/njol/skript/conditions/CondCanAge.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import org.bukkit.entity.LivingEntity;

@Name("Can Age")
@Description("Returns whether or not an entity will be able to age/grow up.")
@Description("Checks whether or not an entity will be able to age/grow up.")
@Examples({
"on breeding:",
"\tentity can't age",
Expand All @@ -20,8 +20,7 @@
public class CondCanAge extends PropertyCondition<LivingEntity> {

static {
if (Skript.classExists("org.bukkit.entity.Breedable"))
register(CondCanAge.class, PropertyType.CAN, "age", "livingentities");
register(CondCanAge.class, PropertyType.CAN, "age", "livingentities");
}

@Override
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/ch/njol/skript/conditions/CondCanBreed.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import org.bukkit.entity.LivingEntity;

@Name("Can Breed")
@Description("Returns whether or not a living entity can be bred.")
@Description("Checks whether or not a living entity can be bred.")
@Examples({
"on right click on living entity:",
"\tevent-entity can't breed",
Expand All @@ -20,8 +20,7 @@
public class CondCanBreed extends PropertyCondition<LivingEntity> {

static {
if (Skript.classExists("org.bukkit.entity.Breedable"))
register(CondCanBreed.class, PropertyType.CAN, "breed", "livingentities");
register(CondCanBreed.class, PropertyType.CAN, "breed", "livingentities");
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ch/njol/skript/conditions/CondIsAdult.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import org.bukkit.entity.LivingEntity;

@Name("Is Adult")
@Description("Returns whether or not a living entity is an adult.")
@Description("Checks whether or not a living entity is an adult.")
@Examples({
"on drink:",
"\tevent-entity is not an adult",
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ch/njol/skript/conditions/CondIsBaby.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import org.bukkit.entity.LivingEntity;

@Name("Is Baby")
@Description("Returns whether or not a living entity is a baby.")
@Description("Checks whether or not a living entity is a baby.")
@Examples({
"on drink:",
"\tevent-entity is a baby",
Expand Down
15 changes: 7 additions & 8 deletions src/main/java/ch/njol/skript/effects/EffAllowAging.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@
public class EffAllowAging extends Effect {

static {
if (Skript.classExists("org.bukkit.entity.Breedable"))
Skript.registerEffect(EffAllowAging.class,
"lock age of %livingentities%",
"prevent aging of %livingentities%",
"prevent %livingentities% from aging",
"unlock age of %livingentities%",
"allow aging of %livingentities%",
"allow %livingentities% to age");
Skript.registerEffect(EffAllowAging.class,
"lock age of %livingentities%",
"prevent aging of %livingentities%",
"prevent %livingentities% from aging",
"unlock age of %livingentities%",
"allow aging of %livingentities%",
"allow %livingentities% to age");
}

private boolean unlock;
Expand Down
11 changes: 5 additions & 6 deletions src/main/java/ch/njol/skript/effects/EffBreedable.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,11 @@
public class EffBreedable extends Effect {

static {
if (Skript.classExists("org.bukkit.entity.Breedable"))
Skript.registerEffect(EffBreedable.class,
"make %livingentities% breedable",
"unsterilize %livingentities%",
"make %livingentities% (not |non(-| )|un)breedable",
"sterilize %livingentities%");
Skript.registerEffect(EffBreedable.class,
"make %livingentities% breedable",
"unsterilize %livingentities%",
"make %livingentities% (not |non(-| )|un)breedable",
"sterilize %livingentities%");
}

private boolean sterilize;
Expand Down
17 changes: 7 additions & 10 deletions src/main/java/ch/njol/skript/events/SimpleEvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -739,16 +739,13 @@ public class SimpleEvents {
"\tsend \"When a %breeding mother% and %breeding father% love each other they make %offspring%\" to breeder"
)
.since("INSERT VERSION");
if (Skript.classExists("org.bukkit.event.entity.EntityEnterLoveModeEvent")) {
Skript.registerEvent("Love Mode Enter", SimpleEvent.class, EntityEnterLoveModeEvent.class, "[entity] enter[s] love mode", "[entity] love mode [enter]")
.description("Called whenever an entity enters a state of being in love.")
.examples(
"on love mode enter:",
"\tcancel event # No one is allowed love here"
)
.since("INSERT VERSION")
.requiredPlugins("MC 1.16+");
}
Skript.registerEvent("Love Mode Enter", SimpleEvent.class, EntityEnterLoveModeEvent.class, "[entity] enter[s] love mode", "[entity] love mode [enter]")
.description("Called whenever an entity enters a state of being in love.")
.examples(
"on love mode enter:",
"\tcancel event # No one is allowed love here"
)
.since("INSERT VERSION");

Skript.registerEvent("Player Pickup Arrow", SimpleEvent.class, PlayerPickupArrowEvent.class, "[player] (pick[ing| ]up [an] arrow|arrow pick[ing| ]up)")
.description("Called when a player picks up an arrow from the ground.")
Expand Down

0 comments on commit 987ff80

Please sign in to comment.