From 2cba27071645db16d545a0dd82f19fc19ce4ee05 Mon Sep 17 00:00:00 2001 From: Efnilite <35348263+Efnilite@users.noreply.github.com> Date: Tue, 21 Jan 2025 23:35:01 +0100 Subject: [PATCH] init commit --- .../skript/conditions/CondResourcePack.java | 17 ++++----- .../conditions/CondRespawnLocation.java | 9 ++--- .../njol/skript/conditions/CondWillHatch.java | 6 +--- .../njol/skript/effects/EffCancelDrops.java | 18 ++++------ .../njol/skript/effects/EffKeepInventory.java | 17 ++++----- .../njol/skript/effects/EffMakeEggHatch.java | 6 +--- .../effects/EffPlayerInfoVisibility.java | 16 +++------ .../expressions/ExprAbsorbedBlocks.java | 23 +++++------- .../expressions/ExprAppliedEnchantments.java | 17 ++++----- .../njol/skript/expressions/ExprAttacked.java | 29 +++++++-------- .../njol/skript/expressions/ExprAttacker.java | 24 +++++-------- .../njol/skript/expressions/ExprClicked.java | 35 ++++++++----------- .../njol/skript/expressions/ExprCommand.java | 21 +++++------ .../skript/expressions/ExprCommandSender.java | 11 ++---- .../ch/njol/skript/expressions/ExprDrops.java | 10 ++---- .../skript/expressions/ExprEnchantItem.java | 17 ++++----- .../expressions/ExprEnchantingExpCost.java | 15 +++----- .../expressions/ExprEnchantmentBonus.java | 15 +++----- .../expressions/ExprEnchantmentOffer.java | 28 ++++++--------- .../skript/expressions/ExprExperience.java | 2 +- .../expressions/ExprExplodedBlocks.java | 23 +++++------- .../expressions/ExprExplosionBlockYield.java | 15 +++----- .../expressions/ExprExplosionYield.java | 15 +++----- .../expressions/ExprFertilizedBlocks.java | 21 ++++------- .../skript/expressions/ExprFinalDamage.java | 15 +++----- .../skript/expressions/ExprHealAmount.java | 15 +++----- .../skript/expressions/ExprHealReason.java | 9 ++--- .../njol/skript/expressions/ExprHealth.java | 2 +- .../skript/expressions/ExprHoverList.java | 2 +- .../ch/njol/skript/expressions/ExprLevel.java | 17 ++++----- .../skript/expressions/ExprLevelProgress.java | 15 +++----- .../skript/expressions/ExprMaxHealth.java | 16 +++------ .../njol/skript/expressions/ExprMessage.java | 2 +- .../njol/skript/expressions/ExprPortal.java | 25 ++++++------- .../expressions/ExprProtocolVersion.java | 16 +++------ .../skript/expressions/ExprReadiedArrow.java | 8 ++--- .../skript/expressions/ExprSentCommands.java | 2 +- .../njol/skript/expressions/ExprWeather.java | 2 +- .../elements/ExprFurnaceEventItems.java | 2 +- .../furnace/elements/ExprFurnaceSlot.java | 8 ++--- 40 files changed, 198 insertions(+), 368 deletions(-) diff --git a/src/main/java/ch/njol/skript/conditions/CondResourcePack.java b/src/main/java/ch/njol/skript/conditions/CondResourcePack.java index 1d1c208766c..e88ee287974 100644 --- a/src/main/java/ch/njol/skript/conditions/CondResourcePack.java +++ b/src/main/java/ch/njol/skript/conditions/CondResourcePack.java @@ -1,20 +1,15 @@ package ch.njol.skript.conditions; -import org.bukkit.event.Event; -import org.bukkit.event.player.PlayerResourcePackStatusEvent; -import org.bukkit.event.player.PlayerResourcePackStatusEvent.Status; -import org.jetbrains.annotations.Nullable; - import ch.njol.skript.Skript; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.Since; +import ch.njol.skript.doc.*; import ch.njol.skript.lang.Condition; import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.SkriptParser.ParseResult; import ch.njol.util.Kleenean; +import org.bukkit.event.Event; +import org.bukkit.event.player.PlayerResourcePackStatusEvent; +import org.bukkit.event.player.PlayerResourcePackStatusEvent.Status; +import org.jetbrains.annotations.Nullable; @Name("Resource Pack") @Description("Checks state of the resource pack in a resource pack request response event.") @@ -22,7 +17,7 @@ " if the resource pack wasn't accepted:", " kick the player due to \"You have to install the resource pack to play in this server!\""}) @Since("2.4") -@Events("resource pack request response") +@Events("Resource Pack Request Response") public class CondResourcePack extends Condition { static { diff --git a/src/main/java/ch/njol/skript/conditions/CondRespawnLocation.java b/src/main/java/ch/njol/skript/conditions/CondRespawnLocation.java index 56199bea961..be80857a76b 100644 --- a/src/main/java/ch/njol/skript/conditions/CondRespawnLocation.java +++ b/src/main/java/ch/njol/skript/conditions/CondRespawnLocation.java @@ -1,12 +1,7 @@ package ch.njol.skript.conditions; import ch.njol.skript.Skript; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.RequiredPlugins; -import ch.njol.skript.doc.Since; +import ch.njol.skript.doc.*; import ch.njol.skript.lang.Condition; import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.SkriptParser.ParseResult; @@ -24,7 +19,7 @@ }) @RequiredPlugins("Minecraft 1.16+") @Since("2.7") -@Events("respawn") +@Events("Respawn") public class CondRespawnLocation extends Condition { static { diff --git a/src/main/java/ch/njol/skript/conditions/CondWillHatch.java b/src/main/java/ch/njol/skript/conditions/CondWillHatch.java index dfdc5d4854c..b66b12c2e1d 100644 --- a/src/main/java/ch/njol/skript/conditions/CondWillHatch.java +++ b/src/main/java/ch/njol/skript/conditions/CondWillHatch.java @@ -1,11 +1,7 @@ package ch.njol.skript.conditions; import ch.njol.skript.Skript; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.Since; +import ch.njol.skript.doc.*; import ch.njol.skript.lang.Condition; import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.SkriptParser.ParseResult; diff --git a/src/main/java/ch/njol/skript/effects/EffCancelDrops.java b/src/main/java/ch/njol/skript/effects/EffCancelDrops.java index 685b2d4e046..237b0f42ded 100644 --- a/src/main/java/ch/njol/skript/effects/EffCancelDrops.java +++ b/src/main/java/ch/njol/skript/effects/EffCancelDrops.java @@ -1,21 +1,15 @@ package ch.njol.skript.effects; -import org.bukkit.event.Event; -import org.bukkit.event.block.BlockBreakEvent; -import org.bukkit.event.entity.EntityDeathEvent; -import org.jetbrains.annotations.Nullable; - import ch.njol.skript.Skript; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.RequiredPlugins; -import ch.njol.skript.doc.Since; +import ch.njol.skript.doc.*; import ch.njol.skript.lang.Effect; import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.SkriptParser.ParseResult; import ch.njol.util.Kleenean; +import org.bukkit.event.Event; +import org.bukkit.event.block.BlockBreakEvent; +import org.bukkit.event.entity.EntityDeathEvent; +import org.jetbrains.annotations.Nullable; @Name("Cancel Drops") @Description("Cancels drops of items or experiences in a death or block break event. " + @@ -29,7 +23,7 @@ "\tcancel the experience drops"}) @Since("2.4") @RequiredPlugins("1.12.2 or newer (cancelling item drops of blocks)") -@Events({"death", "break / mine"}) +@Events({"Death", "Break / Mine"}) public class EffCancelDrops extends Effect { private static final boolean CAN_CANCEL_BLOCK_ITEM_DROPS = Skript.methodExists(BlockBreakEvent.class, "setDropItems", boolean.class); diff --git a/src/main/java/ch/njol/skript/effects/EffKeepInventory.java b/src/main/java/ch/njol/skript/effects/EffKeepInventory.java index 3ed179e28ba..ae60c23e309 100644 --- a/src/main/java/ch/njol/skript/effects/EffKeepInventory.java +++ b/src/main/java/ch/njol/skript/effects/EffKeepInventory.java @@ -1,20 +1,15 @@ package ch.njol.skript.effects; -import org.bukkit.event.Event; -import org.bukkit.event.entity.EntityDeathEvent; -import org.bukkit.event.entity.PlayerDeathEvent; -import org.jetbrains.annotations.Nullable; - import ch.njol.skript.Skript; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.Since; +import ch.njol.skript.doc.*; import ch.njol.skript.lang.Effect; import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.SkriptParser.ParseResult; import ch.njol.util.Kleenean; +import org.bukkit.event.Event; +import org.bukkit.event.entity.EntityDeathEvent; +import org.bukkit.event.entity.PlayerDeathEvent; +import org.jetbrains.annotations.Nullable; @Name("Keep Inventory / Experience") @Description("Keeps the inventory or/and experiences of the dead player in a death event.") @@ -24,7 +19,7 @@ "\t\tkeep the inventory and experiences" }) @Since("2.4") -@Events("death") +@Events("Death") public class EffKeepInventory extends Effect { static { diff --git a/src/main/java/ch/njol/skript/effects/EffMakeEggHatch.java b/src/main/java/ch/njol/skript/effects/EffMakeEggHatch.java index 44f10a91b99..9a75d297575 100644 --- a/src/main/java/ch/njol/skript/effects/EffMakeEggHatch.java +++ b/src/main/java/ch/njol/skript/effects/EffMakeEggHatch.java @@ -1,11 +1,7 @@ package ch.njol.skript.effects; import ch.njol.skript.Skript; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.Since; +import ch.njol.skript.doc.*; import ch.njol.skript.lang.Effect; import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.SkriptParser.ParseResult; diff --git a/src/main/java/ch/njol/skript/effects/EffPlayerInfoVisibility.java b/src/main/java/ch/njol/skript/effects/EffPlayerInfoVisibility.java index b07182bad1a..5538c7b634f 100644 --- a/src/main/java/ch/njol/skript/effects/EffPlayerInfoVisibility.java +++ b/src/main/java/ch/njol/skript/effects/EffPlayerInfoVisibility.java @@ -1,20 +1,14 @@ package ch.njol.skript.effects; -import org.bukkit.event.Event; -import org.jetbrains.annotations.Nullable; - -import com.destroystokyo.paper.event.server.PaperServerListPingEvent; import ch.njol.skript.Skript; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.RequiredPlugins; -import ch.njol.skript.doc.Since; +import ch.njol.skript.doc.*; import ch.njol.skript.lang.Effect; import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.SkriptParser.ParseResult; import ch.njol.util.Kleenean; +import com.destroystokyo.paper.event.server.PaperServerListPingEvent; +import org.bukkit.event.Event; +import org.jetbrains.annotations.Nullable; @Name("Player Info Visibility") @Description({"Sets whether all player related information is hidden in the server list.", @@ -28,7 +22,7 @@ "reveal all player related info"}) @Since("2.3") @RequiredPlugins("Paper 1.12.2 or newer") -@Events("server list ping") +@Events("Server List Ping") public class EffPlayerInfoVisibility extends Effect { static { diff --git a/src/main/java/ch/njol/skript/expressions/ExprAbsorbedBlocks.java b/src/main/java/ch/njol/skript/expressions/ExprAbsorbedBlocks.java index c436a0474c6..8c3ce542b9b 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprAbsorbedBlocks.java +++ b/src/main/java/ch/njol/skript/expressions/ExprAbsorbedBlocks.java @@ -1,19 +1,7 @@ package ch.njol.skript.expressions; -import java.util.Iterator; -import java.util.List; - -import org.bukkit.block.BlockState; -import org.bukkit.event.Event; -import org.bukkit.event.block.SpongeAbsorbEvent; -import org.jetbrains.annotations.Nullable; - import ch.njol.skript.Skript; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.Since; +import ch.njol.skript.doc.*; import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.ExpressionType; import ch.njol.skript.lang.SkriptParser.ParseResult; @@ -21,10 +9,17 @@ import ch.njol.skript.log.ErrorQuality; import ch.njol.skript.util.BlockStateBlock; import ch.njol.util.Kleenean; +import org.bukkit.block.BlockState; +import org.bukkit.event.Event; +import org.bukkit.event.block.SpongeAbsorbEvent; +import org.jetbrains.annotations.Nullable; + +import java.util.Iterator; +import java.util.List; @Name("Absorbed blocks") @Description("The blocks absorbed by a sponge block.") -@Events("sponge absorb") +@Events("Sponge Absorb") @Examples("the absorbed blocks") @Since("2.5") public class ExprAbsorbedBlocks extends SimpleExpression { diff --git a/src/main/java/ch/njol/skript/expressions/ExprAppliedEnchantments.java b/src/main/java/ch/njol/skript/expressions/ExprAppliedEnchantments.java index f2b0b79ee11..d107b3a9939 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprAppliedEnchantments.java +++ b/src/main/java/ch/njol/skript/expressions/ExprAppliedEnchantments.java @@ -1,17 +1,8 @@ package ch.njol.skript.expressions; -import org.bukkit.enchantments.Enchantment; -import org.bukkit.event.Event; -import org.bukkit.event.enchantment.EnchantItemEvent; -import org.jetbrains.annotations.Nullable; - import ch.njol.skript.Skript; import ch.njol.skript.classes.Changer.ChangeMode; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.Since; +import ch.njol.skript.doc.*; import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.ExpressionType; import ch.njol.skript.lang.SkriptParser.ParseResult; @@ -20,13 +11,17 @@ import ch.njol.skript.util.EnchantmentType; import ch.njol.util.Kleenean; import ch.njol.util.coll.CollectionUtils; +import org.bukkit.enchantments.Enchantment; +import org.bukkit.event.Event; +import org.bukkit.event.enchantment.EnchantItemEvent; +import org.jetbrains.annotations.Nullable; @Name("Applied Enchantments") @Description({"The applied enchantments in an enchant event.", " Deleting or removing the applied enchantments will prevent the item's enchantment."}) @Examples({"on enchant:", "\tset the applied enchantments to sharpness 10 and fire aspect 5"}) -@Events("enchant") +@Events("Enchant") @Since("2.5") public class ExprAppliedEnchantments extends SimpleExpression { diff --git a/src/main/java/ch/njol/skript/expressions/ExprAttacked.java b/src/main/java/ch/njol/skript/expressions/ExprAttacked.java index 5b2ed4e51cb..32f90c16e47 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprAttacked.java +++ b/src/main/java/ch/njol/skript/expressions/ExprAttacked.java @@ -1,8 +1,16 @@ package ch.njol.skript.expressions; -import java.lang.reflect.Array; - +import ch.njol.skript.Skript; +import ch.njol.skript.doc.*; +import ch.njol.skript.entity.EntityData; import ch.njol.skript.lang.EventRestrictedSyntax; +import ch.njol.skript.lang.Expression; +import ch.njol.skript.lang.ExpressionType; +import ch.njol.skript.lang.SkriptParser.ParseResult; +import ch.njol.skript.lang.util.SimpleExpression; +import ch.njol.skript.log.ErrorQuality; +import ch.njol.skript.registrations.Classes; +import ch.njol.util.Kleenean; import ch.njol.util.coll.CollectionUtils; import org.bukkit.entity.Entity; import org.bukkit.event.Event; @@ -15,20 +23,7 @@ import org.bukkit.event.vehicle.VehicleEvent; import org.jetbrains.annotations.Nullable; -import ch.njol.skript.Skript; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.Since; -import ch.njol.skript.entity.EntityData; -import ch.njol.skript.lang.Expression; -import ch.njol.skript.lang.ExpressionType; -import ch.njol.skript.lang.SkriptParser.ParseResult; -import ch.njol.skript.lang.util.SimpleExpression; -import ch.njol.skript.log.ErrorQuality; -import ch.njol.skript.registrations.Classes; -import ch.njol.util.Kleenean; +import java.lang.reflect.Array; @Name("Attacked") @Description("The victim of a damage event, e.g. when a player attacks a zombie this expression represents the zombie. " + @@ -37,7 +32,7 @@ "\tvictim is a creeper", "\tdamage the attacked by 1 heart"}) @Since("1.3, 2.6.1 (projectile hit event)") -@Events({"damage", "death", "projectile hit"}) +@Events({"Damage", "Death", "Projectile hit"}) public class ExprAttacked extends SimpleExpression implements EventRestrictedSyntax { private static final boolean SUPPORT_PROJECTILE_HIT = Skript.methodExists(ProjectileHitEvent.class, "getHitEntity"); diff --git a/src/main/java/ch/njol/skript/expressions/ExprAttacker.java b/src/main/java/ch/njol/skript/expressions/ExprAttacker.java index bf1e6d9f20e..5398198e94a 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprAttacker.java +++ b/src/main/java/ch/njol/skript/expressions/ExprAttacker.java @@ -1,6 +1,14 @@ package ch.njol.skript.expressions; +import ch.njol.skript.Skript; +import ch.njol.skript.doc.*; import ch.njol.skript.lang.EventRestrictedSyntax; +import ch.njol.skript.lang.Expression; +import ch.njol.skript.lang.ExpressionType; +import ch.njol.skript.lang.SkriptParser.ParseResult; +import ch.njol.skript.lang.util.SimpleExpression; +import ch.njol.skript.registrations.Classes; +import ch.njol.util.Kleenean; import ch.njol.util.coll.CollectionUtils; import org.bukkit.entity.Entity; import org.bukkit.entity.Projectile; @@ -12,20 +20,6 @@ import org.bukkit.event.vehicle.VehicleDestroyEvent; import org.jetbrains.annotations.Nullable; -import ch.njol.skript.Skript; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.Since; -import ch.njol.skript.lang.Expression; -import ch.njol.skript.lang.ExpressionType; -import ch.njol.skript.lang.SkriptParser.ParseResult; -import ch.njol.skript.lang.util.SimpleExpression; -import ch.njol.skript.log.ErrorQuality; -import ch.njol.skript.registrations.Classes; -import ch.njol.util.Kleenean; - /** * @author Peter Güttinger */ @@ -37,7 +31,7 @@ " health of attacker is less than or equal to 2", " damage victim by 1 heart"}) @Since("1.3") -@Events({"damage", "death", "destroy"}) +@Events({"Damage", "Death", "Destroy"}) public class ExprAttacker extends SimpleExpression implements EventRestrictedSyntax { static { diff --git a/src/main/java/ch/njol/skript/expressions/ExprClicked.java b/src/main/java/ch/njol/skript/expressions/ExprClicked.java index 536da33b70f..16705a91cdb 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprClicked.java +++ b/src/main/java/ch/njol/skript/expressions/ExprClicked.java @@ -1,7 +1,18 @@ package ch.njol.skript.expressions; -import java.lang.reflect.Array; - +import ch.njol.skript.Skript; +import ch.njol.skript.aliases.ItemType; +import ch.njol.skript.doc.*; +import ch.njol.skript.entity.EntityData; +import ch.njol.skript.lang.Expression; +import ch.njol.skript.lang.ExpressionType; +import ch.njol.skript.lang.Literal; +import ch.njol.skript.lang.SkriptParser.ParseResult; +import ch.njol.skript.lang.util.SimpleExpression; +import ch.njol.skript.util.slot.InventorySlot; +import ch.njol.skript.util.slot.Slot; +import ch.njol.util.Kleenean; +import ch.njol.util.coll.CollectionUtils; import org.bukkit.block.Block; import org.bukkit.entity.Entity; import org.bukkit.event.Event; @@ -15,23 +26,7 @@ import org.bukkit.inventory.Inventory; import org.jetbrains.annotations.Nullable; -import ch.njol.skript.Skript; -import ch.njol.skript.aliases.ItemType; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.Since; -import ch.njol.skript.entity.EntityData; -import ch.njol.skript.lang.Expression; -import ch.njol.skript.lang.ExpressionType; -import ch.njol.skript.lang.Literal; -import ch.njol.skript.lang.SkriptParser.ParseResult; -import ch.njol.skript.lang.util.SimpleExpression; -import ch.njol.skript.util.slot.InventorySlot; -import ch.njol.skript.util.slot.Slot; -import ch.njol.util.Kleenean; -import ch.njol.util.coll.CollectionUtils; +import java.lang.reflect.Array; @Name("Clicked Block/Entity/Inventory/Slot") @Description("The clicked block, entity, inventory, inventory slot, inventory click type or inventory action.") @@ -41,7 +36,7 @@ "\tshow the inventory of the clicked block to the player" }) @Since("1.0, 2.2-dev35 (more clickable things)") -@Events({"click", "inventory click"}) +@Events({"Click", "Inventory Click"}) public class ExprClicked extends SimpleExpression { private static enum ClickableType { diff --git a/src/main/java/ch/njol/skript/expressions/ExprCommand.java b/src/main/java/ch/njol/skript/expressions/ExprCommand.java index 8cb71f77e34..18f6dc5b7ba 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprCommand.java +++ b/src/main/java/ch/njol/skript/expressions/ExprCommand.java @@ -1,24 +1,19 @@ package ch.njol.skript.expressions; +import ch.njol.skript.Skript; import ch.njol.skript.command.ScriptCommandEvent; +import ch.njol.skript.doc.*; import ch.njol.skript.lang.EventRestrictedSyntax; -import ch.njol.util.coll.CollectionUtils; -import org.bukkit.event.Event; -import org.bukkit.event.player.PlayerCommandPreprocessEvent; -import org.bukkit.event.server.ServerCommandEvent; -import org.jetbrains.annotations.Nullable; - -import ch.njol.skript.Skript; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.Since; import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.ExpressionType; import ch.njol.skript.lang.SkriptParser.ParseResult; import ch.njol.skript.lang.util.SimpleExpression; import ch.njol.util.Kleenean; +import ch.njol.util.coll.CollectionUtils; +import org.bukkit.event.Event; +import org.bukkit.event.player.PlayerCommandPreprocessEvent; +import org.bukkit.event.server.ServerCommandEvent; +import org.jetbrains.annotations.Nullable; /** * @author Peter Güttinger @@ -32,7 +27,7 @@ "\t\t\tmessage \"You're not allowed to use commands during the game\"", "\t\t\tcancel the event"}) @Since("2.0, 2.7 (support for script commands)") -@Events("command") +@Events("Command") public class ExprCommand extends SimpleExpression implements EventRestrictedSyntax { static { diff --git a/src/main/java/ch/njol/skript/expressions/ExprCommandSender.java b/src/main/java/ch/njol/skript/expressions/ExprCommandSender.java index 2d71a3b2e0e..cdf3785addd 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprCommandSender.java +++ b/src/main/java/ch/njol/skript/expressions/ExprCommandSender.java @@ -1,13 +1,8 @@ package ch.njol.skript.expressions; -import org.bukkit.command.CommandSender; - -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.Since; +import ch.njol.skript.doc.*; import ch.njol.skript.expressions.base.EventValueExpression; +import org.bukkit.command.CommandSender; @Name("Command Sender") @Description({ @@ -21,7 +16,7 @@ "\tlog \"%executor% used command /%command% %arguments%\" to \"commands.log\"" }) @Since("2.0") -@Events("command") +@Events("Command") public class ExprCommandSender extends EventValueExpression { static { diff --git a/src/main/java/ch/njol/skript/expressions/ExprDrops.java b/src/main/java/ch/njol/skript/expressions/ExprDrops.java index 02809a05502..27430449d14 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprDrops.java +++ b/src/main/java/ch/njol/skript/expressions/ExprDrops.java @@ -3,24 +3,18 @@ import ch.njol.skript.Skript; import ch.njol.skript.aliases.ItemType; import ch.njol.skript.classes.Changer.ChangeMode; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.Since; +import ch.njol.skript.doc.*; import ch.njol.skript.lang.EventRestrictedSyntax; import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.ExpressionType; import ch.njol.skript.lang.SkriptParser.ParseResult; import ch.njol.skript.lang.util.SimpleExpression; -import ch.njol.skript.log.ErrorQuality; import ch.njol.skript.util.Experience; import ch.njol.util.Kleenean; import ch.njol.util.coll.CollectionUtils; import org.bukkit.entity.Item; import org.bukkit.event.Event; import org.bukkit.event.block.BlockDropItemEvent; -import org.bukkit.event.block.BlockEvent; import org.bukkit.event.entity.EntityDeathEvent; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; @@ -38,7 +32,7 @@ @Examples({"clear drops", "remove 4 planks from the drops"}) @Since("1.0") -@Events("death") +@Events("Death") public class ExprDrops extends SimpleExpression implements EventRestrictedSyntax { static { diff --git a/src/main/java/ch/njol/skript/expressions/ExprEnchantItem.java b/src/main/java/ch/njol/skript/expressions/ExprEnchantItem.java index cf06ff046bc..18a863ddac7 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprEnchantItem.java +++ b/src/main/java/ch/njol/skript/expressions/ExprEnchantItem.java @@ -1,18 +1,9 @@ package ch.njol.skript.expressions; -import org.bukkit.event.Event; -import org.bukkit.event.enchantment.EnchantItemEvent; -import org.bukkit.event.enchantment.PrepareItemEnchantEvent; -import org.jetbrains.annotations.Nullable; - import ch.njol.skript.Skript; import ch.njol.skript.aliases.ItemType; import ch.njol.skript.classes.Changer.ChangeMode; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.Since; +import ch.njol.skript.doc.*; import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.ExpressionType; import ch.njol.skript.lang.SkriptParser.ParseResult; @@ -20,6 +11,10 @@ import ch.njol.skript.log.ErrorQuality; import ch.njol.util.Kleenean; import ch.njol.util.coll.CollectionUtils; +import org.bukkit.event.Event; +import org.bukkit.event.enchantment.EnchantItemEvent; +import org.bukkit.event.enchantment.PrepareItemEnchantEvent; +import org.jetbrains.annotations.Nullable; @Name("Enchant Item") @Description({"The enchant item in an enchant prepare event or enchant event.", @@ -28,7 +23,7 @@ "\tset the enchanted item to a diamond chestplate", "on enchant prepare:", "\tset the enchant item to a wooden sword"}) -@Events({"enchant prepare", "enchant"}) +@Events({"Enchant Prepare", "Enchant"}) @Since("2.5") public class ExprEnchantItem extends SimpleExpression { diff --git a/src/main/java/ch/njol/skript/expressions/ExprEnchantingExpCost.java b/src/main/java/ch/njol/skript/expressions/ExprEnchantingExpCost.java index 4f9a52763dd..16a8aaacf1a 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprEnchantingExpCost.java +++ b/src/main/java/ch/njol/skript/expressions/ExprEnchantingExpCost.java @@ -1,16 +1,8 @@ package ch.njol.skript.expressions; -import org.bukkit.event.Event; -import org.bukkit.event.enchantment.EnchantItemEvent; -import org.jetbrains.annotations.Nullable; - import ch.njol.skript.Skript; import ch.njol.skript.classes.Changer.ChangeMode; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.Since; +import ch.njol.skript.doc.*; import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.ExpressionType; import ch.njol.skript.lang.SkriptParser.ParseResult; @@ -19,13 +11,16 @@ import ch.njol.skript.util.Experience; import ch.njol.util.Kleenean; import ch.njol.util.coll.CollectionUtils; +import org.bukkit.event.Event; +import org.bukkit.event.enchantment.EnchantItemEvent; +import org.jetbrains.annotations.Nullable; @Name("Enchanting Experience Cost") @Description({"The cost of enchanting in an enchant event.", "This is number that was displayed in the enchantment table, not the actual number of levels removed."}) @Examples({"on enchant:", "\tsend \"Cost: %the displayed enchanting cost%\" to player"}) -@Events("enchant") +@Events("Enchant") @Since("2.5") public class ExprEnchantingExpCost extends SimpleExpression { diff --git a/src/main/java/ch/njol/skript/expressions/ExprEnchantmentBonus.java b/src/main/java/ch/njol/skript/expressions/ExprEnchantmentBonus.java index 0e599582871..3c80fb2571b 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprEnchantmentBonus.java +++ b/src/main/java/ch/njol/skript/expressions/ExprEnchantmentBonus.java @@ -1,27 +1,22 @@ package ch.njol.skript.expressions; -import org.bukkit.event.Event; -import org.bukkit.event.enchantment.PrepareItemEnchantEvent; -import org.jetbrains.annotations.Nullable; - import ch.njol.skript.Skript; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.Since; +import ch.njol.skript.doc.*; import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.ExpressionType; import ch.njol.skript.lang.SkriptParser.ParseResult; import ch.njol.skript.lang.util.SimpleExpression; import ch.njol.skript.log.ErrorQuality; import ch.njol.util.Kleenean; +import org.bukkit.event.Event; +import org.bukkit.event.enchantment.PrepareItemEnchantEvent; +import org.jetbrains.annotations.Nullable; @Name("Enchantment Bonus") @Description("The enchantment bonus in an enchant prepare event. This represents the number of bookshelves affecting/surrounding the enchantment table.") @Examples({"on enchant:", "\tsend \"There are %enchantment bonus% bookshelves surrounding this enchantment table!\" to player"}) -@Events("enchant prepare") +@Events("Enchant Prepare") @Since("2.5") public class ExprEnchantmentBonus extends SimpleExpression { diff --git a/src/main/java/ch/njol/skript/expressions/ExprEnchantmentOffer.java b/src/main/java/ch/njol/skript/expressions/ExprEnchantmentOffer.java index e96f501b1a2..e2c681dbc70 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprEnchantmentOffer.java +++ b/src/main/java/ch/njol/skript/expressions/ExprEnchantmentOffer.java @@ -1,23 +1,8 @@ package ch.njol.skript.expressions; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Random; - -import org.bukkit.enchantments.EnchantmentOffer; -import org.bukkit.event.Event; -import org.bukkit.event.enchantment.PrepareItemEnchantEvent; -import org.jetbrains.annotations.Nullable; - import ch.njol.skript.Skript; import ch.njol.skript.classes.Changer.ChangeMode; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.RequiredPlugins; -import ch.njol.skript.doc.Since; +import ch.njol.skript.doc.*; import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.ExpressionType; import ch.njol.skript.lang.SkriptParser.ParseResult; @@ -26,13 +11,22 @@ import ch.njol.skript.util.EnchantmentType; import ch.njol.util.Kleenean; import ch.njol.util.coll.CollectionUtils; +import org.bukkit.enchantments.EnchantmentOffer; +import org.bukkit.event.Event; +import org.bukkit.event.enchantment.PrepareItemEnchantEvent; +import org.jetbrains.annotations.Nullable; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Random; @Name("Enchantment Offer") @Description("The enchantment offer in enchant prepare events.") @Examples({"on enchant prepare:", "\tsend \"Your enchantment offers are: %the enchantment offers%\" to player"}) @Since("2.5") -@Events("enchant prepare") +@Events("Enchant Prepare") @RequiredPlugins("1.11 or newer") public class ExprEnchantmentOffer extends SimpleExpression { diff --git a/src/main/java/ch/njol/skript/expressions/ExprExperience.java b/src/main/java/ch/njol/skript/expressions/ExprExperience.java index aba4975419e..2fd3839dddb 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprExperience.java +++ b/src/main/java/ch/njol/skript/expressions/ExprExperience.java @@ -42,7 +42,7 @@ "\tadd 70 to dropped experience", }) @Since("2.1, 2.5.3 (block break event), 2.7 (experience change event), 2.10 (breeding, fishing)") -@Events({"experience spawn", "break / mine", "experience change", "entity breeding"}) +@Events({"Experience Spawn", "Break / Mine", "Experience Change", "Entity Breeding"}) public class ExprExperience extends SimpleExpression { static { diff --git a/src/main/java/ch/njol/skript/expressions/ExprExplodedBlocks.java b/src/main/java/ch/njol/skript/expressions/ExprExplodedBlocks.java index d67b502f56b..84ebc7ad264 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprExplodedBlocks.java +++ b/src/main/java/ch/njol/skript/expressions/ExprExplodedBlocks.java @@ -1,26 +1,21 @@ package ch.njol.skript.expressions; -import java.util.List; - +import ch.njol.skript.Skript; import ch.njol.skript.classes.Changer.ChangeMode; +import ch.njol.skript.doc.*; import ch.njol.skript.lang.EventRestrictedSyntax; +import ch.njol.skript.lang.Expression; +import ch.njol.skript.lang.ExpressionType; +import ch.njol.skript.lang.SkriptParser; +import ch.njol.skript.lang.util.SimpleExpression; +import ch.njol.util.Kleenean; import ch.njol.util.coll.CollectionUtils; import org.bukkit.block.Block; import org.bukkit.event.Event; import org.bukkit.event.entity.EntityExplodeEvent; import org.jetbrains.annotations.Nullable; -import ch.njol.skript.Skript; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.Since; -import ch.njol.skript.lang.Expression; -import ch.njol.skript.lang.ExpressionType; -import ch.njol.skript.lang.SkriptParser; -import ch.njol.skript.lang.util.SimpleExpression; -import ch.njol.util.Kleenean; +import java.util.List; @Name("Exploded Blocks") @Description("Get all the blocks that were destroyed in an explode event. Supports add/remove/set/clear/delete blocks.") @@ -42,7 +37,7 @@ "", "on explode:", "\tadd blocks above event-entity to exploded blocks"}) -@Events("explode") +@Events("Explode") @Since("2.5, 2.8.6 (modify blocks)") public class ExprExplodedBlocks extends SimpleExpression implements EventRestrictedSyntax { diff --git a/src/main/java/ch/njol/skript/expressions/ExprExplosionBlockYield.java b/src/main/java/ch/njol/skript/expressions/ExprExplosionBlockYield.java index d38b373cfb3..386f4776641 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprExplosionBlockYield.java +++ b/src/main/java/ch/njol/skript/expressions/ExprExplosionBlockYield.java @@ -1,16 +1,8 @@ package ch.njol.skript.expressions; -import org.bukkit.event.Event; -import org.bukkit.event.entity.EntityExplodeEvent; -import org.jetbrains.annotations.Nullable; - import ch.njol.skript.Skript; import ch.njol.skript.classes.Changer.ChangeMode; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.Since; +import ch.njol.skript.doc.*; import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.ExpressionType; import ch.njol.skript.lang.SkriptParser.ParseResult; @@ -18,6 +10,9 @@ import ch.njol.skript.log.ErrorQuality; import ch.njol.util.Kleenean; import ch.njol.util.coll.CollectionUtils; +import org.bukkit.event.Event; +import org.bukkit.event.entity.EntityExplodeEvent; +import org.jetbrains.annotations.Nullable; @Name("Explosion Block Yield") @Description({"The percentage of exploded blocks dropped in an explosion event.", @@ -25,7 +20,7 @@ "Attempting to change the yield to a value less than 0 will have no effect."}) @Examples({"on explode:", "set the explosion's block yield to 10%"}) -@Events("explosion") +@Events("Explosion") @Since("2.5") public class ExprExplosionBlockYield extends SimpleExpression { diff --git a/src/main/java/ch/njol/skript/expressions/ExprExplosionYield.java b/src/main/java/ch/njol/skript/expressions/ExprExplosionYield.java index 78605dbef38..b1bae90df05 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprExplosionYield.java +++ b/src/main/java/ch/njol/skript/expressions/ExprExplosionYield.java @@ -1,16 +1,8 @@ package ch.njol.skript.expressions; -import org.bukkit.event.Event; -import org.bukkit.event.entity.ExplosionPrimeEvent; -import org.jetbrains.annotations.Nullable; - import ch.njol.skript.Skript; import ch.njol.skript.classes.Changer.ChangeMode; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.Since; +import ch.njol.skript.doc.*; import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.ExpressionType; import ch.njol.skript.lang.SkriptParser.ParseResult; @@ -18,6 +10,9 @@ import ch.njol.skript.log.ErrorQuality; import ch.njol.util.Kleenean; import ch.njol.util.coll.CollectionUtils; +import org.bukkit.event.Event; +import org.bukkit.event.entity.ExplosionPrimeEvent; +import org.jetbrains.annotations.Nullable; @Name("Explosion Yield") @Description({"The yield of the explosion in an explosion prime event. This is how big the explosion is.", @@ -25,7 +20,7 @@ " Read this wiki page for more information"}) @Examples({"on explosion prime:", "\tset the yield of the explosion to 10"}) -@Events("explosion prime") +@Events("Explosion Prime") @Since("2.5") public class ExprExplosionYield extends SimpleExpression { diff --git a/src/main/java/ch/njol/skript/expressions/ExprFertilizedBlocks.java b/src/main/java/ch/njol/skript/expressions/ExprFertilizedBlocks.java index 9c8cc950ab0..2261241e67b 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprFertilizedBlocks.java +++ b/src/main/java/ch/njol/skript/expressions/ExprFertilizedBlocks.java @@ -1,30 +1,23 @@ package ch.njol.skript.expressions; - -import java.util.Iterator; - -import org.bukkit.event.Event; -import org.bukkit.event.block.BlockFertilizeEvent; -import org.jetbrains.annotations.Nullable; - import ch.njol.skript.Skript; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.RequiredPlugins; -import ch.njol.skript.doc.Since; +import ch.njol.skript.doc.*; import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.ExpressionType; import ch.njol.skript.lang.SkriptParser.ParseResult; import ch.njol.skript.lang.util.SimpleExpression; import ch.njol.skript.util.BlockStateBlock; import ch.njol.util.Kleenean; +import org.bukkit.event.Event; +import org.bukkit.event.block.BlockFertilizeEvent; +import org.jetbrains.annotations.Nullable; + +import java.util.Iterator; @Name("Fertilized Blocks") @Description("The blocks fertilized in block fertilize events.") @RequiredPlugins("Minecraft 1.13 or newer") -@Events("block fertilize") +@Events("Block Fertilize") @Examples("the fertilized blocks") @Since("2.5") public class ExprFertilizedBlocks extends SimpleExpression { diff --git a/src/main/java/ch/njol/skript/expressions/ExprFinalDamage.java b/src/main/java/ch/njol/skript/expressions/ExprFinalDamage.java index 324ded1aef7..bab14dcc3c6 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprFinalDamage.java +++ b/src/main/java/ch/njol/skript/expressions/ExprFinalDamage.java @@ -1,29 +1,24 @@ package ch.njol.skript.expressions; -import org.bukkit.event.Event; -import org.bukkit.event.entity.EntityDamageEvent; -import org.jetbrains.annotations.Nullable; - import ch.njol.skript.Skript; import ch.njol.skript.bukkitutil.HealthUtils; import ch.njol.skript.classes.Changer.ChangeMode; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.Since; +import ch.njol.skript.doc.*; import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.ExpressionType; import ch.njol.skript.lang.SkriptParser.ParseResult; import ch.njol.skript.lang.util.SimpleExpression; import ch.njol.skript.log.ErrorQuality; import ch.njol.util.Kleenean; +import org.bukkit.event.Event; +import org.bukkit.event.entity.EntityDamageEvent; +import org.jetbrains.annotations.Nullable; @Name("Final Damage") @Description("How much damage is done in a damage event, considering all types of damage reduction. Can NOT be changed.") @Examples({"send \"%final damage%\" to victim"}) @Since("2.2-dev19") -@Events("damage") +@Events("Damage") public class ExprFinalDamage extends SimpleExpression { static { diff --git a/src/main/java/ch/njol/skript/expressions/ExprHealAmount.java b/src/main/java/ch/njol/skript/expressions/ExprHealAmount.java index 5410d2ccc5d..312ff8651a0 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprHealAmount.java +++ b/src/main/java/ch/njol/skript/expressions/ExprHealAmount.java @@ -1,24 +1,19 @@ package ch.njol.skript.expressions; -import org.bukkit.event.Event; -import org.bukkit.event.entity.EntityRegainHealthEvent; -import org.jetbrains.annotations.Nullable; - import ch.njol.skript.Skript; import ch.njol.skript.classes.Changer; import ch.njol.skript.classes.Changer.ChangeMode; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.Since; +import ch.njol.skript.doc.*; import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.ExpressionType; import ch.njol.skript.lang.SkriptParser.ParseResult; import ch.njol.skript.lang.util.SimpleExpression; import ch.njol.util.Kleenean; import ch.njol.util.coll.CollectionUtils; +import org.bukkit.event.Event; +import org.bukkit.event.entity.EntityRegainHealthEvent; +import org.jetbrains.annotations.Nullable; @Name("Heal Amount") @Description("The amount of health healed in a heal event.") @@ -27,7 +22,7 @@ "\tincrease the heal amount by 2", "\tremove 0.5 from the healing amount" }) -@Events("heal") +@Events("Heal") @Since("2.5.1") public class ExprHealAmount extends SimpleExpression { diff --git a/src/main/java/ch/njol/skript/expressions/ExprHealReason.java b/src/main/java/ch/njol/skript/expressions/ExprHealReason.java index bc6602eb8b3..70264d7009b 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprHealReason.java +++ b/src/main/java/ch/njol/skript/expressions/ExprHealReason.java @@ -1,13 +1,8 @@ package ch.njol.skript.expressions; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.Since; +import ch.njol.skript.doc.*; import ch.njol.skript.expressions.base.EventValueExpression; import ch.njol.skript.registrations.EventValues; - import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason; @Name("Heal Reason") @@ -17,7 +12,7 @@ "\theal reason is satiated", "\tsend \"You ate enough food and gained full health back!\"" }) -@Events("heal") +@Events("Heal") @Since("2.5") public class ExprHealReason extends EventValueExpression { diff --git a/src/main/java/ch/njol/skript/expressions/ExprHealth.java b/src/main/java/ch/njol/skript/expressions/ExprHealth.java index 9459a1b20d4..99ee72cbb1e 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprHealth.java +++ b/src/main/java/ch/njol/skript/expressions/ExprHealth.java @@ -19,7 +19,7 @@ @Description("The health of a creature, e.g. a player, mob, villager, etc. The minimum value is 0, and the maximum is the creature's max health (e.g. 10 for players).") @Examples({"message \"You have %health% HP left.\""}) @Since("1.0") -@Events("damage") +@Events("Damage") public class ExprHealth extends PropertyExpression { static { diff --git a/src/main/java/ch/njol/skript/expressions/ExprHoverList.java b/src/main/java/ch/njol/skript/expressions/ExprHoverList.java index 16c2036f70d..4886e6c6b21 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprHoverList.java +++ b/src/main/java/ch/njol/skript/expressions/ExprHoverList.java @@ -37,7 +37,7 @@ }) @Since("2.3") @RequiredPlugins("Paper 1.12.2 or newer") -@Events("server list ping") +@Events("Server List Ping") public class ExprHoverList extends SimpleExpression { static { diff --git a/src/main/java/ch/njol/skript/expressions/ExprLevel.java b/src/main/java/ch/njol/skript/expressions/ExprLevel.java index b3273130b75..53cb498e215 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprLevel.java +++ b/src/main/java/ch/njol/skript/expressions/ExprLevel.java @@ -1,5 +1,10 @@ package ch.njol.skript.expressions; +import ch.njol.skript.Skript; +import ch.njol.skript.classes.Changer.ChangeMode; +import ch.njol.skript.doc.*; +import ch.njol.skript.effects.Delay; +import ch.njol.skript.expressions.base.SimplePropertyExpression; import org.bukkit.entity.Player; import org.bukkit.event.Event; import org.bukkit.event.entity.EntityDeathEvent; @@ -8,16 +13,6 @@ import org.bukkit.event.player.PlayerRespawnEvent; import org.jetbrains.annotations.Nullable; -import ch.njol.skript.Skript; -import ch.njol.skript.classes.Changer.ChangeMode; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.Since; -import ch.njol.skript.effects.Delay; -import ch.njol.skript.expressions.base.SimplePropertyExpression; - /** * @author Peter Güttinger */ @@ -26,7 +21,7 @@ @Examples({"reduce the victim's level by 1", "set the player's level to 0"}) @Since("unknown (before 2.1)") -@Events("level change") +@Events("Level Change") public class ExprLevel extends SimplePropertyExpression { static { register(ExprLevel.class, Long.class, "level", "players"); diff --git a/src/main/java/ch/njol/skript/expressions/ExprLevelProgress.java b/src/main/java/ch/njol/skript/expressions/ExprLevelProgress.java index 7c682609082..6a10bb6593a 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprLevelProgress.java +++ b/src/main/java/ch/njol/skript/expressions/ExprLevelProgress.java @@ -1,17 +1,12 @@ package ch.njol.skript.expressions; -import org.bukkit.entity.Player; -import org.bukkit.event.Event; -import org.jetbrains.annotations.Nullable; - import ch.njol.skript.classes.Changer.ChangeMode; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.Since; +import ch.njol.skript.doc.*; import ch.njol.skript.expressions.base.SimplePropertyExpression; import ch.njol.util.Math2; +import org.bukkit.entity.Player; +import org.bukkit.event.Event; +import org.jetbrains.annotations.Nullable; /** * @author Peter Güttinger @@ -35,7 +30,7 @@ "on xp spawn:", "\tcancel event"}) @Since("2.0") -@Events("level change") +@Events("Level Change") public class ExprLevelProgress extends SimplePropertyExpression { static { diff --git a/src/main/java/ch/njol/skript/expressions/ExprMaxHealth.java b/src/main/java/ch/njol/skript/expressions/ExprMaxHealth.java index cfe64906bf0..c27b6f8a611 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprMaxHealth.java +++ b/src/main/java/ch/njol/skript/expressions/ExprMaxHealth.java @@ -1,18 +1,12 @@ package ch.njol.skript.expressions; -import org.bukkit.entity.LivingEntity; -import org.bukkit.event.Event; -import org.jetbrains.annotations.Nullable; - -import ch.njol.skript.Skript; import ch.njol.skript.bukkitutil.HealthUtils; import ch.njol.skript.classes.Changer.ChangeMode; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.Since; +import ch.njol.skript.doc.*; import ch.njol.skript.expressions.base.SimplePropertyExpression; +import org.bukkit.entity.LivingEntity; +import org.bukkit.event.Event; +import org.jetbrains.annotations.Nullable; /** * @author Peter Güttinger @@ -24,7 +18,7 @@ "spawn a giant", "set the last spawned entity's max health to 1000"}) @Since("2.0") -@Events({"damage", "death"}) +@Events({"Damage", "Death"}) public class ExprMaxHealth extends SimplePropertyExpression { static { diff --git a/src/main/java/ch/njol/skript/expressions/ExprMessage.java b/src/main/java/ch/njol/skript/expressions/ExprMessage.java index 15c9dbc37de..c1fc6f975ab 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprMessage.java +++ b/src/main/java/ch/njol/skript/expressions/ExprMessage.java @@ -52,7 +52,7 @@ "\tset broadcast message to \"&a[BROADCAST] %broadcast message%\"" }) @Since("1.4.6 (chat message), 1.4.9 (join & quit messages), 2.0 (death message), 2.9.0 (clear message), 2.10 (broadcasted message)") -@Events({"chat", "join", "quit", "death", "broadcast"}) +@Events({"Chat", "Join", "Quit", "Death", "Broadcast"}) public class ExprMessage extends SimpleExpression { @SuppressWarnings("unchecked") diff --git a/src/main/java/ch/njol/skript/expressions/ExprPortal.java b/src/main/java/ch/njol/skript/expressions/ExprPortal.java index a3c3011febe..76843ddcd6d 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprPortal.java +++ b/src/main/java/ch/njol/skript/expressions/ExprPortal.java @@ -1,25 +1,20 @@ package ch.njol.skript.expressions; -import java.util.Iterator; -import java.util.List; - -import org.bukkit.block.Block; -import org.bukkit.block.BlockState; -import org.bukkit.event.Event; -import org.bukkit.event.world.PortalCreateEvent; -import org.jetbrains.annotations.Nullable; - import ch.njol.skript.Skript; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.Since; +import ch.njol.skript.doc.*; import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.ExpressionType; import ch.njol.skript.lang.SkriptParser.ParseResult; import ch.njol.skript.lang.util.SimpleExpression; import ch.njol.util.Kleenean; +import org.bukkit.block.Block; +import org.bukkit.block.BlockState; +import org.bukkit.event.Event; +import org.bukkit.event.world.PortalCreateEvent; +import org.jetbrains.annotations.Nullable; + +import java.util.Iterator; +import java.util.List; @Name("Portal") @Description("The blocks associated with a portal in the portal creation event.") @@ -27,7 +22,7 @@ " loop portal blocks:", " broadcast \"%loop-block% is part of a portal!\""}) @Since("2.4") -@Events("portal_create") +@Events("Portal Create") public class ExprPortal extends SimpleExpression { // 1.14+ returns List, 1.13.2 and below returns ArrayList diff --git a/src/main/java/ch/njol/skript/expressions/ExprProtocolVersion.java b/src/main/java/ch/njol/skript/expressions/ExprProtocolVersion.java index f2fb55d0dd1..9d33c7a5ede 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprProtocolVersion.java +++ b/src/main/java/ch/njol/skript/expressions/ExprProtocolVersion.java @@ -1,23 +1,17 @@ package ch.njol.skript.expressions; -import org.bukkit.event.Event; -import org.jetbrains.annotations.Nullable; - -import com.destroystokyo.paper.event.server.PaperServerListPingEvent; import ch.njol.skript.Skript; import ch.njol.skript.classes.Changer.ChangeMode; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.RequiredPlugins; -import ch.njol.skript.doc.Since; +import ch.njol.skript.doc.*; import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.ExpressionType; import ch.njol.skript.lang.SkriptParser.ParseResult; import ch.njol.skript.lang.util.SimpleExpression; import ch.njol.util.Kleenean; import ch.njol.util.coll.CollectionUtils; +import com.destroystokyo.paper.event.server.PaperServerListPingEvent; +import org.bukkit.event.Event; +import org.jetbrains.annotations.Nullable; @Name("Protocol Version") @Description({"The protocol version that will be sent as the protocol version of the server in a server list ping event. " + @@ -37,7 +31,7 @@ "\tset the protocol version to 0 # 13w41a (1.7) - so the player will see the custom version string almost always"}) @Since("2.3") @RequiredPlugins("Paper 1.12.2 or newer") -@Events("server list ping") +@Events("Server List Ping") public class ExprProtocolVersion extends SimpleExpression { static { diff --git a/src/main/java/ch/njol/skript/expressions/ExprReadiedArrow.java b/src/main/java/ch/njol/skript/expressions/ExprReadiedArrow.java index 47a122dee40..0e9df9d9fcc 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprReadiedArrow.java +++ b/src/main/java/ch/njol/skript/expressions/ExprReadiedArrow.java @@ -1,11 +1,7 @@ package ch.njol.skript.expressions; import ch.njol.skript.Skript; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.Since; +import ch.njol.skript.doc.*; import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.ExpressionType; import ch.njol.skript.lang.SkriptParser.ParseResult; @@ -25,7 +21,7 @@ "\t\tcancel event" }) @Since("2.8.0") -@Events("ready arrow") +@Events("Ready Arrow") public class ExprReadiedArrow extends SimpleExpression { static { diff --git a/src/main/java/ch/njol/skript/expressions/ExprSentCommands.java b/src/main/java/ch/njol/skript/expressions/ExprSentCommands.java index 3e6c3f4cebd..9cf3a1f33ff 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprSentCommands.java +++ b/src/main/java/ch/njol/skript/expressions/ExprSentCommands.java @@ -35,7 +35,7 @@ "\tremove \"help\" from command list" }) @Since("2.8.0") -@Events("send command list") +@Events("Send Command List") public class ExprSentCommands extends SimpleExpression { static { diff --git a/src/main/java/ch/njol/skript/expressions/ExprWeather.java b/src/main/java/ch/njol/skript/expressions/ExprWeather.java index e56d2b722b2..a7c7d7e17e6 100644 --- a/src/main/java/ch/njol/skript/expressions/ExprWeather.java +++ b/src/main/java/ch/njol/skript/expressions/ExprWeather.java @@ -26,7 +26,7 @@ @Examples({"set weather to clear", "weather in \"world\" is rainy"}) @Since("1.0") -@Events("weather change") +@Events("Weather Change") public class ExprWeather extends PropertyExpression { static { Skript.registerExpression(ExprWeather.class, WeatherType.class, ExpressionType.PROPERTY, "[the] weather [(in|of) %worlds%]", "%worlds%'[s] weather"); diff --git a/src/main/java/org/skriptlang/skript/bukkit/furnace/elements/ExprFurnaceEventItems.java b/src/main/java/org/skriptlang/skript/bukkit/furnace/elements/ExprFurnaceEventItems.java index 78091a550ca..e13f8092c7e 100644 --- a/src/main/java/org/skriptlang/skript/bukkit/furnace/elements/ExprFurnaceEventItems.java +++ b/src/main/java/org/skriptlang/skript/bukkit/furnace/elements/ExprFurnaceEventItems.java @@ -37,7 +37,7 @@ "\tbroadcast smelting item", "\tclear smelting item" }) -@Events({"smelt", "fuel burn", "smelting start", "furnace extract"}) +@Events({"Smelt", "Fuel Burn", "Smelting Start", "Furnace Extract"}) @Since("2.10") public class ExprFurnaceEventItems extends PropertyExpression { diff --git a/src/main/java/org/skriptlang/skript/bukkit/furnace/elements/ExprFurnaceSlot.java b/src/main/java/org/skriptlang/skript/bukkit/furnace/elements/ExprFurnaceSlot.java index 8fd42c23d0c..d7f63fdb949 100644 --- a/src/main/java/org/skriptlang/skript/bukkit/furnace/elements/ExprFurnaceSlot.java +++ b/src/main/java/org/skriptlang/skript/bukkit/furnace/elements/ExprFurnaceSlot.java @@ -1,11 +1,7 @@ package org.skriptlang.skript.bukkit.furnace.elements; import ch.njol.skript.Skript; -import ch.njol.skript.doc.Description; -import ch.njol.skript.doc.Events; -import ch.njol.skript.doc.Examples; -import ch.njol.skript.doc.Name; -import ch.njol.skript.doc.Since; +import ch.njol.skript.doc.*; import ch.njol.skript.effects.Delay; import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.ExpressionType; @@ -46,7 +42,7 @@ "\tif the fuel slot is charcoal:", "\t\tadd 5 seconds to the burn time" }) -@Events({"smelt", "fuel burn"}) +@Events({"Smelt", "Fuel Burn"}) @Since("1.0, 2.8.0 (syntax rework)") public class ExprFurnaceSlot extends SimpleExpression {