Merge branch 'main' of https://github.com/jonasbraus/Minecraft
This commit is contained in:
@@ -47,6 +47,7 @@ public class Server
|
||||
//[0] = 7: player position update
|
||||
//[0] = 8: player rotation update
|
||||
//[0] = 9: Save the World
|
||||
//[0] = 10: Player died
|
||||
|
||||
private void Receive()
|
||||
{
|
||||
@@ -249,6 +250,12 @@ public class Server
|
||||
{
|
||||
world.SaveWorld();
|
||||
}
|
||||
|
||||
//player died
|
||||
if (data[0] == 10)
|
||||
{
|
||||
Console.WriteLine(playerNames[GetPlayerID(endPoint)] + " died! \n");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user