@@ -34,6 +34,7 @@ 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 PARTICLES_DELAY ;
3738 private static List <String > heads ;
3839 private static Plugin plugin ;
3940 private FileConfiguration config ;
@@ -67,6 +68,10 @@ public void onEnable() {
6768 config .set ("core.update-speed" , 7 );
6869 UPDATE_SPEED = 7 ;
6970 }
71+ PARTICLES_DELAY = config .getInt ("core.particles-delay" );
72+ if (PARTICLES_DELAY <= 0 )
73+ config .set ("particles-delay" , 35 );
74+
7075 autoEnd = config .getBoolean ("core.holiday-ends.enabled" );
7176 resourceBack = config .getBoolean ("core.holiday-ends.resource-back" );
7277 MAX_TREE_COUNT = config .getInt ("core.tree-limit" );
@@ -119,6 +124,7 @@ public void onEnable() {
119124 LUCK_CHANCE = (float ) config .getInt ("xmas.luck.chance" ) / 100 ;
120125 new Events ().registerListener ();
121126 new MagicTask (this ).runTaskTimer (this , 5 , UPDATE_SPEED );
127+ new PlayParticlesTask (this ).runTaskTimerAsynchronously (this , 5 , PARTICLES_DELAY );
122128 XMas .XMAS_CRYSTAL = new ItemMaker (Material .EMERALD , LocaleManager .CRYSTAL_NAME , LocaleManager .CRYSTAL_LORE ).make ();
123129
124130 ShapedRecipe grinderRecipe ;
@@ -136,7 +142,7 @@ public void onEnable() {
136142 try {
137143 if (!registered )
138144 getServer ().addRecipe (grinderRecipe );
139- } catch (Exception e ) {
145+ } catch (Exception ignored ) {
140146 }
141147 XMasCommand .register (this );
142148 TextUtils .sendConsoleMessage (LocaleManager .PLUGIN_ENABLED );
0 commit comments