Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.rojo8399:PlaceholderAPI:4.5.1'
}
dependencies {
implementation("com.github.rojo8399:PlaceholderAPI:4.5.1")
}
<dependency>
<groupId>com.github.rojo8399</groupId>
<artifactId>PlaceholderAPI</artifactId>
<version>4.5.1</version>
</dependency>
libraryDependencies += "com.github.rojo8399" % "PlaceholderAPI" % "4.5.1"
:dependencies [[com.github.rojo8399/PlaceholderAPI "4.5.1"]]
If you were sent here from another plugin, simply download this plugin and install it in your mods folder. After the first start of this plugin, you will need to enable the default expansions in the config file to be able to use those placeholders. Example if you want Player placeholders, open the config and set <code>Player</code> to <code>True</code>. Now you can use %player_name% as a placeholder. This same method applies for every available expansion.
There is a chance that a plugin may update and cause one of the internal placeholder hooks to break. If this happens, please report the issue immediately so we can update the placeholder hook to the latest version of the plugin that broke.
Just drop this plugin into your mods folder and enable any default expansions you want to use in the config file.
View tutorials on how to use the API here.
If you're looking to contribute, the source code is available here.
If you find any bugs or would like to suggest features, please create an issue here