Skip to content

Instantly share code, notes, and snippets.

@LB--
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LB--/3740fba98f92466270e8 to your computer and use it in GitHub Desktop.
Save LB--/3740fba98f92466270e8 to your computer and use it in GitHub Desktop.
//Access the KataPartyService
KataPartyService kps = getServer().getServicesManager().load(KataPartyService.class);
//Get the PartySet
IPartySet parties = kps.getPartySet();
//Get the members for the players p1 and p2
IParty.IMember a = parties.findMember(p1.getUniqueId());
IParty.IMember b = parties.findMember(p2.getUniqueId());
//Check if they are in the same party
if(a != null && b != null && a.getParty() == b.getParty())
{
//...your code here...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment