Skip to content

Commit 08e987f

Browse files
Merge branch 'dev/patch' into fix/null-enum-lang-names
2 parents bdc94e1 + 758e3f9 commit 08e987f

File tree

4 files changed

+23
-2
lines changed

4 files changed

+23
-2
lines changed

src/main/java/ch/njol/skript/classes/data/JavaClasses.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ public boolean mustSyncDeserialization() {
550550
.description("Text is simply text, i.e. a sequence of characters, which can optionally contain expressions which will be replaced with a meaningful representation " +
551551
"(e.g. %player% will be replaced with the player's name).",
552552
"Because scripts are also text, you have to put text into double quotes to tell Skript which part of the line is an effect/expression and which part is the text.",
553-
"Please read the article on <a href='./strings/'>Texts and Variable Names</a> to learn more.")
553+
"Please read the article on <a href='./text.html'>Texts and Variable Names</a> to learn more.")
554554
.usage("simple: \"...\"",
555555
"quotes: \"...\"\"...\"",
556556
"expressions: \"...%expression%...\"",

src/main/java/ch/njol/skript/entity/SimpleEntityData.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import org.bukkit.entity.Bat;
3333
import org.bukkit.entity.Blaze;
3434
import org.bukkit.entity.BlockDisplay;
35+
import org.bukkit.entity.Breeze;
3536
import org.bukkit.entity.Camel;
3637
import org.bukkit.entity.CaveSpider;
3738
import org.bukkit.entity.ChestedHorse;
@@ -130,6 +131,7 @@
130131
import org.bukkit.entity.WanderingTrader;
131132
import org.bukkit.entity.Warden;
132133
import org.bukkit.entity.WaterMob;
134+
import org.bukkit.entity.WindCharge;
133135
import org.bukkit.entity.Witch;
134136
import org.bukkit.entity.Wither;
135137
import org.bukkit.entity.WitherSkeleton;
@@ -310,6 +312,11 @@ private static void addSuperEntity(String codeName, Class<? extends Entity> enti
310312
addSuperEntity("display", Display.class);
311313
}
312314

315+
if (Skript.isRunningMinecraft(1, 20, 3)) {
316+
addSimpleEntity("breeze", Breeze.class);
317+
addSimpleEntity("wind charge", WindCharge.class);
318+
}
319+
313320
// Register zombie after Husk and Drowned to make sure both work
314321
addSimpleEntity("zombie", Zombie.class);
315322
// Register squid after glow squid to make sure both work

src/main/java/ch/njol/skript/expressions/ExprArmorSlot.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,13 @@ public class ExprArmorSlot extends PropertyExpression<LivingEntity, Slot> {
5656
@Nullable
5757
private EquipSlot slot;
5858
private boolean explicitSlot;
59+
private boolean isArmor;
5960

6061
@Override
6162
@SuppressWarnings("unchecked")
6263
public boolean init(Expression<?>[] exprs, int matchedPattern, Kleenean isDelayed, ParseResult parseResult) {
63-
slot = parseResult.hasTag("armour") ? null : EquipSlot.valueOf(parseResult.tags.get(0).toUpperCase(Locale.ENGLISH));
64+
isArmor = parseResult.hasTag("armour");
65+
slot = isArmor ? null : EquipSlot.valueOf(parseResult.tags.get(0).toUpperCase(Locale.ENGLISH));
6466
explicitSlot = parseResult.hasTag("slot"); // User explicitly asked for SLOT, not item
6567
setExpr((Expression<? extends LivingEntity>) exprs[0]);
6668
return true;
@@ -92,6 +94,11 @@ protected Slot[] get(Event event, LivingEntity[] source) {
9294
});
9395
}
9496

97+
@Override
98+
public boolean isSingle() {
99+
return !isArmor && super.isSingle();
100+
}
101+
95102
@Override
96103
public Class<Slot> getReturnType() {
97104
return Slot.class;

src/main/resources/lang/default.lang

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,6 +1241,13 @@ entities:
12411241
text display:
12421242
name: text display¦s
12431243
pattern: text display(|1¦s)
1244+
# 1.20.3 Entities
1245+
breeze:
1246+
name: breeze¦s
1247+
pattern: breeze(|1¦s)
1248+
wind charge:
1249+
name: wind charge¦s
1250+
pattern: wind charge(|1¦s)
12441251

12451252
# -- Heal Reasons --
12461253
heal reasons:

0 commit comments

Comments
 (0)