mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Proper warning about version/uuid changes
This commit is contained in:
parent
1608746afd
commit
f1163828f8
1 changed files with 6 additions and 2 deletions
|
@ -285,8 +285,12 @@ public class ResourcePackLoader implements RegistryLoader<Path, Map<String, Reso
|
||||||
ResourcePack newPack = ResourcePackLoader.readPack(pathPackCodec.path());
|
ResourcePack newPack = ResourcePackLoader.readPack(pathPackCodec.path());
|
||||||
UUID newUUID = newPack.manifest().header().uuid();
|
UUID newUUID = newPack.manifest().header().uuid();
|
||||||
if (newUUID.toString().equals(packId)) {
|
if (newUUID.toString().equals(packId)) {
|
||||||
GeyserImpl.getInstance().getLogger().info("Detected a new resource pack version (%s, old version %s) for pack at %s!"
|
if (packVersion.equals(newPack.manifest().header().version().toString())) {
|
||||||
|
GeyserImpl.getInstance().getLogger().info("No version or pack change detected: Was the resource pack server down?");
|
||||||
|
} else {
|
||||||
|
GeyserImpl.getInstance().getLogger().info("Detected a new resource pack version (%s, old version %s) for pack at %s!"
|
||||||
.formatted(packVersion, newPack.manifest().header().version().toString(), url));
|
.formatted(packVersion, newPack.manifest().header().version().toString(), url));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
GeyserImpl.getInstance().getLogger().info("Detected a new resource pack at the url %s!".formatted(url));
|
GeyserImpl.getInstance().getLogger().info("Detected a new resource pack at the url %s!".formatted(url));
|
||||||
}
|
}
|
||||||
|
@ -301,8 +305,8 @@ public class ResourcePackLoader implements RegistryLoader<Path, Map<String, Reso
|
||||||
Path path = geyserUrlPackCodec.getFallback().path();
|
Path path = geyserUrlPackCodec.getFallback().path();
|
||||||
try {
|
try {
|
||||||
GeyserImpl.getInstance().getScheduledThread().schedule(() -> {
|
GeyserImpl.getInstance().getScheduledThread().schedule(() -> {
|
||||||
deleteFile(path);
|
|
||||||
CACHED_FAILED_PACKS.invalidate(packId);
|
CACHED_FAILED_PACKS.invalidate(packId);
|
||||||
|
deleteFile(path);
|
||||||
}, 5, TimeUnit.MINUTES);
|
}, 5, TimeUnit.MINUTES);
|
||||||
} catch (RejectedExecutionException exception) {
|
} catch (RejectedExecutionException exception) {
|
||||||
// No scheduling here, probably because we're shutting down?
|
// No scheduling here, probably because we're shutting down?
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue