Fixes parkour kill plane block names not being updated

This commit is contained in:
Kristian Knarvik 2023-08-18 17:54:39 +02:00
parent 407acf0ea2
commit a7cfe36c72

View File

@ -395,6 +395,7 @@ public class ParkourArena implements Arena {
*/ */
public boolean setKillPlaneBlocks(@NotNull Set<String> killPlaneBlockNames) { public boolean setKillPlaneBlocks(@NotNull Set<String> killPlaneBlockNames) {
if (killPlaneBlockNames.isEmpty()) { if (killPlaneBlockNames.isEmpty()) {
this.killPlaneBlockNames = null;
this.killPlaneBlocks = null; this.killPlaneBlocks = null;
} else { } else {
Set<Material> parsed = MaterialHelper.loadMaterialList(new ArrayList<>(killPlaneBlockNames), "+", Set<Material> parsed = MaterialHelper.loadMaterialList(new ArrayList<>(killPlaneBlockNames), "+",
@ -402,6 +403,7 @@ public class ParkourArena implements Arena {
if (parsed.isEmpty()) { if (parsed.isEmpty()) {
return false; return false;
} }
this.killPlaneBlockNames = killPlaneBlockNames;
this.killPlaneBlocks = parsed; this.killPlaneBlocks = parsed;
} }
this.parkourArenaHandler.saveArenas(); this.parkourArenaHandler.saveArenas();