|
| 1 | +--- |
| 2 | +toc_max_heading_level: 4 |
| 3 | +slug: /adding-plugins |
| 4 | +--- |
| 5 | + |
| 6 | +# Adding Plugins |
| 7 | + |
| 8 | +Plugins are the most powerful way to extend the functionality of Paper beyond the configuration |
| 9 | +files. Functionality added by plugins can range from making milk restore hunger or dead bushes grow, |
| 10 | +to adding entirely new and original game modes or items. |
| 11 | + |
| 12 | +:::danger[Malicious Plugins] |
| 13 | + |
| 14 | +Ensure you fully trust the source of any plugin before installing it. Plugins are given **full and |
| 15 | +unrestricted** access to not only your server but also the machine that it runs on. Because of this, |
| 16 | +it is imperative that plugins only be installed from trusted sources. Be careful! |
| 17 | + |
| 18 | +::: |
| 19 | + |
| 20 | +## Finding Plugins |
| 21 | + |
| 22 | +Before installing a plugin, you'll need to find what you want to install. The best place to find plugins is [Hangar](https://hangar.papermc.io), Paper's plugin repository, but you can also find many plugins |
| 23 | +on [SpigotMC](https://www.spigotmc.org/resources/), |
| 24 | +[BukkitDev](https://dev.bukkit.org/bukkit-plugins), or the |
| 25 | +[PaperMC Forums](https://forums.papermc.io/forums/paper-plugin-releases/), while other plugins may |
| 26 | +release on [GitHub](https://github.com). One of the best ways to find plugins isn't to browse any of |
| 27 | +these sites directly but to search for plugins using a search engine. Searching for the function you |
| 28 | +desire followed by `Minecraft plugin` will often yield good results. |
| 29 | + |
| 30 | +:::tip[Spigot and Bukkit Plugins] |
| 31 | + |
| 32 | +Paper is compatible with both Spigot and Bukkit plugins. It's okay if a plugin does not explicitly |
| 33 | +mention Paper compatibility. It'll still work. |
| 34 | + |
| 35 | +::: |
| 36 | + |
| 37 | +## Installing Plugins |
| 38 | + |
| 39 | +1. Once you've found the plugin you'd like to install, download it. Ensure the file you have |
| 40 | + downloaded ends in `.jar`. Some plugins also distribute as `.zip` files, in which case you will |
| 41 | + need to extract the file and locate the `.jar` for your platform, often labelled `bukkit` or |
| 42 | + `paper`. |
| 43 | +2. Once you have the plugin downloaded locally, locate the `plugins` folder from the root directory |
| 44 | + of your Paper server. |
| 45 | +3. Drag and drop the plugin file (`.jar`) into the `plugins` folder. If you are using a shared |
| 46 | + hosting service, you may need to use their web panel or SFTP to upload the plugin; however, the |
| 47 | + procedure will be the same. |
| 48 | +4. Restart your server. The plugin should load. |
| 49 | +5. Check your work. Once the server has finished loading, run the `/plugins` command in-game or type |
| 50 | + `plugins` into the console. You should see your freshly installed plugin listed in green. If it |
| 51 | + is not listed or is colored red, continue to [troubleshooting](#troubleshooting). A plugin listed |
| 52 | + in red means that it is not currently enabled. For a freshly installed plugin, this often means |
| 53 | + that the plugin failed to load. |
| 54 | + |
| 55 | +## Troubleshooting |
| 56 | + |
| 57 | +### Check your logs |
| 58 | + |
| 59 | +The first step to troubleshooting installing plugins is to check the log of your server. Your |
| 60 | +server's most recent logs will be stored to the `logs/latest.log` file. You may need to scroll near |
| 61 | +the beginning of this file to see when plugins were loaded. |
| 62 | + |
| 63 | +#### Missing Dependencies |
| 64 | + |
| 65 | +If you see something like this: |
| 66 | + |
| 67 | +```log |
| 68 | +Could not load 'plugins/MyAwesomePlugin-1.0.0.jar' in folder 'plugins' |
| 69 | +org.bukkit.plugin.UnknownDependencyException: Unknown/missing dependency plugins: [Vault]. Please download and install these plugins to run 'MyAwesomePlugin'. |
| 70 | +``` |
| 71 | + |
| 72 | +This means that the plugin you tried to install is missing a dependency. A dependency, in this case, |
| 73 | +is another plugin that you must install for the first to function. While you will get a big scary |
| 74 | +error, the important line to look at is |
| 75 | + |
| 76 | +```log |
| 77 | +Unknown/missing dependency plugins: [Vault]. Please download and install these plugins to run 'MyAwesomePlugin'. |
| 78 | +``` |
| 79 | + |
| 80 | +This is telling you that in order to load `MyAwesomePlugin`, you must first install `Vault`. |
| 81 | + |
| 82 | +#### Invalid plugin.yml |
| 83 | + |
| 84 | +If you see something closer to this: |
| 85 | + |
| 86 | +```log |
| 87 | +Could not load 'plugins/MyAwesomePlugin-1.0.0.jar' in folder 'plugins' |
| 88 | +org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml |
| 89 | +``` |
| 90 | + |
| 91 | +This means that what you have downloaded isn't a valid Paper plugin. This is generally caused by one |
| 92 | +of the following: |
| 93 | + |
| 94 | +1. The plugin you downloaded isn't a plugin at all, but instead a mod for Forge, Fabric, or similar. |
| 95 | + These will not run on Paper. |
| 96 | +2. The plugin failed to download completely. Especially when using tools such as `curl` or `wget`, |
| 97 | + you can easily download error pages rather than the plugin you intended. This may also be caused |
| 98 | + by a network issue. Attempt to download the plugin again. If you are using FTP (not SFTP or a web |
| 99 | + panel) to upload your plugin to a shared hosting service, ensure your FTP client is in `binary` |
| 100 | + and not `ASCII` mode. Consult the documentation for your FTP client for details. |
| 101 | + |
| 102 | +#### Ambiguous plugin name |
| 103 | + |
| 104 | +If you see something like this: |
| 105 | + |
| 106 | +```log |
| 107 | +Ambiguous plugin name `Essentials' for files `plugins/EssentialsX-2.19.4.jar' and `plugins/Essentialsx-2.20.0-dev.jar' in `plugins' |
| 108 | +``` |
| 109 | + |
| 110 | +This means you have two plugins with the same name, which is not supported. In this case, two |
| 111 | +versions of EssentialsX are installed. Both the release `2.19.4`, and a development build of |
| 112 | +`2.20.0`. Ensure you only have one version of each plugin installed at one time. Delete the older |
| 113 | +version of the duplicate plugin, and restart your server. |
| 114 | + |
| 115 | +[//]: # "To prevent accidentally installing two versions of one plugin while updating, you can use" |
| 116 | +[//]: # "the `update` folder as described in the [Update Guide](/paper/how-to/update)." |
| 117 | + |
| 118 | +#### Something Else |
| 119 | + |
| 120 | +If you see an error, but it isn't similar to one of the above, attempt to read it yourself. While |
| 121 | +the full error may be large and scary, you likely only have to read the first one or two lines to |
| 122 | +understand what is going on. If you're not sure, do not hesitate to reach out for support on our |
| 123 | +[Discord](https://discord.gg/papermc) in the `#paper-help` channel. |
| 124 | + |
| 125 | +### If nothing is logged |
| 126 | + |
| 127 | +If nothing is logged, your server is likely not attempting to load any plugins. The conditions |
| 128 | +needed for the server to load a plugin are as follows: |
| 129 | + |
| 130 | +1. The file is at the root of the `plugins` folder, relative to its working directory. This is |
| 131 | + usually the same folder as the server JAR file. **Subdirectories of the `plugins` folder will not |
| 132 | + be checked.** All plugins must be in the root folder. |
| 133 | +2. The file ends in `.jar`. If your plugin does not end in `.jar`, what you have downloaded may not |
| 134 | + be a plugin. Note that some plugins distribute multiple jars as `.zip` files. If this is the |
| 135 | + case, you have to extract them before installing the plugin. |
| 136 | + |
| 137 | +If both of these are true and you still see no logs please reach out for support on our |
| 138 | +[Discord](https://discord.gg/papermc) server in the `#paper-help` channel. We will be happy to |
| 139 | +assist you. |
0 commit comments