From 005be6c31ddc24dbc510746cd98f7a08ee6c9280 Mon Sep 17 00:00:00 2001 From: Egor Iskrenkov Date: Sat, 5 Oct 2024 22:17:42 +0200 Subject: [PATCH] Fix plugins downloader --- ruby/configuration.yml | 2 +- ruby/lib/minecraft/plugins/downloader.rb | 6 ++---- ruby/lib/minecraft/plugins/finders/base.rb | 1 + 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ruby/configuration.yml b/ruby/configuration.yml index bfe4fb8..780f7e8 100644 --- a/ruby/configuration.yml +++ b/ruby/configuration.yml @@ -7,4 +7,4 @@ minecraft: spiget: api_host: https://api.spiget.org/v2 plugins: - skinsrestorer: '15.4.2' + skinsrestorer: '15.4.3' diff --git a/ruby/lib/minecraft/plugins/downloader.rb b/ruby/lib/minecraft/plugins/downloader.rb index 402d142..e6b4b8e 100644 --- a/ruby/lib/minecraft/plugins/downloader.rb +++ b/ruby/lib/minecraft/plugins/downloader.rb @@ -19,13 +19,11 @@ def call resource = find_resource(name) raise Error, "Couldn't find #{name} plugin" unless resource + binding.irb + version = find_version(resource.id, version) raise Error, "Couldn't find #{name} v#{version}" unless version - unless resource.version.fetch(:uuid) == version.uuid - raise Error, "Version #{version} doesn't have external URL" - end - download(name, resource.id) end end diff --git a/ruby/lib/minecraft/plugins/finders/base.rb b/ruby/lib/minecraft/plugins/finders/base.rb index 76902d1..2d94bc2 100644 --- a/ruby/lib/minecraft/plugins/finders/base.rb +++ b/ruby/lib/minecraft/plugins/finders/base.rb @@ -21,6 +21,7 @@ def call def find_exact_match perform_search.find do |search_result| + binding.irb values = search_result.values_at(*search_conditions.keys).map do |value| value.is_a?(String) ? value.downcase : value end