Class Plugin

java.lang.Object
io.github.antod3v.pterodactyl.Plugin
All Implemented Interfaces:
org.gradle.api.Plugin<org.gradle.api.Project>

public class Plugin extends Object implements org.gradle.api.Plugin<org.gradle.api.Project>
The Plugin class is responsible for applying the Pterodactyl configuration to a Gradle project. It implements the org.gradle.api.Plugin interface. This class provides the "deploy" task for uploading files and executing commands on a Pterodactyl server.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    apply(org.gradle.api.Project target)
    Apply the Pterodactyl configuration to the given project.
    protected com.mattmalec.pterodactyl4j.client.entities.ClientServer
    Creates a Pterodactyl client server using the provided credentials.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Plugin

      public Plugin()
  • Method Details

    • apply

      public void apply(org.gradle.api.Project target)
      Apply the Pterodactyl configuration to the given project.
      Specified by:
      apply in interface org.gradle.api.Plugin<org.gradle.api.Project>
      Parameters:
      target - The project to apply the Pterodactyl configuration to.
    • createClient

      protected com.mattmalec.pterodactyl4j.client.entities.ClientServer createClient(Credential credential)
      Creates a Pterodactyl client server using the provided credentials.
      Parameters:
      credential - The credential object containing the API URL, API key, and server identifier.
      Returns:
      The created Pterodactyl client server.