Skip to content

Commit

Permalink
Prepare for release of 2.5-beta1 (#3256)
Browse files Browse the repository at this point in the history
* Temporarily disable persistent data/relational variables and test
* Prepare for release of 2.5-beta1
  • Loading branch information
ShaneBeee committed Aug 2, 2020
1 parent 4e1d82f commit 50ae1d5
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 31 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
groupid=ch.njol
name=skript
version=2.5-alpha6
version=2.5-beta1
41 changes: 21 additions & 20 deletions src/main/java/ch/njol/skript/classes/data/BukkitClasses.java
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ public Block deserialize(final String s) {
"set target block of player to minecraft:oak_leaves[distance=2;persistent=false]")
.after("itemtype")
.requiredPlugins("Minecraft 1.13+")
.since("INSERT VERSION")
.since("2.5")
.parser(new Parser<BlockData>() {
@Nullable
@Override
Expand Down Expand Up @@ -1772,7 +1772,7 @@ public String getVariableNamePattern() {
.description("The heal reason in a heal event.")
.usage(regainReasons.getAllNames())
.examples("")
.since("INSERT VERSION")
.since("2.5")
.parser(new Parser<RegainReason>() {
@Override
@Nullable
Expand Down Expand Up @@ -1863,24 +1863,25 @@ public String getVariableNamePattern() {
})
);
}

if (Skript.classExists("org.bukkit.persistence.PersistentDataHolder")) {
Classes.registerClass(new ClassInfo<>(PersistentDataHolder.class, "persistentdataholder")
.user("persistent data ?holders?")
.name("Persistent Data Holder")
.description(
"Represents something that can have persistent data. "
+ "The following can all hold persistent data: "
+ "entities, projectiles, items, banners, barrels, beds, beehives (1.15), bells, blast furnaces, "
+ "brewing stands, campfires, chests, command blocks, comparators, conduits, mob spawners, "
+ "daylight detectors, dispensers, droppers, enchanting tables, ender chests, end gateways, furnaces, "
+ "hoppers, jigsaw blocks, jukeboxes, lecterns, shulker boxes, signs, skulls, smokers, and structure blocks. "
+ "For the source list, <a href='https://hub.spigotmc.org/javadocs/spigot/org/bukkit/persistence/PersistentDataHolder.html'>see this page</a>."
)
.examples("set persistent data value \"epic\" of player to true")
.requiredPlugins("1.14 or newer")
.since("2.5"));
}

// Temporarily disabled until bugs are fixed
// if (Skript.classExists("org.bukkit.persistence.PersistentDataHolder")) {
// Classes.registerClass(new ClassInfo<>(PersistentDataHolder.class, "persistentdataholder")
// .user("persistent data ?holders?")
// .name("Persistent Data Holder")
// .description(
// "Represents something that can have persistent data. "
// + "The following can all hold persistent data: "
// + "entities, projectiles, items, banners, barrels, beds, beehives (1.15), bells, blast furnaces, "
// + "brewing stands, campfires, chests, command blocks, comparators, conduits, mob spawners, "
// + "daylight detectors, dispensers, droppers, enchanting tables, ender chests, end gateways, furnaces, "
// + "hoppers, jigsaw blocks, jukeboxes, lecterns, shulker boxes, signs, skulls, smokers, and structure blocks. "
// + "For the source list, <a href='https://hub.spigotmc.org/javadocs/spigot/org/bukkit/persistence/PersistentDataHolder.html'>see this page</a>."
// )
// .examples("set persistent data value \"epic\" of player to true")
// .requiredPlugins("1.14 or newer")
// .since("2.5"));
// }

if (Skript.classExists("org.bukkit.enchantments.EnchantmentOffer")) {
Classes.registerClass(new ClassInfo<>(EnchantmentOffer.class, "enchantmentoffer")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
public class CondHasRelationalVariable extends Condition {

static {
if (Skript.isRunningMinecraft(1, 14)) {
// Temporarily disabled until bugs are fixed
if (false && Skript.isRunningMinecraft(1, 14)) {
Skript.registerCondition(CondHasRelationalVariable.class,
"%persistentdataholders/itemtypes/blocks% (has|have|holds) [(relational|relation( |-)based) variable[s]] %objects%",
"%persistentdataholders/itemtypes/blocks% (doesn't|does not|do not|don't) (have|hold) [(relational|relation( |-)based) variable[s]] %objects%"
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ch/njol/skript/effects/EffStopServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
@Name("Stop Server")
@Description("Stops or restarts the server. If restart is used when the restart-script spigot.yml option isn't defined, the server will stop instead.")
@Examples({"stop the server", "restart server"})
@Since("INSERT VERSION")
@Since("2.5")
public class EffStopServer extends Effect {

static {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/ch/njol/skript/events/SimpleEvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ public class SimpleEvents {
.requiredPlugins("Paper")
.examples("on projectile collide:",
"\tteleport shooter of event-projectile to event-entity")
.since("INSERT VERSION");
.since("2.5");
Skript.registerEvent("Shoot", SimpleEvent.class, ProjectileLaunchEvent.class, "[projectile] shoot")
.description("Called whenever a <a href='classes.html#projectile'>projectile</a> is shot. Use the <a href='expressions.html#ExprShooter'>shooter expression</a> to get who shot the projectile.")
.examples("on shoot:",
Expand Down Expand Up @@ -574,6 +574,6 @@ public class SimpleEvents {
.requiredPlugins("Minecraft 1.13 or newer")
.examples("on block fertilize:",
"\tsend \"Fertilized %size of fertilized blocks% blocks got fertilized.\"")
.since("INSERT VERSION");
.since("2.5");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
@Examples({"set {data} to block data of target block",
"set block at player to {data}"})
@RequiredPlugins("Minecraft 1.13+")
@Since("INSERT VERSION")
@Since("2.5")
public class ExprBlockData extends SimplePropertyExpression<Block, BlockData> {

static {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
@RequiredPlugins("Minecraft 1.13 or newer")
@Events("block fertilize")
@Examples("the fertilized blocks")
@Since("INSERT VERSION")
@Since("2.5")
public class ExprFertilizedBlocks extends SimpleExpression<BlockStateBlock> {

static {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
@Examples({"on heal:",
"\tif heal reason = satiated:",
"\t\tsend \"You ate enough food and gained health back!\" to player"})
@Since("INSERT VERSION")
@Since("2.5")
public class ExprHealReason extends SimpleExpression<RegainReason> {

static {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"\ttrigger:",
"\t\tsend \"You have been online for %difference between player's last login and now%.\"",
"\t\tsend \"You first joined the server %difference between player's first login and now% ago.\""})
@Since("INSERT VERSION")
@Since("2.5")
public class ExprLastLoginTime extends SimplePropertyExpression<OfflinePlayer, Date> {

private static boolean LAST_LOGIN = Skript.methodExists(OfflinePlayer.class, "getLastLogin");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@
public class ExprRelationalVariable<T> extends SimpleExpression<T> {

static {
if (Skript.isRunningMinecraft(1, 14)) {
// Temporarily disabled until bugs are fixed
if (false && Skript.isRunningMinecraft(1, 14)) {
Skript.registerExpression(ExprRelationalVariable.class, Object.class, ExpressionType.PROPERTY,
"[(relational|relation( |-)based) variable[s]] %objects% of %persistentdataholders/itemtypes/blocks%"
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
test "relational variables expression/condition" when minecraft version is "1.15.2":
test "relational variables expression/condition" when minecraft version is "1.99": #temporarily disabling this test

# Test entities holding relational variables

Expand Down

0 comments on commit 50ae1d5

Please sign in to comment.