@@ -34,7 +34,6 @@ 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 ;
3837 private static int PARTICLES_DELAY ;
3938 private static List <String > heads ;
4039 private static Plugin plugin ;
@@ -69,9 +68,6 @@ public void onEnable() {
6968 config .set ("core.update-speed" , 7 );
7069 UPDATE_SPEED = 7 ;
7170 }
72- TASK_DELAY = config .getInt ("core.task-delay" );
73- if (TASK_DELAY <= 0 )
74- config .set ("core.task-delay" , 7 );
7571 PARTICLES_DELAY = config .getInt ("core.particles-delay" );
7672 if (PARTICLES_DELAY <= 0 )
7773 config .set ("particles-delay" , 35 );
@@ -127,8 +123,8 @@ public void onEnable() {
127123 LUCK_CHANCE_ENABLED = config .getBoolean ("xmas.luck.enabled" );
128124 LUCK_CHANCE = (float ) config .getInt ("xmas.luck.chance" ) / 100 ;
129125 new Events ().registerListener ();
130- new MagicTask (this ).runTaskTimer (this , 5 , TASK_DELAY );
131- new MagicTaskParticles (this ).runTaskTimerAsynchronously (this , 5 , PARTICLES_DELAY );
126+ new MagicTask (this ).runTaskTimer (this , 5 , UPDATE_SPEED );
127+ new PlayParticlesTask (this ).runTaskTimerAsynchronously (this , 5 , PARTICLES_DELAY );
132128 XMas .XMAS_CRYSTAL = new ItemMaker (Material .EMERALD , LocaleManager .CRYSTAL_NAME , LocaleManager .CRYSTAL_LORE ).make ();
133129
134130 ShapedRecipe grinderRecipe ;
@@ -146,7 +142,7 @@ public void onEnable() {
146142 try {
147143 if (!registered )
148144 getServer ().addRecipe (grinderRecipe );
149- } catch (Exception e ) {
145+ } catch (Exception ignored ) {
150146 }
151147 XMasCommand .register (this );
152148 TextUtils .sendConsoleMessage (LocaleManager .PLUGIN_ENABLED );
0 commit comments