Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Sep 16, 2022. It is now read-only.
/ Party Public archive

Used by my plugins (or yours!) for players to group together for minigames

hopperelec/Party

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

If you're a developer and wish to use this plugin's API for your project, you must use Maven. This is obvious for most, but if you're not using it, I highly recommend you start doing so! (and if you use Gradle... I'm sorry for you)

In the tag in the pom.xml, add this code:

<repository>
  <id>party</id>
  <url>https://github.com/HopperElec/Party</url>
</repository>

And in the tag, add this code:

<dependency>
  <groupId>uk.co.hopperelec.mc</groupId>
  <artifactId>party</artifactId>
  <version>1.0.3</version>
</dependency>

Once you've added it through Maven and refreshed it, you then need to add it as a dependency in the plugin.yml. To do this, simply add this:

depend: [HopperParty]

Now you should be good to go!

To access the plugin, use this code:

Bukkit.getPluginManager().getPlugin("HopperParty");

And cast it to (HopperParty). I recommend, as a safety precaution, to makes sure the plugin isn't null, though. So you should end up with code looking like this:

final Plugin partyPlugin = Bukkit.getPluginManager().getPlugin("HopperParty");
if (partyPlugin == null) {
  System.out.println("Failed to get party plugin class! Cancelling start-up of the plugin!");
  setEnabled(false); return;
}
HopperParty partyClass = (HopperParty) partyPlugin;

From there, your IDE should be able to guide you after typing partyClass then a dot somewhere in your code! Have fun :D

About

Used by my plugins (or yours!) for players to group together for minigames

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors 2

  •  
  •  

Languages