Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Player count not decreasing #235

Closed
3 tasks done
Xujiayao opened this issue Jun 12, 2024 · 0 comments
Closed
3 tasks done

[Bug] Player count not decreasing #235

Xujiayao opened this issue Jun 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Xujiayao
Copy link
Owner

Xujiayao commented Jun 12, 2024

Checks

Minecraft Version

1.20.6

Discord-MC-Chat Version

Latest Build (GitHub Actions)

Description

The timing of invoking PLAYER_QUIT event should be RETURN, not HEAD.

This problem was not considered during the refactoring, which led to it persisting after the refactoring.

To Reproduce

  1. Start the server
  2. Record bot activity (0/20)
  3. Join the server
  4. Record bot activity (1/20)
  5. Leave the server
  6. Record bot activity (1/20)

Log

[15:01:57] [main/INFO]: Loading Minecraft 1.20.6 with Fabric Loader 0.15.11
[15:01:57] [main/INFO]: Loading 60 mods:
	- carpet 1.4.141+v240429
	- chatimage 1.2.4+1.20.5+fabric
	   |-- actionlib 1.1.1-fabric
	   |-- fabric-api-base 0.4.40+80f8cf510d
	   |-- fabric-command-api-v2 2.2.24+80f8cf510d
	   |-- fabric-key-binding-api-v1 1.0.45+80f8cf510d
	   |-- fabric-lifecycle-events-v1 2.3.4+c5fc38b30d
	   \-- io_github_kituin_chatimagecode 0.9.7
	- discord-mc-chat 2.3.3
	   |-- com_fasterxml_jackson_core_jackson-annotations 2.17.0
	   |-- com_fasterxml_jackson_core_jackson-core 2.17.0
	   |-- com_fasterxml_jackson_core_jackson-databind 2.17.0
	   |-- com_google_code_gson_gson 2.11.0
	   |-- com_neovisionaries_nv-websocket-client 2.14
	   |-- com_squareup_okhttp3_okhttp 4.12.0
	   |-- com_squareup_okio_okio-jvm 3.6.0
	   |-- discord-mc-chat-1_21 2.3.3
	   |-- net_dv8tion_jda 5.0.0-beta.24
	   |-- net_fellbaum_jemoji 1.3.4
	   |-- net_sf_trove4j_core 3.1.0
	   |-- org_apache_commons_commons-collections4 4.4
	   |-- org_jetbrains_kotlin_kotlin-stdlib 1.8.21
	   \-- org_slf4j_slf4j-api 2.0.13
	- fabric-api 0.100.2+1.20.6
	   |-- fabric-api-lookup-api-v1 1.6.59+e9d2a72bb0
	   |-- fabric-biome-api-v1 13.0.25+be5d88beb0
	   |-- fabric-block-api-v1 1.0.20+6dfe4c9bb0
	   |-- fabric-block-view-api-v2 1.0.8+80f8cf51b0
	   |-- fabric-blockrenderlayer-v1 1.1.50+80f8cf51b0
	   |-- fabric-client-tags-api-v1 1.1.12+7f945d5bb0
	   |-- fabric-command-api-v1 1.2.45+f71b366fb0
	   |-- fabric-commands-v0 0.2.62+df3654b3b0
	   |-- fabric-content-registries-v0 8.0.6+b82b2392b0
	   |-- fabric-convention-tags-v1 2.0.7+7f945d5bb0
	   |-- fabric-convention-tags-v2 2.1.3+f4bfb622b0
	   |-- fabric-crash-report-info-v1 0.2.27+80f8cf51b0
	   |-- fabric-data-attachment-api-v1 1.1.17+2a2c66b6b0
	   |-- fabric-data-generation-api-v1 19.2.3+a5d5299db0
	   |-- fabric-dimensions-v1 2.1.68+94793913b0
	   |-- fabric-entity-events-v1 1.6.8+e9d2a72bb0
	   |-- fabric-events-interaction-v0 0.7.6+c5fc38b3b0
	   |-- fabric-game-rule-api-v1 1.0.50+80f8cf51b0
	   |-- fabric-item-api-v1 8.2.3+6e5bbc4ab0
	   |-- fabric-item-group-api-v1 4.1.1+f4bfb622b0
	   |-- fabric-key-binding-api-v1 1.0.45+80f8cf51b0
	   |-- fabric-keybindings-v0 0.2.43+df3654b3b0
	   |-- fabric-loot-api-v2 3.0.6+97f703dab0
	   |-- fabric-message-api-v1 6.0.11+a7dc0e41b0
	   |-- fabric-model-loading-api-v1 1.0.12+80f8cf51b0
	   |-- fabric-models-v0 0.4.11+9386d8a7b0
	   |-- fabric-networking-api-v1 4.2.0+a916f7c5b0
	   |-- fabric-object-builder-api-v1 15.1.5+c5fc38b3b0
	   |-- fabric-particles-v1 4.0.0+c5fc38b3b0
	   |-- fabric-recipe-api-v1 5.0.5+c5fc38b3b0
	   |-- fabric-registry-sync-v0 5.0.18+a916f7c5b0
	   |-- fabric-renderer-api-v1 3.2.12+97f703dab0
	   |-- fabric-renderer-indigo 1.5.14+41791025b0
	   |-- fabric-renderer-registries-v1 3.2.61+df3654b3b0
	   |-- fabric-rendering-data-attachment-v1 0.3.46+73761d2eb0
	   |-- fabric-rendering-fluids-v1 3.1.3+2c869dedb0
	   |-- fabric-rendering-v0 1.1.64+df3654b3b0
	   |-- fabric-rendering-v1 4.2.4+b21c00cbb0
	   |-- fabric-resource-conditions-api-v1 4.2.0+a5d5299db0
	   |-- fabric-resource-loader-v0 1.1.1+f4bfb622b0
	   |-- fabric-screen-api-v1 2.0.21+7b70ea8ab0
	   |-- fabric-screen-handler-api-v1 1.3.75+8c7b71c2b0
	   |-- fabric-sound-api-v1 1.0.21+c5fc38b3b0
	   |-- fabric-transfer-api-v1 5.1.6+c5fc38b3b0
	   \-- fabric-transitive-access-wideners-v1 6.0.10+74e2f560b0
	- fabricloader 0.15.11
	   \-- mixinextras 0.3.5
	- java 21
	- lithium 0.12.5
	- minecraft 1.20.6
[15:01:57] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=file:/C:/Users/Xujiayao/Desktop/Server%201.20.6/libraries/net/fabricmc/sponge-mixin/0.13.3+mixin.0.8.5/sponge-mixin-0.13.3+mixin.0.8.5.jar Service=Knot/Fabric Env=SERVER
[15:01:57] [main/INFO]: Compatibility level set to JAVA_17
[15:01:57] [main/INFO]: Compatibility level set to JAVA_21
[15:01:57] [main/INFO]: Loaded configuration file for Lithium: 124 options available, 0 override(s) found
[15:01:58] [main/INFO]: Initializing MixinExtras via com.llamalad7.mixinextras.service.MixinExtrasServiceImpl(version=0.3.5).
[15:02:04] [main/INFO]: Mod chatimage Add 1 New HoverEvent
[15:02:04] [main/INFO]: Register All HoverEvent Counts: 4
[15:02:05] [main/INFO]: -----------------------------------------
[15:02:05] [main/INFO]: Discord-MC-Chat (DMCC) 2.3.3
[15:02:05] [main/INFO]: By Xujiayao
[15:02:05] [main/INFO]: 
[15:02:05] [main/INFO]: More information + Docs:
[15:02:05] [main/INFO]: https://blog.xujiayao.com/posts/4ba0a17a/
[15:02:05] [main/INFO]: -----------------------------------------
[15:02:06] [main/INFO]: Login Successful!
[15:02:07] [JDA MainWS-ReadThread/INFO]: Connected to WebSocket
[15:02:08] [JDA MainWS-ReadThread/INFO]: Finished Loading!
[15:02:08] [main/INFO]: Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, name=PROD]
[15:02:08] [main/INFO]: Found new data pack fabric, loading it automatically
[15:02:08] [main/INFO]: Found new data pack fabric-convention-tags-v2, loading it automatically
[15:02:09] [main/INFO]: No existing world data, creating new world
[15:02:09] [main/INFO]: Loaded 1175 recipes
[15:02:09] [main/INFO]: Loaded 1276 advancements
[15:02:10] [main/INFO]: Applied 0 biome modifications to 0 of 64 new biomes in 1.651 ms
[15:02:10] [Server thread/INFO]: Starting minecraft server version 1.20.6
[15:02:10] [Server thread/INFO]: Loading properties
[15:02:10] [Server thread/INFO]: Default game type: SURVIVAL
[15:02:10] [Server thread/INFO]: Generating keypair
[15:02:10] [Server thread/INFO]: Starting Minecraft server on *:25565
[15:02:10] [Server thread/INFO]: Using default channel type
[15:02:10] [Server thread/INFO]: Preparing level "world"
[15:02:12] [Server thread/INFO]: Preparing start region for dimension minecraft:overworld
[15:02:12] [Worker-Main-18/INFO]: Preparing spawn area: 2%
[15:02:13] [Worker-Main-19/INFO]: Preparing spawn area: 2%
[15:02:13] [Worker-Main-23/INFO]: Preparing spawn area: 34%
[15:02:14] [Worker-Main-2/INFO]: Preparing spawn area: 38%
[15:02:14] [Worker-Main-14/INFO]: Preparing spawn area: 38%
[15:02:15] [Worker-Main-19/INFO]: Preparing spawn area: 73%
[15:02:15] [Server thread/INFO]: Time elapsed: 2588 ms
[15:02:15] [Server thread/INFO]: Done (4.549s)! For help, type "help"
[15:02:23] [User Authenticator #1/INFO]: UUID of player Xujiayao is 69ca1318-24ef-4560-b35e-85865d85ab49
[15:02:24] [Server thread/INFO]: Xujiayao[/127.0.0.1:13944] logged in with entity id 56 at (233.5, 72.0, -175.5)
[15:02:24] [Server thread/INFO]: Xujiayao joined the game
[15:02:25] [Server thread/INFO]: Player Xujiayao joined with a matching carpet client
[15:02:57] [Server thread/INFO]: Xujiayao lost connection: Disconnected
[15:02:57] [Server thread/INFO]: Xujiayao left the game
[15:02:59] [User Authenticator #2/INFO]: UUID of player Xujiayao is 69ca1318-24ef-4560-b35e-85865d85ab49
[15:03:00] [Server thread/INFO]: Xujiayao[/127.0.0.1:14033] logged in with entity id 487 at (228.43895666053837, 73.0, -164.82772925737626)
[15:03:00] [Server thread/INFO]: Xujiayao joined the game
[15:03:00] [Server thread/INFO]: Player Xujiayao joined with a matching carpet client
[15:03:26] [Server thread/INFO]: <Xujiayao> test
[15:03:35] [Server thread/INFO]: Xujiayao lost connection: Disconnected
[15:03:35] [Server thread/INFO]: Xujiayao left the game
[15:05:22] [Server thread/INFO]: Stopping the server
[15:05:22] [Server thread/INFO]: Stopping server
[15:05:22] [Server thread/INFO]: Saving players
[15:05:22] [Server thread/INFO]: Saving worlds
[15:05:22] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:overworld
[15:05:23] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_nether
[15:05:23] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_end
[15:05:23] [Server thread/INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved
[15:05:23] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
[15:05:23] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved
[15:05:23] [Server thread/INFO]: ThreadedAnvilChunkStorage: All dimensions are saved

Config

{
  "generic": {
    "language": "zh_cn",
    "botToken": "REDACTED",
    "botPlayingStatus": "Minecraft (%onlinePlayerCount%/%maxPlayerCount%)",
    "botListeningStatus": "",
    "useWebhook": true,
    "channelId": "1023044766964928542",
    "consoleLogChannelId": "",
    "updateNotificationChannelId": "",
    "useUuidInsteadOfName": true,
    "avatarApi": "https://mc-heads.net/avatar/%player%.png",
    "broadcastPlayerCommandExecution": true,
    "broadcastSlashCommandExecution": true,
    "announceServerStartStop": true,
    "announcePlayerJoinLeave": true,
    "announceDeathMessages": true,
    "announceAdvancements": true,
    "broadcastChatMessages": true,
    "formatChatMessages": true,
    "allowedMentions": [
      "everyone",
      "users",
      "roles"
    ],
    "useServerNickname": true,
    "discordNewlineLimit": 3,
    "announceHighMspt": true,
    "msptCheckInterval": 5000,
    "msptLimit": 50,
    "whitelistRequiresAdmin": true,
    "notifyUpdates": true,
    "mentionAdminsForUpdates": true,
    "updateChannelTopic": false,
    "channelTopicUpdateInterval": 600000,
    "shutdownImmediately": false,
    "excludedCommands": [
      "/msg",
      "/tell",
      "/tellraw",
      "/w"
    ],
    "adminsIds": [
      "769470378073653269"
    ]
  },
  "multiServer": {
    "enable": false,
    "host": "127.0.0.1",
    "port": 5000,
    "name": "SMP",
    "botIds": []
  },
  "customMessage": {
    "unformattedResponseMessage": "",
    "unformattedChatMessage": "",
    "unformattedOtherMessage": "",
    "unformattedCommandNotice": "",
    "formattedResponseMessage": "",
    "formattedChatMessage": "",
    "formattedOtherMessage": "",
    "formattedCommandNotice": "",
    "messageWithoutWebhook": "",
    "messageWithoutWebhookForMultiServer": "",
    "serverStarted": "",
    "serverStopped": "",
    "joinServer": "",
    "leftServer": "",
    "deathMessage": "",
    "advancementTask": "",
    "advancementGoal": "",
    "advancementChallenge": "",
    "highMspt": "",
    "offlineChannelTopic": "",
    "onlineChannelTopic": "",
    "onlineChannelTopicForMultiServer": ""
  },
  "latestVersion": "2.3.2",
  "latestCheckTime": 1718062018733
}
@Xujiayao Xujiayao added the bug Something isn't working label Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant