@@ -34,6 +34,8 @@ public class Main extends JavaPlugin implements Listener {
3434 static long endTime ;
3535 static boolean inProgress ;
3636 private static int UPDATE_SPEED ;
37+ private static int TASK_DELAY ;
38+ private static int PARTICLES_DELAY ;
3739 private static List <String > heads ;
3840 private static Plugin plugin ;
3941 private FileConfiguration config ;
@@ -67,6 +69,13 @@ public void onEnable() {
6769 config .set ("core.update-speed" , 7 );
6870 UPDATE_SPEED = 7 ;
6971 }
72+ TASK_DELAY = config .getInt ("core.task-delay" );
73+ if (TASK_DELAY <= 0 )
74+ config .set ("core.task-delay" , 7 );
75+ PARTICLES_DELAY = config .getInt ("core.particles-delay" );
76+ if (PARTICLES_DELAY <= 0 )
77+ config .set ("particles-delay" , 35 );
78+
7079 autoEnd = config .getBoolean ("core.holiday-ends.enabled" );
7180 resourceBack = config .getBoolean ("core.holiday-ends.resource-back" );
7281 MAX_TREE_COUNT = config .getInt ("core.tree-limit" );
@@ -118,7 +127,8 @@ public void onEnable() {
118127 LUCK_CHANCE_ENABLED = config .getBoolean ("xmas.luck.enabled" );
119128 LUCK_CHANCE = (float ) config .getInt ("xmas.luck.chance" ) / 100 ;
120129 new Events ().registerListener ();
121- new MagicTask (this ).runTaskTimer (this , 5 , UPDATE_SPEED );
130+ new MagicTask (this ).runTaskTimer (this , 5 , TASK_DELAY );
131+ new MagicTaskParticles (this ).runTaskTimer (this , 5 , PARTICLES_DELAY );
122132 XMas .XMAS_CRYSTAL = new ItemMaker (Material .EMERALD , LocaleManager .CRYSTAL_NAME , LocaleManager .CRYSTAL_LORE ).make ();
123133
124134 ShapedRecipe grinderRecipe ;
0 commit comments