mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
parent
6d0fe4fb58
commit
9b4070d971
@ -1,4 +1,5 @@
|
||||
Version 2.1.196
|
||||
Fixed a possible null error for our SelfListener
|
||||
Crossbows can now be fished up with enchantments
|
||||
|
||||
NOTES:
|
||||
|
@ -33,6 +33,13 @@ public class SelfListener implements Listener {
|
||||
public void onPlayerLevelUp(McMMOPlayerLevelUpEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
PrimarySkillType skill = event.getSkill();
|
||||
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||
|
||||
//TODO: Handle proper validation at the event level
|
||||
if(mcMMOPlayer == null || !mcMMOPlayer.getProfile().isLoaded())
|
||||
return;
|
||||
|
||||
if(player.isOnline()) {
|
||||
//Players can gain multiple levels especially during xprate events
|
||||
for(int i = 0; i < event.getLevelsGained(); i++)
|
||||
@ -73,6 +80,11 @@ public class SelfListener implements Listener {
|
||||
public void onPlayerXpGain(McMMOPlayerXpGainEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||
|
||||
//TODO: Handle proper validation at the event level
|
||||
if(mcMMOPlayer == null || !mcMMOPlayer.getProfile().isLoaded())
|
||||
return;
|
||||
|
||||
PrimarySkillType primarySkillType = event.getSkill();
|
||||
|
||||
if(mcMMOPlayer.isDebugMode()) {
|
||||
|
Loading…
Reference in New Issue
Block a user