nolte / ansible-minecraft

Ansible role for provisioning a vanilla Minecraft server, forked devops-coop/minecraft/
https://galaxy.ansible.com/nolte/minecraft/
Apache License 2.0
20 stars 11 forks source link

Plugins from spigotmc.org and bukkit.org #151

Open Millesimus opened 3 years ago

Millesimus commented 3 years ago

First of all, thanks for this great ansible role! Building and installing Spigot works like a charm and is really effortless.

I just have a minor issue regarding plugins. I would like to install plugins from bukkit.org or spigotmc.org but the role fails, since it expects "jar" in the URL. If I remove that condition, it wouldn't work either because the connection fails (I assume they expect some sort of referrer or a browser user-agent).

nolte commented 3 years ago

Hi, Thanks for the Feedback,

At the moment i am not sure what you mean. If you want use a plugin, for example vault, you must use the redirected Download Location in your Config, like https://media.forgecdn.net/.... Don't use the URL from the UI like https://dev.bukkit.org/projects/vault/files/latest. The Redirect will be not support by the Role, at the moment.

Millesimus commented 3 years ago

Thanks, got it working for bukkit.org (still fiddling with spigotmc). Following the redirect would be great for auto-updating. :)

Millesimus commented 2 years ago

I experienced a strange bug with this. I had a plugin from dev.bukkit.org (Dynmap) that I loaded after another plugin (GriefPrevention) coming from another source and it would create "Ambiguous plugin name" errors. It took me a while to understand that the role didn't throw an error although it was not able to fetch Dynmap and re-used the GriefPrevention url:

last_update: 2022-06-06T10:22:00Z
plugin_key: Dynmap
original_url: https://dev.bukkit.org/projects/dynmap/files/3724063/download
url: https://github.com/TechFortress/GriefPrevention/releases/latest/download/GriefPrevention.jar
checksum_src: c3e563102be4e26711c4a956b4a5468c0edbcbdf
dest: /opt/minecraft/plugins/releases/normal/Dynmap.jar
md5sum: 489c34f5a3396a73d91614de566bba4b
size: 349801

Can you reproduce this behaviour or is it some local issue?

nolte commented 2 years ago

Hi,

I have tried to recreate the behaviour. You will be find the used config at issue_151_plugins/molecule.yml.

But in this test, the server starts successfully.

Can you give me some more Informations, like Ansible Version, OS (Ansible Host, and destination Server).

I think it would help if you could provide the full configuration from the used Role.

At the moment I would say that it is a local problem.

Millesimus commented 2 years ago

I made a PR so that you use the same link (not the correct redirected one but the incorrect one) and the same plugin order (order is important here, I assume).

To clarify, I now that these links are not supported. But if used, I would expect them to throw an error or simply fail. However, having an unsupported link resulted in a re-use of a successful download.