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] NoSuchFileException when transferring files from a single player world #187

Closed
3 tasks done
Xaenchan opened this issue Sep 14, 2023 · 1 comment
Closed
3 tasks done
Labels
bug Something isn't working

Comments

@Xaenchan
Copy link

Xaenchan commented Sep 14, 2023

Checks

Minecraft Version

1.20.1

MC-Discord-Chat Version

Latest Build

Description

MC-Discord-Chat doesn't find the proper world name/folder on a server, when the world files are imported from a single player world.
It looks up the name from level.dat instead of server.properties (or whatever) which can raise NoSuchFileException if you have such a case of a diffrent world name.

To Reproduce

Make a world in single player and use another world name then "world" or what ever name you gonna use when you transfer it to a server

Log

[06:02:43] [main/INFO]: Loading Minecraft 1.20.1 with Fabric Loader 0.14.22
[06:02:43] [main/INFO]: Loading 59 mods:
    - fabric-api 0.88.1+1.20.1
       |-- fabric-api-base 0.4.30+7abfd51577
       |-- fabric-api-lookup-api-v1 1.6.35+4d8536c977
       |-- fabric-biome-api-v1 13.0.10+b3afc78b77
       |-- fabric-block-api-v1 1.0.10+92a0d36777
       |-- fabric-block-view-api-v2 1.0.0+92a0d36777
       |-- fabric-blockrenderlayer-v1 1.1.40+b3afc78b77
       |-- fabric-client-tags-api-v1 1.1.1+97bb207577
       |-- fabric-command-api-v1 1.2.33+f71b366f77
       |-- fabric-command-api-v2 2.2.12+b3afc78b77
       |-- fabric-commands-v0 0.2.50+df3654b377
       |-- fabric-containers-v0 0.1.63+df3654b377
       |-- fabric-content-registries-v0 4.0.9+b3afc78b77
       |-- fabric-convention-tags-v1 1.5.4+a1a980da77
       |-- fabric-crash-report-info-v1 0.2.18+aeb40ebe77
       |-- fabric-data-generation-api-v1 12.2.2+1e61dba177
       |-- fabric-dimensions-v1 2.1.53+8536527b77
       |-- fabric-entity-events-v1 1.5.22+b3afc78b77
       |-- fabric-events-interaction-v0 0.6.1+e91849a877
       |-- fabric-events-lifecycle-v0 0.2.62+df3654b377
       |-- fabric-game-rule-api-v1 1.0.38+b04edc7a77
       |-- fabric-item-api-v1 2.1.27+b3afc78b77
       |-- fabric-item-group-api-v1 4.0.10+23d9108177
       |-- fabric-key-binding-api-v1 1.0.36+fb8d95da77
       |-- fabric-keybindings-v0 0.2.34+df3654b377
       |-- fabric-lifecycle-events-v1 2.2.21+b3afc78b77
       |-- fabric-loot-api-v2 1.1.39+b3afc78b77
       |-- fabric-loot-tables-v1 1.1.43+9e7660c677
       |-- fabric-message-api-v1 5.1.7+3265161977
       |-- fabric-mining-level-api-v1 2.1.49+b3afc78b77
       |-- fabric-model-loading-api-v1 1.0.2+709a987177
       |-- fabric-models-v0 0.4.1+9386d8a777
       |-- fabric-networking-api-v1 1.3.10+eeb8eb3677
       |-- fabric-networking-v0 0.3.50+df3654b377
       |-- fabric-object-builder-api-v1 11.1.1+6beca84877
       |-- fabric-particles-v1 1.1.1+201a23a077
       |-- fabric-recipe-api-v1 1.0.20+b3afc78b77
       |-- fabric-registry-sync-v0 2.3.2+4df89eb277
       |-- fabric-renderer-api-v1 3.1.3+92a0d36777
       |-- fabric-renderer-indigo 1.4.3+6bdb2ed077
       |-- fabric-renderer-registries-v1 3.2.45+df3654b377
       |-- fabric-rendering-data-attachment-v1 0.3.36+92a0d36777
       |-- fabric-rendering-fluids-v1 3.0.27+b3afc78b77
       |-- fabric-rendering-v0 1.1.48+df3654b377
       |-- fabric-rendering-v1 3.0.7+b3afc78b77
       |-- fabric-resource-conditions-api-v1 2.3.5+ea08f9d877
       |-- fabric-resource-loader-v0 0.11.9+132c48c177
       |-- fabric-screen-api-v1 2.0.7+b3afc78b77
       |-- fabric-screen-handler-api-v1 1.3.29+b3afc78b77
       |-- fabric-sound-api-v1 1.0.12+b3afc78b77
       |-- fabric-transfer-api-v1 3.3.1+195226a777
       \-- fabric-transitive-access-wideners-v1 4.3.0+6c31357e77
    - fabricloader 0.14.22
    - java 18
    - lithium 0.11.2
    - mcdiscordchat 2.2.0
       |-- com_fasterxml_jackson_core_jackson-annotations 2.14.1
       |-- com_fasterxml_jackson_core_jackson-core 2.14.1
       |-- com_fasterxml_jackson_core_jackson-databind 2.14.1
       |-- com_google_code_gson_gson 2.10.1
       |-- com_neovisionaries_nv-websocket-client 2.14
       |-- com_squareup_okhttp3_okhttp 4.11.0
       |-- com_squareup_okio_okio 2.10.0
       |-- com_vdurmont_emoji-java 5.1.1
       |-- mcdiscordchat-1_20_x 2.2.0
       |-- net_dv8tion_jda 5.0.0-beta.12
       |-- net_sf_trove4j_trove4j 3.0.3
       |-- org_apache_commons_commons-collections4 4.4
       |-- org_jetbrains_kotlin_kotlin-stdlib 1.6.20
       |-- org_json_json 20230227
       \-- org_slf4j_slf4j-api 1.7.36
    - minecraft 1.20.1
[06:02:43] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=file:/home/container/libraries/net/fabricmc/sponge-mixin/0.12.5+mixin.0.8.5/sponge-mixin-0.12.5+mixin.0.8.5.jar Service=Knot/Fabric Env=SERVER
[06:02:43] [main/INFO]: Compatibility level set to JAVA_16
[06:02:43] [main/INFO]: Compatibility level set to JAVA_17
[06:02:44] [main/INFO]: Loaded configuration file for Lithium: 115 options available, 0 override(s) found
[06:02:48] [main/INFO]: -----------------------------------------
[06:02:48] [main/INFO]: MCDiscordChat (MCDC) 2.2.0
[06:02:48] [main/INFO]: By Xujiayao
[06:02:48] [main/INFO]: 
[06:02:48] [main/INFO]: More information + Docs:
[06:02:48] [main/INFO]: https://blog.xujiayao.top/posts/4ba0a17a/
[06:02:48] [main/INFO]: -----------------------------------------
[06:02:49] [main/INFO]: Login Successful!
[06:02:49] [JDA MainWS-WriteThread/INFO]: Connected to WebSocket
[06:02:50] [JDA MainWS-ReadThread/INFO]: Finished Loading!
[06:02:50] [Thread-1/INFO]: [ConsoleLog] Starting new ConsoleLogListener
[06:02:50] [Thread-1/INFO]: [ConsoleLog] Listening to new latest.log
[06:02:50] [main/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[06:02:51] [main/INFO]: Loaded 7 recipes
[06:02:51] [main/INFO]: Loaded 1271 advancements
[06:02:52] [main/INFO]: Applied 0 biome modifications to 0 of 64 new biomes in 1.174 ms
[06:02:52] [Server thread/INFO]: Starting minecraft server version 1.20.1
[06:02:52] [Server thread/INFO]: Loading properties
[06:02:52] [Server thread/INFO]: Default game type: SURVIVAL
[06:02:52] [Server thread/INFO]: Generating keypair
[06:02:52] [Server thread/INFO]: Starting Minecraft server on 0.0.0.0:2101
[06:02:52] [Server thread/INFO]: Using epoll channel type
[06:02:52] [Server thread/INFO]: Preparing level "world"
[06:02:56] [Server thread/INFO]: Preparing start region for dimension minecraft:overworld
[06:02:59] [Worker-Main-1/INFO]: Preparing spawn area: 0%
[06:02:59] [Worker-Main-1/INFO]: Preparing spawn area: 0%
[06:02:59] [Worker-Main-1/INFO]: Preparing spawn area: 0%
[06:02:59] [Worker-Main-1/INFO]: Preparing spawn area: 0%
[06:02:59] [Worker-Main-1/INFO]: Preparing spawn area: 0%
[06:02:59] [Worker-Main-1/INFO]: Preparing spawn area: 0%
[06:02:59] [Worker-Main-1/INFO]: Preparing spawn area: 0%
[06:03:00] [Worker-Main-1/INFO]: Preparing spawn area: 0%
[06:03:00] [Server thread/INFO]: Time elapsed: 4216 ms
[06:03:00] [Server thread/INFO]: Done (8.194s)! For help, type "help"
[06:03:00] [Server thread/INFO]: Starting GS4 status listener
[06:03:00] [Server thread/INFO]: Thread Query Listener started
[06:03:00] [Query Listener #1/INFO]: Query running on 0.0.0.0:2011
[06:03:00] [Timer-2/ERROR]: Uncaught exception in thread "Timer-2"
java.io.UncheckedIOException: Nokkoism ^-^/stats
    at org.apache.commons.io.FileUtils.listFiles(FileUtils.java:2153) ~[commons-io-2.11.0.jar:?]
    at top.xujiayao.mcdiscordchat.utils.Utils$3.run(Utils.java:410) ~[mcdiscordchat-1_20_x-2.2.0-a47a716b5f3984a3.jar:?]
    at java.util.TimerThread.mainLoop(Timer.java:566) ~[?:?]
    at java.util.TimerThread.run(Timer.java:516) ~[?:?]
Caused by: java.nio.file.NoSuchFileException: Nokkoism ^-^/stats
    at sun.nio.fs.UnixException.translateToIOException(UnixException.java:92) ~[?:?]
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) ~[?:?]
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]
    at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55) ~[?:?]
    at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:148) ~[?:?]
    at sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99) ~[?:?]
    at java.nio.file.Files.readAttributes(Files.java:1851) ~[?:?]
    at java.nio.file.FileTreeWalker.getAttributes(FileTreeWalker.java:226) ~[?:?]
    at java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:277) ~[?:?]
    at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:323) ~[?:?]
    at java.nio.file.FileTreeIterator.<init>(FileTreeIterator.java:71) ~[?:?]
    at java.nio.file.Files.walk(Files.java:3918) ~[?:?]
    at org.apache.commons.io.file.PathUtils.walk(PathUtils.java:1044) ~[commons-io-2.11.0.jar:?]
    at org.apache.commons.io.FileUtils.streamFiles(FileUtils.java:2971) ~[commons-io-2.11.0.jar:?]
    at org.apache.commons.io.FileUtils.listFiles(FileUtils.java:2151) ~[commons-io-2.11.0.jar:?]
    ... 3 more

Config

{
  "generic": {
    "language": "en_us",
    "botToken": "x",
    "botPlayingStatus": "Minecraft (%onlinePlayerCount%/%maxPlayerCount%)",
    "botListeningStatus": "",
    "useWebhook": true,
    "channelId": "x",
    "consoleLogChannelId": "x",
    "updateNotificationChannelId": "x",
    "useUuidInsteadOfName": true,
    "avatarApi": "https://mc-heads.net/avatar/%player%.png",
    "broadcastPlayerCommandExecution": false,
    "broadcastSlashCommandExecution": true,
    "announceServerStartStop": true,
    "announcePlayerJoinLeave": true,
    "announceDeathMessages": false,
    "announceAdvancements": false,
    "broadcastChatMessages": true,
    "formatChatMessages": true,
    "allowedMentions": [
      "users",
      "roles"
    ],
    "useServerNickname": true,
    "discordNewlineLimit": 4,
    "announceHighMspt": true,
    "msptCheckInterval": 5000,
    "msptLimit": 50,
    "notifyUpdates": true,
    "mentionAdminsForUpdates": true,
    "updateChannelTopic": true,
    "channelTopicUpdateInterval": 600005,
    "shutdownImmediately": false,
    "excludedCommands": [
      "/msg",
      "/tell",
      "/tellraw",
      "/w"
    ],
    "adminsIds": [
      "x",
      "x"
    ]
  },
  "multiServer": {
    "enable": false,
    "host": "127.0.0.1",
    "port": 5000,
    "name": "SMP",
    "botIds": []
  },
  "customMessage": {
    "unformattedResponseMessage": "",
    "unformattedChatMessage": "",
    "unformattedOtherMessage": "",
    "unformattedCommandNotice": "",
    "formattedResponseMessage": "",
    "formattedChatMessage": "",
    "formattedOtherMessage": "",
    "formattedCommandNotice": "",
    "serverStarted": "",
    "serverStopped": "",
    "joinServer": "",
    "leftServer": "",
    "deathMessage": "",
    "advancementTask": "",
    "advancementGoal": "",
    "advancementChallenge": "",
    "highMspt": "",
    "offlineChannelTopic": "",
    "onlineChannelTopic": "",
    "onlineChannelTopicForMultiServer": ""
  },
  "latestVersion": "2.2.0",
  "latestCheckTime": 1694364852533
}
@Xaenchan Xaenchan added the bug Something isn't working label Sep 14, 2023
@Xaenchan Xaenchan changed the title [Bug] NoSuchFileException when using files from a single player world [Bug] NoSuchFileException when transferring files from a single player world Sep 14, 2023
@Xujiayao
Copy link
Owner

Hi. Actually, issue #38 is not the same issue as this one. This issue is the same as issue #139 instead.

I have found a method to fix this just now. You may try the latest build.

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

2 participants