Fixed DOm crash issue on game start.

Added Teleport to Hub
Fixed DisguiseManager bleeding over.
Fixed Teleport sub commands
This commit is contained in:
Jonathan Williams 2013-08-27 16:03:04 -07:00
parent 3fb52c5c71
commit c9dd8d87eb
5 changed files with 16 additions and 13 deletions

View File

@ -169,12 +169,6 @@
<fileset dir="../Mineplex.Core.Common/bin"> <fileset dir="../Mineplex.Core.Common/bin">
<include name="**/*.class"/> <include name="**/*.class"/>
</fileset> </fileset>
<fileset dir="../Mineplex.Minecraft.Shop/bin">
<include name="**/*.class"/>
</fileset>
<fileset dir="../Mineplex.Minecraft.Punish/bin">
<include name="**/*.class"/>
</fileset>
<fileset dir="../Mineplex.Minecraft.Game.Core/bin"> <fileset dir="../Mineplex.Minecraft.Game.Core/bin">
<include name="**/*.class"/> <include name="**/*.class"/>
</fileset> </fileset>

View File

@ -178,10 +178,10 @@ public class DisguiseManager extends MiniPlugin implements IPacketRunnable
if (_moveTempMap.containsKey(otherPlayer.getEntityId())) if (_moveTempMap.containsKey(otherPlayer.getEntityId()))
{ {
((CraftPlayer)player).getHandle().playerConnection.sendPacket(_moveTempMap.get(otherPlayer.getEntityId())); ((CraftPlayer)player).getHandle().playerConnection.sendPacket(_moveTempMap.get(otherPlayer.getEntityId()));
System.out.println("Sending buffer packet for (" + otherPlayer.getEntityId() + ") at " + _tickCount + " ticks"); //System.out.println("Sending buffer packet for (" + otherPlayer.getEntityId() + ") at " + _tickCount + " ticks");
} }
System.out.println("Player in the air."); //System.out.println("Player in the air.");
//((CraftPlayer)player).getHandle().playerConnection.sendPacket(new Packet34EntityTeleport(((CraftPlayer)otherPlayer).getHandle())); //((CraftPlayer)player).getHandle().playerConnection.sendPacket(new Packet34EntityTeleport(((CraftPlayer)otherPlayer).getHandle()));
} }
} }
@ -192,7 +192,7 @@ public class DisguiseManager extends MiniPlugin implements IPacketRunnable
if (_moveTempMap.containsKey(otherPlayer.getEntityId())) if (_moveTempMap.containsKey(otherPlayer.getEntityId()))
{ {
_moveTempMap.remove(otherPlayer.getEntityId()); _moveTempMap.remove(otherPlayer.getEntityId());
System.out.println("Cleared buffer packet for (" + otherPlayer.getEntityId() + ") at " + _tickCount + " ticks"); //System.out.println("Cleared buffer packet for (" + otherPlayer.getEntityId() + ") at " + _tickCount + " ticks");
} }
} }
} }
@ -244,6 +244,9 @@ public class DisguiseManager extends MiniPlugin implements IPacketRunnable
if (movePacket.a == owner.getEntityId()) if (movePacket.a == owner.getEntityId())
return true; return true;
if (!_spawnPacketMap.containsKey(movePacket.a))
return true;
if (movePacket.b + movePacket.c + movePacket.d == 0) if (movePacket.b + movePacket.c + movePacket.d == 0)
{ {
_movePacketMap.remove(movePacket.a); _movePacketMap.remove(movePacket.a);
@ -290,7 +293,7 @@ public class DisguiseManager extends MiniPlugin implements IPacketRunnable
if (!_moveTempMap.containsKey(movePacket.a)) if (!_moveTempMap.containsKey(movePacket.a))
{ {
_moveTempMap.put(movePacket.a, velocityPacket); _moveTempMap.put(movePacket.a, velocityPacket);
System.out.println("Added buffer velocity packet for (" + movePacket.a + ") : (" + velocityPacket.b + ", " + velocityPacket.c + ", " + velocityPacket.d + ") at " + _tickCount + " ticks"); //System.out.println("Added buffer velocity packet for (" + movePacket.a + ") : (" + velocityPacket.b + ", " + velocityPacket.c + ", " + velocityPacket.d + ") at " + _tickCount + " ticks");
} }
} }
}); });

View File

@ -13,6 +13,11 @@ public class TeleportCommand extends MultiCommandBase<Teleport>
public TeleportCommand(Teleport plugin) public TeleportCommand(Teleport plugin)
{ {
super(plugin, Rank.MODERATOR, "tp", "teleport"); super(plugin, Rank.MODERATOR, "tp", "teleport");
AddCommand(new AllCommand(plugin));
AddCommand(new BackCommand(plugin));
AddCommand(new HereCommand(plugin));
AddCommand(new SpawnCommand(plugin));
} }
@Override @Override

View File

@ -15,6 +15,7 @@ import mineplex.core.pet.PetManager;
import mineplex.core.portal.Portal; import mineplex.core.portal.Portal;
import mineplex.core.punish.Punish; import mineplex.core.punish.Punish;
import mineplex.core.recharge.Recharge; import mineplex.core.recharge.Recharge;
import mineplex.core.spawn.Spawn;
import mineplex.core.teleport.Teleport; import mineplex.core.teleport.Teleport;
import mineplex.core.updater.Updater; import mineplex.core.updater.Updater;
import mineplex.hub.server.ServerManager; import mineplex.hub.server.ServerManager;
@ -58,7 +59,7 @@ public class Hub extends JavaPlugin implements INautilusPlugin
new ServerManager(this, clientManager, donationManager, new Portal(this)); new ServerManager(this, clientManager, donationManager, new Portal(this));
new MemoryFix(this); new MemoryFix(this);
new DisguiseManager(this, new PacketHandler(this)); new DisguiseManager(this, new PacketHandler(this));
new Teleport(this, new Spawn(this)); new Teleport(this, clientManager, new Spawn(this));
//Updates //Updates
getServer().getScheduler().scheduleSyncRepeatingTask(this, new Updater(this), 1, 1); getServer().getScheduler().scheduleSyncRepeatingTask(this, new Updater(this), 1, 1);

View File

@ -494,9 +494,9 @@ public abstract class TeamGameEngine<GameType extends ITeamGame<ArenaType, Playe
{ {
((CraftPlayer)player.GetPlayer()).getHandle().playerConnection.sendPacket(packet); ((CraftPlayer)player.GetPlayer()).getHandle().playerConnection.sendPacket(packet);
} }
AddPlayerToScoreboards(player.GetPlayer(), player.GetTeam().GetTeamType().name());
} }
AddPlayerToScoreboards(player.GetPlayer(), player.GetTeam().GetTeamType().name());
} }
removeListPacket.clear(); removeListPacket.clear();