Skip to content

Commit 2613830

Browse files
committed
Use variable for version instead of hardcoded string
1 parent f60c3af commit 2613830

11 files changed

+22
-9
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>me.anxelok</groupId>
88
<artifactId>skript-pk</artifactId>
9-
<version>1.0</version>
9+
<version>v1.0</version>
1010
<packaging>jar</packaging>
1111
<name>skript-pk</name>
1212

src/me/anxelok/Main.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@
88

99
public class Main extends JavaPlugin {
1010

11+
public static final String VERSION = "v1.0";
12+
1113
@Override
1214
public void onEnable() {
15+
1316
getLogger().info("[Skript-PK] Enabling Skript-PK...");
1417

1518
// check if Skript is installed

src/me/anxelok/syntax/effects/EffBindUnbindAbility.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import ch.njol.skript.lang.SkriptParser;
1111
import ch.njol.util.Kleenean;
1212
import com.projectkorra.projectkorra.BendingPlayer;
13+
import me.anxelok.Main;
1314
import org.bukkit.entity.Player;
1415
import org.bukkit.event.Event;
1516
import org.jetbrains.annotations.Nullable;
@@ -24,7 +25,7 @@
2425
"unbind ability from slot 1 of player",
2526
"unbind ability \"EarthWave\" of player"
2627
})
27-
@Since("1.0")
28+
@Since(Main.VERSION)
2829
public class EffBindUnbindAbility extends Effect {
2930

3031
private Expression<String> abilityExpr;

src/me/anxelok/syntax/effects/EffPresetManagement.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import ch.njol.skript.lang.SkriptParser;
1111
import ch.njol.util.Kleenean;
1212
import com.projectkorra.projectkorra.object.Preset;
13+
import me.anxelok.Main;
1314
import org.bukkit.Bukkit;
1415
import org.bukkit.event.Event;
1516
import org.bukkit.entity.Player;
@@ -33,7 +34,7 @@
3334
"delete player preset \"playerPreset\" for player",
3435
"delete global preset \"presetName\""
3536
})
36-
@Since("1.0")
37+
@Since(Main.VERSION)
3738
public class EffPresetManagement extends Effect {
3839

3940
private Expression<String> presetNameExpr;

src/me/anxelok/syntax/effects/EffToggleBending.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import org.bukkit.entity.Player;
1111
import org.bukkit.event.Event;
1212
import org.jetbrains.annotations.Nullable;
13+
import me.anxelok.Main;
1314

1415
@Name("Toggle Bending")
1516
@Description("Toggles a player's bending ability on/off")
@@ -18,7 +19,7 @@
1819
"toggle player's bending on",
1920
"toggle player's bending off"
2021
})
21-
@Since("1.0")
22+
@Since(Main.VERSION)
2223
public class EffToggleBending extends Effect {
2324
private Expression<Player> playerExpr;
2425
private String mode; // toggle, on, off

src/me/anxelok/syntax/expressions/ExprBendingAbilities.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import ch.njol.skript.lang.util.SimpleExpression;
66
import ch.njol.util.Kleenean;
77
import com.projectkorra.projectkorra.BendingPlayer;
8+
import me.anxelok.Main;
89
import org.bukkit.entity.Player;
910
import org.bukkit.event.Event;
1011
import org.jetbrains.annotations.Nullable;
@@ -16,7 +17,7 @@
1617
"loop {_abilities::*}:",
1718
" send \"Slot %loop-index%: %loop-value%\""
1819
})
19-
@Since("1.0")
20+
@Since(Main.VERSION)
2021
public class ExprBendingAbilities extends SimpleExpression<String> {
2122

2223
private ch.njol.skript.lang.Expression<Player> playerExpr;

src/me/anxelok/syntax/expressions/ExprBendingStatus.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import ch.njol.skript.lang.util.SimpleExpression;
99
import ch.njol.util.Kleenean;
1010
import com.projectkorra.projectkorra.BendingPlayer;
11+
import me.anxelok.Main;
1112
import org.bukkit.entity.Player;
1213
import org.bukkit.event.Event;
1314
import org.jetbrains.annotations.Nullable;
@@ -17,7 +18,7 @@
1718
@Examples({
1819
"set {_isBendingEnabled} to player's bending status"
1920
})
20-
@Since("1.0")
21+
@Since(Main.VERSION)
2122
public class ExprBendingStatus extends SimpleExpression<Boolean> {
2223

2324
private Expression<Player> playerExpr;

src/me/anxelok/syntax/expressions/ExprBoundAbilityBySlot.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import ch.njol.skript.lang.util.SimpleExpression;
66
import ch.njol.util.Kleenean;
77
import com.projectkorra.projectkorra.BendingPlayer;
8+
import me.anxelok.Main;
89
import org.bukkit.entity.Player;
910
import org.bukkit.event.Event;
1011
import org.jetbrains.annotations.Nullable;
@@ -15,7 +16,7 @@
1516
"set {_ability::1} to player's first bound ability",
1617
"set {_ability::2} to player's second bound ability"
1718
})
18-
@Since("1.0")
19+
@Since(Main.VERSION)
1920
public class ExprBoundAbilityBySlot extends SimpleExpression<String> {
2021

2122
private ch.njol.skript.lang.Expression<Player> playerExpr;

src/me/anxelok/syntax/expressions/ExprCurrentBoundAbility.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import ch.njol.skript.lang.util.SimpleExpression;
66
import ch.njol.util.Kleenean;
77
import com.projectkorra.projectkorra.BendingPlayer;
8+
import me.anxelok.Main;
89
import org.bukkit.entity.Player;
910
import org.bukkit.event.Event;
1011
import org.jetbrains.annotations.Nullable;
@@ -16,7 +17,7 @@
1617
"if player's current bound ability is \"WaterManipulation\":",
1718
" send \"You have WaterManipulation bound!\""
1819
})
19-
@Since("1.0")
20+
@Since(Main.VERSION)
2021
public class ExprCurrentBoundAbility extends SimpleExpression<String> {
2122

2223
private ch.njol.skript.lang.Expression<Player> playerExpr;

src/me/anxelok/syntax/expressions/ExprElementOrSubelementOfAbility.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,15 @@
1111
import com.projectkorra.projectkorra.Element;
1212
import ch.njol.skript.doc.*;
1313

14+
import me.anxelok.Main;
15+
1416
@Name("Element or Subelement of Ability")
1517
@Description("Gets the element or sub-element of an ability.")
1618
@Examples({
1719
"get element of ability \"FireBlast\"",
1820
"get subelement of ability \"FireBlast\""
1921
})
22+
@Since(Main.VERSION)
2023
public class ExprElementOrSubelementOfAbility extends SimpleExpression<String> {
2124

2225
private Expression<String> abilityExpr;

0 commit comments

Comments
 (0)