mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 05:36:46 +01:00
Replaced deprecated calls to Users.getProfile() in our listeners
This commit is contained in:
parent
f51bdad6b4
commit
1dbe56b026
@ -263,7 +263,7 @@ public class BlockListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PlayerProfile profile = Users.getProfile(player);
|
PlayerProfile profile = Users.getPlayer(player).getProfile();
|
||||||
Block block = event.getBlock();
|
Block block = event.getBlock();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -22,6 +22,7 @@ import com.gmail.nossr50.mcMMO;
|
|||||||
import com.gmail.nossr50.chat.ChatManager;
|
import com.gmail.nossr50.chat.ChatManager;
|
||||||
import com.gmail.nossr50.config.AdvancedConfig;
|
import com.gmail.nossr50.config.AdvancedConfig;
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
|
import com.gmail.nossr50.datatypes.McMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.party.Party;
|
import com.gmail.nossr50.party.Party;
|
||||||
@ -62,7 +63,7 @@ public class PlayerListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PlayerProfile profile = Users.getProfile(player);
|
PlayerProfile profile = Users.getPlayer(player).getProfile();
|
||||||
|
|
||||||
if (profile.getGodMode() && !Permissions.mcgod(player)) {
|
if (profile.getGodMode() && !Permissions.mcgod(player)) {
|
||||||
profile.toggleGodMode();
|
profile.toggleGodMode();
|
||||||
@ -88,11 +89,12 @@ public class PlayerListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int skillLevel = Users.getProfile(player).getSkillLevel(SkillType.FISHING);
|
McMMOPlayer mcMMOPlayer = Users.getPlayer(player);
|
||||||
|
int skillLevel = mcMMOPlayer.getProfile().getSkillLevel(SkillType.FISHING);
|
||||||
|
|
||||||
switch (event.getState()) {
|
switch (event.getState()) {
|
||||||
case CAUGHT_FISH:
|
case CAUGHT_FISH:
|
||||||
Fishing.beginFishing(Users.getPlayer(player), skillLevel, event);
|
Fishing.beginFishing(mcMMOPlayer, skillLevel, event);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CAUGHT_ENTITY:
|
case CAUGHT_ENTITY:
|
||||||
@ -176,9 +178,7 @@ public class PlayerListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PlayerProfile profile = Users.getProfile(player);
|
Users.getPlayer(player).getProfile().actualizeRespawnATS();
|
||||||
|
|
||||||
profile.actualizeRespawnATS();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -334,7 +334,7 @@ public class PlayerListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PlayerProfile profile = Users.getProfile(player);
|
PlayerProfile profile = Users.getPlayer(player).getProfile();
|
||||||
|
|
||||||
if (profile.getPartyChatMode()) {
|
if (profile.getPartyChatMode()) {
|
||||||
Party party = profile.getParty();
|
Party party = profile.getParty();
|
||||||
|
Loading…
Reference in New Issue
Block a user