Fixed FileUpdater.

Added FileUpdater to DOM and Arcade.
This commit is contained in:
Jonathan Williams 2013-09-02 04:19:56 -07:00
parent d0098b8a46
commit 8840f04977
3 changed files with 11 additions and 0 deletions

View File

@ -40,6 +40,9 @@ public class FileUpdater extends MiniPlugin
if (event.getType() != UpdateType.SLOWER)
return;
if (!_needUpdate)
return;
RestartServerEvent restartEvent = new RestartServerEvent();
GetPluginManager().callEvent(restartEvent);
@ -114,6 +117,8 @@ public class FileUpdater extends MiniPlugin
if (!md5.equals(_jarMd5Map.get(f.getName())))
{
System.out.println(f.getName() + " old jar : " + _jarMd5Map.get(f.getName()));
System.out.println(f.getName() + " new jar : " + md5);
_needUpdate = true;
}
}

View File

@ -29,11 +29,13 @@ import mineplex.core.message.MessageManager;
import mineplex.core.npc.NpcManager;
import mineplex.core.packethandler.PacketHandler;
import mineplex.core.pet.PetManager;
import mineplex.core.portal.Portal;
import mineplex.core.projectile.ProjectileManager;
import mineplex.core.punish.Punish;
import mineplex.core.recharge.Recharge;
import mineplex.core.spawn.Spawn;
import mineplex.core.teleport.Teleport;
import mineplex.core.updater.FileUpdater;
import mineplex.core.updater.Updater;
import mineplex.minecraft.game.core.combat.CombatManager;
import mineplex.minecraft.game.core.condition.ConditionManager;
@ -106,6 +108,7 @@ public class Arcade extends JavaPlugin implements INautilusPlugin, IPlugin
GetCreature();
GetSpawn();
GetTeleport();
new FileUpdater(this, new Portal(this));
PacketHandler packetHandler = new PacketHandler(this);
DisguiseManager disguiseManager = new DisguiseManager(this, packetHandler);

View File

@ -19,6 +19,7 @@ import mineplex.core.message.MessageManager;
import mineplex.core.movement.Movement;
import mineplex.core.npc.NpcManager;
import mineplex.core.packethandler.PacketHandler;
import mineplex.core.portal.Portal;
import mineplex.core.projectile.ProjectileManager;
import mineplex.core.punish.Punish;
import mineplex.core.recharge.Recharge;
@ -27,6 +28,7 @@ import mineplex.core.server.ServerListener;
import mineplex.core.server.ServerTalker;
import mineplex.core.spawn.Spawn;
import mineplex.core.teleport.Teleport;
import mineplex.core.updater.FileUpdater;
import mineplex.core.updater.Updater;
import mineplex.minecraft.game.classcombat.Class.ClassManager;
import mineplex.minecraft.game.classcombat.Condition.SkillConditionManager;
@ -124,6 +126,7 @@ public abstract class GamePlugin extends JavaPlugin implements IRelation
new MemoryFix(this);
new PistonJump(this);
new Weapon(this, Energy);
new FileUpdater(this, new Portal(this));
getServer().getScheduler().scheduleSyncRepeatingTask(this, updater, 1, 1);