mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Party NPE fix
This commit is contained in:
parent
227fb49dec
commit
7506646862
@ -7,6 +7,9 @@ Key:
|
|||||||
! Change
|
! Change
|
||||||
- Removal
|
- Removal
|
||||||
|
|
||||||
|
Version 2.1.47
|
||||||
|
Fix NPE when party leader is offline and players grab a party list
|
||||||
|
|
||||||
Version 2.1.46
|
Version 2.1.46
|
||||||
Party member lists now show the whole party, including offline players again.
|
Party member lists now show the whole party, including offline players again.
|
||||||
Party lists now have special markers for players who are in shared XP range
|
Party lists now have special markers for players who are in shared XP range
|
||||||
|
2
pom.xml
2
pom.xml
@ -2,7 +2,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
||||||
<artifactId>mcMMO</artifactId>
|
<artifactId>mcMMO</artifactId>
|
||||||
<version>2.1.46</version>
|
<version>2.1.47-SNAPSHOT</version>
|
||||||
<name>mcMMO</name>
|
<name>mcMMO</name>
|
||||||
<url>https://github.com/mcMMO-Dev/mcMMO</url>
|
<url>https://github.com/mcMMO-Dev/mcMMO</url>
|
||||||
<scm>
|
<scm>
|
||||||
|
@ -130,7 +130,5 @@ public class PartyInfoCommand implements CommandExecutor {
|
|||||||
player.sendMessage(LocaleLoader.getString("Commands.Party.Members.Header"));
|
player.sendMessage(LocaleLoader.getString("Commands.Party.Members.Header"));
|
||||||
player.sendMessage(LocaleLoader.getString("Commands.Party.MembersNear", nearMembers.size()+1, membersOnline));
|
player.sendMessage(LocaleLoader.getString("Commands.Party.MembersNear", nearMembers.size()+1, membersOnline));
|
||||||
player.sendMessage(party.createMembersList(player));
|
player.sendMessage(party.createMembersList(player));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -373,6 +373,9 @@ public class Party {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(offlineMembers.contains(leader.getUniqueId()))
|
||||||
|
isPartyLeaderOfflineOrHidden = true;
|
||||||
|
|
||||||
//Add all the actually offline members
|
//Add all the actually offline members
|
||||||
offlineOrHiddenPartyList.addAll(offlineMembers);
|
offlineOrHiddenPartyList.addAll(offlineMembers);
|
||||||
|
|
||||||
@ -407,10 +410,10 @@ public class Party {
|
|||||||
applyOnlineAndRangeFormatting(memberList, true, nearbyPlayerList.contains(Bukkit.getPlayer(leader.getUniqueId())));
|
applyOnlineAndRangeFormatting(memberList, true, nearbyPlayerList.contains(Bukkit.getPlayer(leader.getUniqueId())));
|
||||||
|
|
||||||
if(useDisplayNames) {
|
if(useDisplayNames) {
|
||||||
memberList.append(Bukkit.getPlayer(leader.getUniqueId()).getDisplayName());
|
memberList.append(leader.getPlayerName());
|
||||||
} else {
|
} else {
|
||||||
memberList.append(ChatColor.GOLD)
|
memberList.append(ChatColor.GOLD)
|
||||||
.append(Bukkit.getPlayer(leader.getUniqueId()).getName());
|
.append(Bukkit.getOfflinePlayer(leader.getUniqueId()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ public class MiningManager extends SkillManager {
|
|||||||
SkillUtils.handleDurabilityChange(getPlayer().getInventory().getItemInMainHand(), Config.getInstance().getAbilityToolDamage());
|
SkillUtils.handleDurabilityChange(getPlayer().getInventory().getItemInMainHand(), Config.getInstance().getAbilityToolDamage());
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((mcMMO.getModManager().isCustomMiningBlock(blockState) && !mcMMO.getModManager().getBlock(blockState).isDoubleDropEnabled()) || !Config.getInstance().getDoubleDropsEnabled(skill, material)) {
|
if ((mcMMO.getModManager().isCustomMiningBlock(blockState) && !mcMMO.getModManager().getBlock(blockState).isDoubleDropEnabled())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user