Skip to content

Commit 1131c10

Browse files
committed
fix: upgrade shop prefab, applying enchantment upgrade
1 parent 12adc55 commit 1131c10

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

plugin/bukkit/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ runTestServer {
5151
jvmArgs("-Dio.papermc.paper.suppress.sout.nags=true", "-DPaper.IgnoreJavaVersion=true")
5252
serverProperties {
5353
onlineMode(false)
54+
property("level-type", "flat")
5455
}
5556
}
5657
}

plugin/common/src/main/java/org/screamingsandals/bedwars/game/upgrade/builtin/EnchantmentUpgradeHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public void handle(@NotNull UpgradeLevelChangedEventImpl event) {
5858
for (int i = 0; i < contents.length; i++) {
5959
var item = contents[i];
6060

61-
if (!item.is(applyTo)) {
61+
if (item == null || !item.is(applyTo)) {
6262
continue;
6363
}
6464

@@ -100,7 +100,7 @@ public void handle(@NotNull PlayerRespawnedEventImpl event) {
100100
for (int i = 0; i < contents.length; i++) {
101101
var item = contents[i];
102102

103-
if (!item.is(applyTo)) {
103+
if (item == null || !item.is(applyTo)) {
104104
continue;
105105
}
106106

plugin/common/src/main/resources/variants/certain-popular-server.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,10 @@ upgrades:
202202
pitch: 1
203203
volume: 1
204204

205-
# TODO: prefabs (already done shops with skin, shop file etc.)
206205
prefabs:
207-
# Usage: /bw admin <arena> prefab upgradeShop
208-
upgradeShop:
206+
# Usage: /bw admin <arena> prefab upgrade-shop
207+
upgrade-shop:
209208
type: command
210209
commands:
211210
- /bw admin %game% store add
212-
- /bw admin %game% store file set certain-popular-server/upgradeShop.yml
211+
- /bw admin %game% store file set certain-popular-server/upgrade-shop.yml

0 commit comments

Comments
 (0)