Make Entities.Despawn public

This commit is contained in:
Goodlyay 2019-08-14 18:21:22 -07:00
parent 531c8969e0
commit 51ac5a1576

View File

@ -154,14 +154,14 @@ namespace MCGalaxy {
} }
} }
internal static void Despawn(Player dst, Player other) { public static void Despawn(Player dst, Player other) {
OnEntityDespawnedEvent.Call(other, dst); OnEntityDespawnedEvent.Call(other, dst);
byte id = other == dst ? SelfID : other.id; byte id = other == dst ? SelfID : other.id;
dst.Send(Packet.RemoveEntity(id)); dst.Send(Packet.RemoveEntity(id));
if (!Server.Config.TablistGlobal) TabList.Remove(dst, other); if (!Server.Config.TablistGlobal) TabList.Remove(dst, other);
} }
internal static void Despawn(Player dst, PlayerBot b) { public static void Despawn(Player dst, PlayerBot b) {
OnEntityDespawnedEvent.Call(b, dst); OnEntityDespawnedEvent.Call(b, dst);
dst.Send(Packet.RemoveEntity(b.id)); dst.Send(Packet.RemoveEntity(b.id));
if (Server.Config.TablistBots) TabList.Remove(dst, b); if (Server.Config.TablistBots) TabList.Remove(dst, b);