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

global pack not enabled #14

Closed
SlimeDog opened this issue Aug 17, 2018 · 10 comments
Closed

global pack not enabled #14

SlimeDog opened this issue Aug 17, 2018 · 10 comments

Comments

@SlimeDog
Copy link

SlimeDog commented Aug 17, 2018

Spigot 1.13 latest
WRP 1.6.19-b215

Player meets "global" specification. Player is in world and world_lobby. In both cases, the blackpack (default) is not enabled.

This worked correctly with b214. Do I need to change the configuration?

config.yml

# World Resourcepacks configuration

debug: true

# Whether or not resourcepack file hashes should be generated on startup:
autogeneratehashes: true
messages:
  usepack: You are now using pack %pack%!
  packlisthead: "Packs available to you:"
  nopacks: No packs found!

packs:
# lobbypack: 
#   # The url the client should download the resourcepack from.
#   # Has to be a direct download link! No medifaire/mega/other oneclick-hoster!
#   url: https://github.com/Phoenix616/ResourcepacksPlugins/blob/master/Empty.zip?raw=true
#   # The sha1 hash of the resourcepack's zip file, 
#   # Not supported by bukkit so it currently does not matter what you write here!
#   hash: abcdef012345678abcdef012345678abcdef0123
#   # The format version of this resourcepack
#   # 1 is for 1.8 packs
#   # 2 is for 1.9
#   # 3 is for 1.12
#   # 4 is for 1.13
#   format: 1
#   # Whether or not this pack will only be send to players with a certain permission
#   # permission: worldresourcepacks.pack.<packname>
#   restricted: false
#   # If you want you can define a specific permission for this pack if you don't want
#   # the default worldresourcepacks.pack.<packname> permission!
#   permission: worldresourcepacks.pack.lobbypack

  blackpack:
    url: http://ELIDED/blackdog-4.zip?u=0
    hash: 21473b7cc3177fe993298bb15acf67a80d37bece
    format: 4
    restricted: false

  whitepack:
    url: http://ELIDED/whitedog-4.zip?u=0
    hash: 461a76eca7d44a3a50fc2f9a3413af4607b1808f
    format: 4
    restricted: false

  yellowpack:
    url: http://ELIDED/yellowdog-4.zip?u=0
    hash: ed085f0a575ab655a0d54a91a31c738db5606475
    format: 4
    restricted: false

  # Empty pack to reset the pack to the default one
  emptypack:
    # url: https://github.com/Phoenix616/ResourcepacksPlugins/blob/master/Empty.zip?raw=true
    url: http://ELIDED/Empty-4.zip?raw=true
    hash: 34820eb0b89b5c8ec7bb58cfc2e5e1712a131d4d
    format: 4
    restricted: false

# Name of the pack to use for resetting of the pack for servers which don't have one assigned
empty: blackpack

server:
  pack: blackpack

  # List of packs to not replace if the user already has them
  # If no main pack is set the first one also gets used to reset 
  # the pack if the user has a non secondary one
  # Also this list will be used to select a pack if a user does not have the permission
  # or the right version to use that pack. (From top to bottom)
  # secondary:
  # - emptypack

worlds:
  world_whitedog:
    pack: whitepack
  world_whitedog_nether:
    pack: whitepack
  world_whitedog_the_end:
    pack: whitepack
  world_yellowdog:
    pack: yellowpack
  world_yellowdog_nether:
    pack: yellowpack
  world_yellowdog_the_end:
    pack: yellowpack
@Phoenix616
Copy link
Owner

Commit 025485c changed it so that the empty pack will no longer be send when the user doesn't have any packs to avoid unnecessary pack sends and client lag. Simply set a different pack as the empty one (e.g. the emptypack ;)) and it should work properly.

@SlimeDog
Copy link
Author

Unfortunately, I cannot set

emptypack:
  <same as blackpack>

as that generates an error that there is already a pack with the same hash. :(

How should I change the configuration above to get the desired result, which is

  • blackpack should be the server default
  • whitepack and yellowpack should be used as indicated
  • blackpack should be used in all cases where no pack is specified

@Phoenix616
Copy link
Owner

Phoenix616 commented Aug 17, 2018

The empty pack is there to reset the textures to the Vanilla default without any changes. There should be no reason to set the empty pack to the same value as another pack with content because if you have a global server pack then it will always apply that in the case that no other world matches. So the matching world pack (or the global server one) will always be used for resetting purposes.

With your config the empty one would never be used as the global server config catches everything.

@SlimeDog
Copy link
Author

Unfortunately, as indicated above, the configuration

  server:
    pack: blackpack

is not respected. I tried both

/wrp reload

and server restart. Perhaps I am not understanding the new configuration. My expectation is that all worlds not enumerated in the worlds list will default to blackpack, but they do not.

@Phoenix616
Copy link
Owner

Phoenix616 commented Aug 17, 2018

As I said: The player does not get the pack applied that you set as the empty one in the empty setting if he doesn't have one already. Set it to emptypack and it should work. If not, please provide the full, modified config.

@SlimeDog
Copy link
Author

# World Resourcepacks configuration

debug: true

# Whether or not resourcepack file hashes should be generated on startup:
autogeneratehashes: true
messages:
  usepack: You are now using pack %pack%!
  packlisthead: "Packs available to you:"
  nopacks: No packs found!

packs:
# lobbypack: 
#   # The url the client should download the resourcepack from.
#   # Has to be a direct download link! No medifaire/mega/other oneclick-hoster!
#   url: https://github.com/Phoenix616/ResourcepacksPlugins/blob/master/Empty.zip?raw=true
#   # The sha1 hash of the resourcepack's zip file, 
#   # Not supported by bukkit so it currently does not matter what you write here!
#   hash: abcdef012345678abcdef012345678abcdef0123
#   # The format version of this resourcepack
#   # 1 is for 1.8 packs
#   # 2 is for 1.9-1.10
#   # 3 is for 1.11-1.12
#   # 4 is for 1.13 and above
#   format: 1
#   # Whether or not this pack will only be send to players with a certain permission
#   # permission: worldresourcepacks.pack.<packname>
#   restricted: false
#   # If you want you can define a specific permission for this pack if you don't want
#   # the default worldresourcepacks.pack.<packname> permission!
#   permission: worldresourcepacks.pack.lobbypack

  blackpack:
    url: http://ELIDED/blackdog-4.zip?u=0
    hash: 21473b7cc3177fe993298bb15acf67a80d37bece
    format: 4
    restricted: false

  whitepack:
    url: http://ELIDED/whitedog-4.zip?u=0
    hash: 461a76eca7d44a3a50fc2f9a3413af4607b1808f
    format: 4
    restricted: false

  yellowpack:
    url: http://ELIDED/yellowdog-4.zip?u=0
    hash: ed085f0a575ab655a0d54a91a31c738db5606475
    format: 4
    restricted: false

  # Empty pack to reset the pack to the default one
  emptypack:
    # url: https://github.com/Phoenix616/ResourcepacksPlugins/blob/master/Empty.zip?raw=true
    url: http://ELIDED/Empty-4.zip?raw=true
    hash: 34820eb0b89b5c8ec7bb58cfc2e5e1712a131d4d
    format: 4
    restricted: false

# Name of the pack to use for resetting of the pack for servers which don't have one assigned
empty: blackpack

server:
  pack: blackpack

  # List of packs to not replace if the user already has them
  # If no main pack is set the first one also gets used to reset 
  # the pack if the user has a non secondary one
  # Also this list will be used to select a pack if a user does not have the permission
  # or the right version to use that pack. (From top to bottom)
  # secondary:
  # - emptypack

#   Use a regex to target all worlds with a certain name
#   regex: 'minigame_.*'
worlds:
  world_whitedog:
    pack: whitepack
  world_whitedog_nether:
    pack: whitepack
  world_whitedog_the_end:
    pack: whitepack
  world_yellowdog:
    pack: yellowpack
  world_yellowdog_nether:
    pack: yellowpack
  world_yellowdog_the_end:
    pack: yellowpack

@Phoenix616
Copy link
Owner

Change empty: blackpack to empty: emptypack and it should work.

@SlimeDog
Copy link
Author

Thanks. Now we get the blackpack in the unenumerated worlds. However, in previous versions of WRP, the switch between worlds with blackpack was (nearly) instantaneous. With b215, the pack is clearly reloaded again, meaning 5-6 seconds delay. The players live with that delay when they change packs (ie., traverse to whitedog or yellowdog, or back), but I would prefer not to have the delay between the blackpack worlds. Did I misconfigure?

@Phoenix616
Copy link
Owner

It's not supposed to re-send the pack when switching between worlds that have the same one. Can you confirm that it prints the pack send messages in the log when you switch between two worlds that have the same pack/both none?

@SlimeDog
Copy link
Author

OK, it must be Spigot 1.13 that is causing the new delay. WRP reports only

[WorldResourcepacks] PLAYER matched global assignment

and no send message after the initial one on first connect.

Thanks for your assistance and patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants