11/*
2- * The MIT License (MIT)
2+ * The MIT License (MIT)
33 *
4- * Copyright © 2025, Alps BTE <[email protected] > 4+ * Copyright © 2021- 2025, Alps BTE <[email protected] > 55 *
66 * Permission is hereby granted, free of charge, to any person obtaining a copy
77 * of this software and associated documentation files (the "Software"), to deal
4040import com .alpsbte .plotsystem .core .system .tutorial .stage .tasks .message .ChatMessageTask ;
4141import com .alpsbte .plotsystem .core .system .tutorial .utils .TutorialUtils ;
4242import com .alpsbte .plotsystem .utils .Utils ;
43- import com .alpsbte .plotsystem .utils .io .*;
43+ import com .alpsbte .plotsystem .utils .io .ConfigPaths ;
44+ import com .alpsbte .plotsystem .utils .io .ConfigUtil ;
45+ import com .alpsbte .plotsystem .utils .io .LangPaths ;
46+ import com .alpsbte .plotsystem .utils .io .LangUtil ;
47+ import com .alpsbte .plotsystem .utils .io .TutorialPaths ;
4448import net .kyori .adventure .text .Component ;
4549import net .kyori .adventure .text .event .ClickEvent ;
4650import net .kyori .adventure .text .event .HoverEvent ;
47- import org .bukkit .*;
51+ import org .bukkit .Bukkit ;
52+ import org .bukkit .Location ;
53+ import org .bukkit .Material ;
54+ import org .bukkit .World ;
4855import org .bukkit .block .data .BlockData ;
4956import org .bukkit .configuration .file .FileConfiguration ;
5057import org .bukkit .entity .Player ;
5158import org .bukkit .util .Vector ;
5259
5360import java .io .IOException ;
54- import java .util .*;
61+ import java .util .ArrayList ;
62+ import java .util .Arrays ;
63+ import java .util .Collections ;
64+ import java .util .HashMap ;
65+ import java .util .List ;
66+ import java .util .Map ;
67+ import java .util .UUID ;
5568
56- import static com .alpsbte .plotsystem .core .system .tutorial .utils .TutorialUtils .*;
69+ import static com .alpsbte .alpslib .utils .AlpsUtils .deserialize ;
70+ import static com .alpsbte .plotsystem .core .system .tutorial .utils .TutorialUtils .Delay ;
5771import static com .alpsbte .plotsystem .core .system .tutorial .utils .TutorialUtils .Sound ;
72+ import static com .alpsbte .plotsystem .core .system .tutorial .utils .TutorialUtils .TEXT_CLICK_HIGHLIGHT ;
73+ import static com .alpsbte .plotsystem .core .system .tutorial .utils .TutorialUtils .TEXT_HIGHLIGHT_END ;
74+ import static com .alpsbte .plotsystem .core .system .tutorial .utils .TutorialUtils .TEXT_HIGHLIGHT_START ;
75+ import static com .alpsbte .plotsystem .core .system .tutorial .utils .TutorialUtils .getDocumentationLinks ;
76+ import static com .alpsbte .plotsystem .core .system .tutorial .utils .TutorialUtils .setBlockAt ;
5877import static net .kyori .adventure .text .Component .text ;
59- import static com .alpsbte .alpslib .utils .AlpsUtils .deserialize ;
60- import static net .kyori .adventure .text .format .NamedTextColor .*;
78+ import static net .kyori .adventure .text .format .NamedTextColor .DARK_GRAY ;
79+ import static net .kyori .adventure .text .format .NamedTextColor .GRAY ;
80+ import static net .kyori .adventure .text .format .NamedTextColor .GREEN ;
6181import static net .kyori .adventure .text .format .TextDecoration .BOLD ;
6282
6383public class BeginnerTutorial extends AbstractPlotTutorial {
@@ -106,7 +126,7 @@ public void onTutorialComplete(UUID playerUUID) {
106126 Bukkit .getScheduler ().runTaskLaterAsynchronously (PlotSystem .getPlugin (), () -> {
107127 sendTutorialCompletedTipMessage (getPlayer ());
108128 getPlayer ().playSound (getPlayer ().getLocation (), Utils .SoundUtils .NOTIFICATION_SOUND , 1f , 1f );
109- }, 20 * 7 );
129+ }, 20 * 7L );
110130 }
111131
112132 private static class Stage1 extends AbstractPlotStage {
@@ -312,8 +332,7 @@ public StageTimeline getTimeline() {
312332 }
313333
314334 private static class Stage5 extends AbstractPlotStage {
315- private final static String BASE_BLOCK = ConfigUtil .getTutorialInstance ().getBeginnerTutorial ().getString (TutorialPaths .Beginner .BASE_BLOCK );
316- private final static int BASE_BLOCK_ID = ConfigUtil .getTutorialInstance ().getBeginnerTutorial ().getInt (TutorialPaths .Beginner .BASE_BLOCK_ID );
335+ private static final List <String > BASE_BLOCKS = ConfigUtil .getTutorialInstance ().getBeginnerTutorial ().getStringList (TutorialPaths .Beginner .BASE_BLOCKS );
317336
318337 protected Stage5 (Player player , TutorialPlot plot ) {
319338 super (player , 1 , plot , 1 );
@@ -335,7 +354,7 @@ public List<String> setMessages() {
335354 @ Override
336355 protected List <String > setTasks () {
337356 return LangUtil .getInstance ().getList (getPlayer (), LangPaths .Tutorials .Beginner .STAGE5_TASKS ,
338- TEXT_HIGHLIGHT_START + "//line " + BASE_BLOCK . toLowerCase () + TEXT_HIGHLIGHT_END );
357+ TEXT_HIGHLIGHT_START + "//line " + BASE_BLOCKS . getFirst () + TEXT_HIGHLIGHT_END );
339358 }
340359
341360 @ Override
@@ -364,7 +383,7 @@ public StageTimeline getTimeline() {
364383 }, Sound .NPC_TALK , false )
365384 .delay (Delay .TASK_START )
366385 .addTask (new PlotPermissionChangeTask (getPlayer (), false , true ))
367- .addTask (new LineCmdEventTask (getPlayer (), deserialize (getTasks ().getFirst ()), BASE_BLOCK , BASE_BLOCK_ID , buildingLinePoints , ((minPoint , maxPoint ) -> {
386+ .addTask (new LineCmdEventTask (getPlayer (), deserialize (getTasks ().getFirst ()), BASE_BLOCKS , buildingLinePoints , ((minPoint , maxPoint ) -> {
368387 if (minPoint != null && maxPoint != null ) {
369388 buildingLinePoints .remove (minPoint );
370389
@@ -381,8 +400,8 @@ public StageTimeline getTimeline() {
381400 }
382401
383402 private static class Stage6 extends AbstractPlotStage {
384- private final static int HEIGHT = ConfigUtil .getTutorialInstance ().getBeginnerTutorial ().getInt (TutorialPaths .Beginner .HEIGHT );
385- private final static int HEIGHT_OFFSET = ConfigUtil .getTutorialInstance ().getBeginnerTutorial ().getInt (TutorialPaths .Beginner .HEIGHT_OFFSET );
403+ private static final int HEIGHT = ConfigUtil .getTutorialInstance ().getBeginnerTutorial ().getInt (TutorialPaths .Beginner .HEIGHT );
404+ private static final int HEIGHT_OFFSET = ConfigUtil .getTutorialInstance ().getBeginnerTutorial ().getInt (TutorialPaths .Beginner .HEIGHT_OFFSET );
386405
387406 protected Stage6 (Player player , TutorialPlot plot ) {
388407 super (player , 1 , plot , 2 );
0 commit comments