Only schedule the updater task once
This commit is contained in:
parent
51443ebd46
commit
f8fce22d06
|
@ -8,19 +8,10 @@ public abstract class DisguiseHuman extends DisguiseLiving
|
|||
public DisguiseHuman(EntityType disguiseType, org.bukkit.entity.Entity entity)
|
||||
{
|
||||
super(disguiseType, entity);
|
||||
|
||||
byte skin = 0;
|
||||
skin |= (1 << 0); //Enable Cape
|
||||
skin |= (1 << 1); //Enable Jacket
|
||||
skin |= (1 << 2); //Enable Left Sleeve
|
||||
skin |= (1 << 3); //Enable Right Sleeve
|
||||
skin |= (1 << 4); //Enable Left Pants
|
||||
skin |= (1 << 5); //Enable Right Pants
|
||||
skin |= (1 << 6); //Enable Hat
|
||||
|
||||
DataWatcher.a(10, (byte) skin, EntityHuman.META_SKIN, (byte) skin);
|
||||
DataWatcher.a(10, (byte) 127, EntityHuman.META_SKIN, (byte) 127);
|
||||
DataWatcher.a(16, (byte) 1, EntityHuman.META_CAPE, (byte) 1);
|
||||
DataWatcher.a(17, Float.valueOf(0.0F), EntityHuman.META_SCALED_HEALTH, 0f);
|
||||
DataWatcher.a(18, Integer.valueOf(0), EntityHuman.META_SCORE, 0);
|
||||
DataWatcher.a(17, 0F, EntityHuman.META_SCALED_HEALTH, 0F);
|
||||
DataWatcher.a(18, 0, EntityHuman.META_SCORE, 0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,16 +1,18 @@
|
|||
package mineplex.core.updater;
|
||||
|
||||
import mineplex.core.MiniPlugin;
|
||||
import mineplex.core.ReflectivelyCreateMiniPlugin;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
public class Updater implements Runnable
|
||||
@ReflectivelyCreateMiniPlugin
|
||||
public class Updater extends MiniPlugin implements Runnable
|
||||
{
|
||||
private JavaPlugin _plugin;
|
||||
|
||||
public Updater(JavaPlugin plugin)
|
||||
private Updater()
|
||||
{
|
||||
_plugin = plugin;
|
||||
super("Updater Task");
|
||||
|
||||
_plugin.getServer().getScheduler().scheduleSyncRepeatingTask(_plugin, this, 0L, 1L);
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ public class EnjinTranslator extends JavaPlugin
|
|||
//Main Modules
|
||||
new Enjin(this, clientManager, donationManager, new InventoryManager(this, clientManager));
|
||||
|
||||
new Updater(this);
|
||||
require(Updater.class);
|
||||
}
|
||||
|
||||
public String GetWebServerAddress()
|
||||
|
|
|
@ -208,7 +208,7 @@ public class Clans extends JavaPlugin
|
|||
}
|
||||
|
||||
//Updates
|
||||
new Updater(this);
|
||||
require(Updater.class);
|
||||
|
||||
MinecraftServer.getServer().getPropertyManager().setProperty("debug", false);
|
||||
SpigotConfig.debug = false;
|
||||
|
|
|
@ -176,7 +176,7 @@ public class ClansHub extends JavaPlugin
|
|||
Teleport teleport = new Teleport(this, clientManager);
|
||||
|
||||
//Updates
|
||||
getServer().getScheduler().scheduleSyncRepeatingTask(this, new Updater(this), 1, 1);
|
||||
require(Updater.class);
|
||||
|
||||
require(TrackManager.class);
|
||||
require(Titles.class);
|
||||
|
|
|
@ -198,7 +198,7 @@ public class Hub extends JavaPlugin implements IRelation
|
|||
new VelocityFix(this);
|
||||
|
||||
//Updates
|
||||
new Updater(this);
|
||||
require(Updater.class);
|
||||
|
||||
require(Titles.class);
|
||||
require(TwoFactorAuth.class);
|
||||
|
|
|
@ -84,7 +84,7 @@ public class StaffServer extends JavaPlugin
|
|||
new CustomerSupport(this, clientManager, donationManager, powerPlayRepo, inventoryManager, bonusRepository);
|
||||
|
||||
//Updates
|
||||
getServer().getScheduler().scheduleSyncRepeatingTask(this, new Updater(this), 1, 1);
|
||||
require(Updater.class);
|
||||
|
||||
MinecraftServer.getServer().getPropertyManager().setProperty("debug", false);
|
||||
SpigotConfig.debug = false;
|
||||
|
|
|
@ -231,7 +231,7 @@ public class Arcade extends JavaPlugin
|
|||
require(SoundNotifier.class);
|
||||
|
||||
//Updates
|
||||
getServer().getScheduler().scheduleSyncRepeatingTask(this, new Updater(this), 1, 1);
|
||||
require(Updater.class);
|
||||
|
||||
MinecraftServer.getServer().getPropertyManager().setProperty("debug", false);
|
||||
SpigotConfig.debug = false;
|
||||
|
|
|
@ -147,7 +147,7 @@ public class Hub extends JavaPlugin
|
|||
new SimpleChatManager(this, _clientManager, achievementManager);
|
||||
|
||||
// Updates
|
||||
getServer().getScheduler().scheduleSyncRepeatingTask(this, new Updater(this), 1, 1);
|
||||
require(Updater.class);
|
||||
|
||||
MinecraftServer.getServer().getPropertyManager().setProperty("debug", false);
|
||||
SpigotConfig.debug = false;
|
||||
|
|
|
@ -298,7 +298,7 @@ public class GemHunters extends JavaPlugin
|
|||
new Leaderboards();
|
||||
|
||||
// UpdateEvent!!!
|
||||
new Updater(this);
|
||||
require(Updater.class);
|
||||
|
||||
// Disable spigot's item merging
|
||||
for (World world : getServer().getWorlds())
|
||||
|
|
Loading…
Reference in New Issue