Repository: mockbukkit/mockbukkit
Issue: Disconnect doesn't call PlayerQuitEvent if PlayerMock is constructed with ServerMock#addPlayer(String)

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Are you using the latest version of MockBukkit?

- [X] I am using the latest version of MockBukkit.

### Minecraft Version

1.19

### Describe the bug

Disconnect doesn't appear to be calling PlayerQuitEvent if the PlayerMock is built using only a name and not a UUID. If a player is created with just a name, no UUID, the `online` field in the PlayerMock is set to false, even though `isOnline()` will return true because they're in the online player list. `disconnect()` uses that `online` field to determine if the event should fire but it is `false`, so the event doesn't fire.

If I create the player with new and with a UUID, the disconnect method works as I would assume it should but with just the ServerMock#addPlayer it does not.

### Reproducible Test

```java
    @Test
    public void quitNoWork() {
        PlayerMock travja = server.addPlayer("Travja");
//        Comment ^ and uncomment below and it works
//        PlayerMock travja = new PlayerMock(server, "Travja", UUID.randomUUID());
//        server.addPlayer(travja);
        travja.disconnect();
        server.getPluginManager().assertEventFired(PlayerQuitEvent.class, e -> {
            System.out.println("Event was fired!");
            return true;
        });
    }
```

### Anything else?

[PlayerMock:164](https://github.com/MockBukkit/MockBukkit/blob/v1.19/src/main/java/be/seeseemelk/mockbukkit/entity/PlayerMock.java#L164) indicates the player should be considered offline, but this field is not updated when `ServerMock#addPlayer` is called.

Changed files:
src/test/java/be/seeseemelk/mockbukkit/entity/PlayerMockTest.java, src/main/java/be/seeseemelk/mockbukkit/entity/PlayerMock.java, src/main/java/be/seeseemelk/mockbukkit/ServerMock.java

diff --git a/src/main/java/be/seeseemelk/mockbukkit/ServerMock.java b/src/main/java/be/seeseemelk/mockbukkit/ServerMock.java
index 7c6e02af..64afa194 100644
--- a/src/main/java/be/seeseemelk/mockbukkit/ServerMock.java
+++ b/src/main/java/be/seeseemelk/mockbukkit/ServerMock.java
@@ -345,7 +345,7 @@ public class ServerMock extends Server.Spigot implements Server
 	public @NotNull PlayerMock addPlayer(@NotNull String name)
 	{
 		AsyncCatcher.catchOp("player add");
-		PlayerMock player = new PlayerMock(this, name);
+		PlayerMock player = new PlayerMock(this, name, UUID.randomUUID());
 		addPlayer(player);
 		return player;
 	}
diff --git a/src/main/java/be/seeseemelk/mockbukkit/entity/PlayerMock.java b/src/main/java/be/seeseemelk/mockbukkit/entity/PlayerMock.java
index a654fbb8..9c16cbdc 100644
--- a/src/main/java/be/seeseemelk/mockbukkit/entity/PlayerMock.java
+++ b/src/main/java/be/seeseemelk/mockbukkit/entity/PlayerMock.java
@@ -179,9 +179,7 @@ public class PlayerMock extends HumanEntityMock implements Player, SoundReceiver
 	 */
 	public PlayerMock(@NotNull ServerMock server, @NotNull String name)
 	{
-		this(server, name, UUID.nameUUIDFromBytes(("OfflinePlayer:" + name).getBytes(StandardCharsets.UTF_8)));
-		this.online = false;
-		this.scoreboard = server.getScoreboardManager().getMainScoreboard();
+		this(server, name, UUID.randomUUID());
 	}
 
 	/**
diff --git a/src/test/java/be/seeseemelk/mockbukkit/entity/PlayerMockTest.java b/src/test/java/be/seeseemelk/mockbukkit/entity/PlayerMockTest.java
index 72a61699..b667e48c 100644
--- a/src/test/java/be/seeseemelk/mockbukkit/entity/PlayerMockTest.java
+++ b/src/test/java/be/seeseemelk/mockbukkit/entity/PlayerMockTest.java
@@ -1783,7 +1783,7 @@ class PlayerMockTest
 	@Test
 	void testKickWithOfflinePlayer()
 	{
-		PlayerMock player = new PlayerMock(server, "testPlayer");
+		PlayerMock player = new PlayerMock(server, "testPlayer", UUID.randomUUID());
 		player.kick(Component.text("test"), PlayerKickEvent.Cause.KICK_COMMAND);
 		server.getPluginManager().assertEventNotFired(PlayerKickEvent.class);
 	}
@@ -2152,6 +2152,14 @@ class PlayerMockTest
 		});
 	}
 
+	@Test
+	void testPlayerQuitEventGetFired()
+	{
+		PlayerMock player = server.addPlayer("Player");
+		player.disconnect();
+		server.getPluginManager().assertEventFired(PlayerQuitEvent.class);
+	}
+
 	public static Stream<Arguments> provideInstrument()
 	{
 		return Stream.of(