Add function to remove mods from a server
Fun thing we gain from this for free: the ability to scriptedly remove client-side mods from 1.7.10 and earlier packs
This commit is contained in:
parent
06adfd1694
commit
a162c43cce
@ -20,6 +20,9 @@ minecraft_forge_downloadurl: "https://files.minecraftforge.net/maven/net/minecra
|
||||
#minecraft_forge_packurl: https://path.to.your/modpack.zip
|
||||
# Define THIS if you want to download a bunch of mods by JAR URL:
|
||||
minecraft_forge_mods: []
|
||||
# Define THIS if you want to remove any mods that come with a pack by default
|
||||
# Just a list of filenames in /mods. Matches directories, too
|
||||
minecraft_forge_mods_remove: []
|
||||
minecraft_vanilla_install: no
|
||||
minecraft_vanilla_downloadurl: "https://launcher.mojang.com/v1/objects/35139deedbd5182953cf1caa23835da59ca3d7cd/server.jar"
|
||||
|
||||
|
@ -75,8 +75,13 @@
|
||||
- name: install mods
|
||||
get_url: dest="{{ minecraft_home }}/{{ minecraft_name }}/mods" url={{ item }}
|
||||
loop: "{{ minecraft_forge_mods }}"
|
||||
notify: restart minecraft {{ minecraft_name }}
|
||||
notify: "restart minecraft {{ minecraft_name }}"
|
||||
when: minecraft_forge_mods is iterable and minecraft_forge_mods != None
|
||||
- name: remove mods
|
||||
file: path={{ minecraft_home }}/{{ minecraft_name }}/mods/{{ item }} state=absent
|
||||
loop: "{{ minecraft_forge_mods_remove }}"
|
||||
notify: "restart minecraft {{ minecraft_name }}"
|
||||
when: minecraft_forge_mods_remove is iterable and minecraft_forge_mods_remove != None
|
||||
become: yes
|
||||
become_user: minecraft
|
||||
when: minecraft_forge_install and minecraft_forge_version is defined
|
||||
|
Loading…
Reference in New Issue
Block a user