mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 05:36:46 +01:00
Fixed bug that caused NPE when trying to compare null parties
This commit is contained in:
parent
c4cd677021
commit
ab7b6ce460
@ -15,6 +15,7 @@ Version 1.3.09
|
|||||||
+ Added API for plugins to add custom tools directly via Spout - repair / abilities do not work ATM
|
+ Added API for plugins to add custom tools directly via Spout - repair / abilities do not work ATM
|
||||||
+ Added offline party members to the list displayed by /party
|
+ Added offline party members to the list displayed by /party
|
||||||
+ Added possibility to kick offline members from parties
|
+ Added possibility to kick offline members from parties
|
||||||
|
= Fixed bug that would cause a NPE for players that had no parties
|
||||||
= Fixed Vampirism not notifying the correct amount of stolen levels
|
= Fixed Vampirism not notifying the correct amount of stolen levels
|
||||||
= Fixed bug with Acrobatics not saving you from deadly falls
|
= Fixed bug with Acrobatics not saving you from deadly falls
|
||||||
= Fixed /mcremove being applied only after a reload
|
= Fixed /mcremove being applied only after a reload
|
||||||
|
@ -41,6 +41,10 @@ public class PartyManager {
|
|||||||
* @return true if they are in the same party, false otherwise
|
* @return true if they are in the same party, false otherwise
|
||||||
*/
|
*/
|
||||||
public boolean inSameParty(Player firstPlayer, Player secondPlayer) {
|
public boolean inSameParty(Player firstPlayer, Player secondPlayer) {
|
||||||
|
//Since party can be null at times, we need to make sure that it isn't null here
|
||||||
|
if(Users.getProfile(firstPlayer).getParty() == null || Users.getProfile(secondPlayer).getParty() == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
Party firstParty = Users.getProfile(firstPlayer).getParty();
|
Party firstParty = Users.getProfile(firstPlayer).getParty();
|
||||||
Party secondParty = Users.getProfile(secondPlayer).getParty();
|
Party secondParty = Users.getProfile(secondPlayer).getParty();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user