Phoenix616 / ResourcepacksPlugins

Set resource packs on whole proxy, per server and per world!
https://ci.minebench.de/job/ResourcepacksPlugins/
GNU General Public License v3.0
77 stars 16 forks source link

[FIXED] Sending Wrong resource packs #47

Closed nix-007 closed 3 years ago

nix-007 commented 3 years ago
  gamepack:
    variants:
    - url: https://www.dropbox.com/s/7v60qh52ysekv4o/new.zip?dl=1
      hash: bb97164a572c9790541088a6e02ce803f60e52be
      format: 6
      version: '1.16'
      restricted: `false`
      permission: worldresourcepacks.pack.gamepack-variant-1
      variants: null
    - url: https://www.dropbox.com/s/bwez9ofhg3hw0y5/legacy_cvcmar17zip.zip?dl=1
      hash: c00ceeb39916f930cc8ec9f8e529bb059cc3deac
      format: 1
      version: '1.8'
      restricted: false
      permission: worldresourcepacks.pack.gamepack-variant-2
      variants: null
    restricted: false
    permission: worldresourcepacks.pack.gamepack
this does not check the version it just sends the first variant always
Phoenix616 commented 3 years ago

Please provide your full log with enabled debug mode and config file too please.

nix-007 commented 3 years ago

config.yml

# Default language
debug: true
default-language: en
disable-metrics: false
autogeneratehashes: true
usepack-is-temporary: true
stored-packs-override-assignments: false
permanent-pack-remove-time: 30
packs:
  lobbypack:
    url: http://example.com/lobbyresourcepack.zip
    hash: abcdef012345678abcdef012345678abcdef0123
    format: 1
    version: '1.8'
    restricted: false
    permission: worldresourcepacks.pack.lobbypack
  lobbypacs:
    url: http://example.com/new.zip
    hash: abcdef012345678abcdef012345678abcdef0122
    format: 6
    version: '1.16'
    restricted: false
    permission: worldresourcepacks.pack.lobbypacs
  gamepack:
    variants:
    - url: https://www.dropbox.com/s/bwez9ofhg3hw0y5/legacy_cvcmar17zip.zip?dl=1
      hash: c00ceeb39916f930cc8ec9f8e529bb059cc3deac
      format: 1
      version: '1.8'
      restricted: false
      permission: worldresourcepacks.pack.gamepack
      variants: null
    - url: https://www.dropbox.com/s/0j51aqx7nn04smx/rip.zip?dl=1
      hash: 26792abb82b4768eabaac8df8f94f60e5dd7bbe0
      format: 6
      version: '1.16'
      restricted: false
      permission: worldresourcepacks.pack.gamepack-variant-1
      variants: null
    restricted: false
    permission: worldresourcepacks.pack.gamepack
empty:
  url: http://cdn.moep.tv/files/Empty.zip
  hash: 01517226212d27586ea0c5d6aff1aa5492dd2484
global:
  pack: gamepack
  send-delay: 10
worlds:
  worlds:
    pack: lobbypack
  minigame:
    pack: gamepack
    regex: minigame_.*
nix-007 commented 3 years ago

log

[11:11:21] [Server thread/INFO]: [WorldResourcepacks] Loading config!
[11:11:21] [Server thread/INFO]: [WorldResourcepacks] Debug level: INFO
[11:11:21] [Server thread/INFO]: [WorldResourcepacks] Found locale en!
[11:11:21] [Server thread/INFO]: [WorldResourcepacks] [DEBUG] Loading packs:
[11:11:21] [Server thread/INFO]: [WorldResourcepacks] lobbypack - http://example.com/lobbyresourcepack.zip - abcdef012345678abcdef012345678abcdef0123
[11:11:21] [Server thread/INFO]: [WorldResourcepacks] [DEBUG] {url=http://example.com/lobbyresourcepack.zip, hash=abcdef012345678abcdef012345678abcdef0123, format=1, version=1.8, restricted=false, permission=worldresourcepacks.pack.lobbypack, variants=null}
[11:11:21] [Server thread/INFO]: [WorldResourcepacks] lobbypacs - http://example.com/new.zip - abcdef012345678abcdef012345678abcdef0122
[11:11:21] [Server thread/INFO]: [WorldResourcepacks] [DEBUG] {url=http://example.com/new.zip, hash=abcdef012345678abcdef012345678abcdef0122, format=6, version=1.16, restricted=false, permission=worldresourcepacks.pack.lobbypacs, variants=null}
[11:11:21] [Server thread/INFO]: [WorldResourcepacks] gamepack - 2 variants
[11:11:21] [Server thread/INFO]: [WorldResourcepacks] [DEBUG] {url=null, hash=null, format=null, version=null, restricted=false, permission=worldresourcepacks.pack.gamepack, variants=[{url=https://www.dropbox.com/s/bwez9ofhg3hw0y5/legacy_cvcmar17zip.zip?dl=1, hash=c00ceeb39916f930cc8ec9f8e529bb059cc3deac, format=1, version=1.8, restricted=false, permission=worldresourcepacks.pack.gamepack, variants=null}, {url=https://www.dropbox.com/s/0j51aqx7nn04smx/rip.zip?dl=1, hash=bb97164a572c9790541088a6e02ce803f60e52be, format=6, version=1.16, restricted=false, permission=worldresourcepacks.pack.gamepack-variant-1, variants=null}]}
[11:11:21] [Server thread/INFO]: [WorldResourcepacks] Empty pack - http://cdn.moep.tv/files/Empty.zip - 01517226212d27586ea0c5d6aff1aa5492dd2484
[11:11:21] [Server thread/INFO]: [WorldResourcepacks] Loading global assignment...
[11:11:21] [Server thread/INFO]: [WorldResourcepacks] [DEBUG] Pack: gamepack
[11:11:21] [Server thread/INFO]: [WorldResourcepacks] [DEBUG] Send delay: 10
[11:11:21] [Server thread/INFO]: [WorldResourcepacks] [DEBUG] Loaded PackAssignment{name=global, pack=gamepack, secondaries=[], sendDelay=10}
[11:11:21] [Server thread/INFO]: [WorldResourcepacks] Loading world assignments...
[11:11:21] [Server thread/INFO]: [WorldResourcepacks] Loading assignment for world worlds...
[11:11:21] [Server thread/INFO]: [WorldResourcepacks] [DEBUG] Pack: lobbypack
[11:11:21] [Server thread/INFO]: [WorldResourcepacks] [DEBUG] Loaded PackAssignment{name=worlds, pack=lobbypack, secondaries=[], sendDelay=-1}
[11:11:21] [Server thread/INFO]: [WorldResourcepacks] Loading assignment for world minigame...
[11:11:21] [Server thread/INFO]: [WorldResourcepacks] [DEBUG] Regex: minigame_.*
[11:11:21] [Server thread/INFO]: [WorldResourcepacks] [DEBUG] Pack: gamepack
[11:11:21] [Server thread/INFO]: [WorldResourcepacks] [DEBUG] Loaded PackAssignment{name=minigame, pack=gamepack, secondaries=[], sendDelay=-1, regex=minigame_.*}
[11:11:21] [Server thread/INFO]: [WorldResourcepacks] [DEBUG] Stored packs override assignments: false
[11:11:21] [Server thread/WARN]: [WorldResourcepacks] Could not get version of the server! (1.16.4-R0.1-SNAPSHOT/1.16.4)
[11:11:21] [Server thread/INFO]: [WorldResourcepacks] Detected ViaVersion 3.2.1
[11:11:21] [Server thread/INFO]: Running delayed init tasks
[11:11:21] [Server thread/INFO]: [ViaVersion] ViaVersion detected server version: 1.16.4(754)
[11:11:21] [Craft Scheduler Thread - 3/INFO]: [WorldResourcepacks] Generating hashes...
[11:11:21] [Craft Scheduler Thread - 3/INFO]: [WorldResourcepacks] Downloading lobbypack...
[11:11:22] [Server thread/INFO]: [ViaVersion] Finished mapping loading, shutting down loader executor!
[11:11:22] [Server thread/INFO]: Done (6.685s)! For help, type "help"
[11:11:22] [Server thread/WARN]: [io.papermc.paper.util.PaperJvmChecker] ************************************************************
[11:11:22] [Server thread/WARN]: [io.papermc.paper.util.PaperJvmChecker] * WARNING - YOU ARE RUNNING AN OUTDATED VERSION OF JAVA.
[11:11:22] [Server thread/WARN]: [io.papermc.paper.util.PaperJvmChecker] * PAPER WILL STOP BEING COMPATIBLE WITH THIS VERSION OF
[11:11:22] [Server thread/WARN]: [io.papermc.paper.util.PaperJvmChecker] * JAVA WHEN MINECRAFT 1.17 IS RELEASED.
[11:11:22] [Server thread/WARN]: [io.papermc.paper.util.PaperJvmChecker] *
[11:11:22] [Server thread/WARN]: [io.papermc.paper.util.PaperJvmChecker] * Please update the version of Java you use to run Paper
[11:11:22] [Server thread/WARN]: [io.papermc.paper.util.PaperJvmChecker] * to at least Java 11. When Paper for Minecraft 1.17 is
[11:11:22] [Server thread/WARN]: [io.papermc.paper.util.PaperJvmChecker] * released support for versions of Java before 11 will
[11:11:22] [Server thread/WARN]: [io.papermc.paper.util.PaperJvmChecker] * be dropped.
[11:11:22] [Server thread/WARN]: [io.papermc.paper.util.PaperJvmChecker] *
[11:11:22] [Server thread/WARN]: [io.papermc.paper.util.PaperJvmChecker] * Current Java version: 1.8.0_51
[11:11:22] [Server thread/WARN]: [io.papermc.paper.util.PaperJvmChecker] *
[11:11:22] [Server thread/WARN]: [io.papermc.paper.util.PaperJvmChecker] * Check this forum post for more information: 
[11:11:22] [Server thread/WARN]: [io.papermc.paper.util.PaperJvmChecker] *   https://papermc.io/java11
[11:11:22] [Server thread/WARN]: [io.papermc.paper.util.PaperJvmChecker] ************************************************************
[11:11:22] [Server thread/INFO]: Timings Reset
[11:11:22] [Craft Scheduler Thread - 3/ERROR]: [WorldResourcepacks] Could not load lobbypack! http://example.com/lobbyresourcepack.zip
[11:11:22] [Craft Scheduler Thread - 3/INFO]: [WorldResourcepacks] Downloading lobbypacs...
[11:11:22] [Craft Scheduler Thread - 3/ERROR]: [WorldResourcepacks] Could not load lobbypacs! http://example.com/new.zip
[11:11:22] [Craft Scheduler Thread - 3/INFO]: [WorldResourcepacks] Downloading gamepack-variant-1...
[11:11:25] [Craft Scheduler Thread - 3/INFO]: [WorldResourcepacks] SHA 1 hash of gamepack-variant-1: c00ceeb39916f930cc8ec9f8e529bb059cc3deac
[11:11:25] [Craft Scheduler Thread - 3/INFO]: [WorldResourcepacks] Downloading gamepack-variant-2...
[11:11:33] [Craft Scheduler Thread - 3/INFO]: [WorldResourcepacks] SHA 1 hash of gamepack-variant-2: 26792abb82b4768eabaac8df8f94f60e5dd7bbe0
[11:11:33] [Craft Scheduler Thread - 3/INFO]: [WorldResourcepacks] Downloading empty...
[11:11:33] [Craft Scheduler Thread - 3/INFO]: [WorldResourcepacks] SHA 1 hash of empty: 01517226212d27586ea0c5d6aff1aa5492dd2484
[11:11:33] [Craft Scheduler Thread - 3/INFO]: [WorldResourcepacks] Hashes of 1 packs changed! Saving to config.
[11:12:51] [User Authenticator #1/INFO]: UUID of player 0_NiX is 2367f506-f14e-31a1-b1b7-7d6ecfe46bc9
[11:12:51] [Server thread/INFO]: 0_NiX joined the game
[11:12:51] [Server thread/INFO]: 0_NiX[/192.168.0.105:50580] logged in with entity id 11 at ([hub]27.918995171662218, 132.0, 22.30504897375303)
[11:12:52] [Server thread/INFO]: [WorldResourcepacks] [DEBUG] 0_NiX matched assignment global due to main pack variant
[11:12:52] [Server thread/INFO]: [WorldResourcepacks] [DEBUG] Send pack gamepack-variant-1 (https://www.dropbox.com/s/bwez9ofhg3hw0y5/legacy_cvcmar17zip.zip?dl=1) to 0_NiX
[11:14:16] [Server thread/INFO]: 0_NiX lost connection: Disconnected
[11:14:16] [Server thread/INFO]: 0_NiX left the game
[11:14:22] [User Authenticator #2/INFO]: UUID of player 0_NiX is 2367f506-f14e-31a1-b1b7-7d6ecfe46bc9
[11:14:22] [Server thread/INFO]: 0_NiX joined the game
[11:14:22] [Server thread/INFO]: 0_NiX[/192.168.0.105:50606] logged in with entity id 12 at ([hub]27.918995171662218, 132.0, 22.30504897375303)
[11:14:22] [Server thread/INFO]: [WorldResourcepacks] [DEBUG] 0_NiX matched assignment global due to main pack variant
[11:14:22] [Server thread/INFO]: [WorldResourcepacks] [DEBUG] Send pack gamepack-variant-1 (https://www.dropbox.com/s/bwez9ofhg3hw0y5/legacy_cvcmar17zip.zip?dl=1) to 0_NiX
nix-007 commented 3 years ago

I can't figure out what is wrong in this. Yesterday when I tested it worked fine for some time, and after a restart, it got broken again.

Phoenix616 commented 3 years ago

The order of your variants is wrong. They get checked one after another so you need to specify the higher version before the lower one (as newer clients can use old packs but not the other way around)

Also you didn't provide the full log so please either do that or provide your used plugin version as well.