Skip to content

Commit

Permalink
Check for existence of mcMMO Overhaul party. Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
PikaMug committed Oct 12, 2021
1 parent 107f33c commit 7e5c0c7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>me.pikamug.unite</groupId>
<artifactId>Unite</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/me/pikamug/unite/Unite.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static Unite getInstance() {
public void hookProviders() {
hookProvider("Parties", PartyProvider_Parties.class, ServicePriority.Highest, "com.alessiodp.parties.api.interfaces.PartiesAPI");
hookProvider("DungeonsXL", PartyProvider_DungeonsXL.class, ServicePriority.Normal, "de.erethon.dungeonsxl.DungeonsXL");
hookProvider("mcMMO", PartyProvider_mcMMO.class, ServicePriority.High, "com.gmail.nossr50.party.PartyManager"); //TODO might not work
hookProvider("mcMMO", PartyProvider_mcMMO.class, ServicePriority.High, "com.gmail.nossr50.party.PartyManager");
}

private void hookProvider(String name, Class<? extends PartyProvider> hookClass, ServicePriority priority, String...packages) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ public boolean areInSameParty(UUID playerId1, UUID playerId2) {

@Override
public String getPartyName(UUID playerId) {
return PartyManager.getParty(Bukkit.getPlayer(playerId)).getName();
if (PartyManager.getParty(Bukkit.getPlayer(playerId)) != null) {
return PartyManager.getParty(Bukkit.getPlayer(playerId)).getName();
}
return null;
}

@Override
Expand Down

0 comments on commit 7e5c0c7

Please sign in to comment.