mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-11-19 08:45:54 +01:00
Update deprecated PlayerPreLoginEvent to PlayerLoginEvent; backported from main branch
This commit is contained in:
parent
ade3c6b320
commit
25cf3b5bbc
@ -6,7 +6,7 @@ import org.bukkit.event.EventPriority;
|
|||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
||||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||||
import org.bukkit.event.player.PlayerPreLoginEvent;
|
import org.bukkit.event.player.PlayerLoginEvent;
|
||||||
|
|
||||||
import com.massivecraft.factions.zcore.persist.EM;
|
import com.massivecraft.factions.zcore.persist.EM;
|
||||||
import com.massivecraft.factions.zcore.persist.Entity;
|
import com.massivecraft.factions.zcore.persist.Entity;
|
||||||
@ -48,13 +48,13 @@ public class MPluginSecretPlayerListener implements Listener
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.LOWEST)
|
||||||
public void onPlayerPreLogin(PlayerPreLoginEvent event)
|
public void onPlayerPreLogin(PlayerLoginEvent event)
|
||||||
{
|
{
|
||||||
for (EntityCollection<? extends Entity> ecoll : EM.class2Entities.values())
|
for (EntityCollection<? extends Entity> ecoll : EM.class2Entities.values())
|
||||||
{
|
{
|
||||||
if (ecoll instanceof PlayerEntityCollection)
|
if (ecoll instanceof PlayerEntityCollection)
|
||||||
{
|
{
|
||||||
ecoll.get(event.getName());
|
ecoll.get(event.getPlayer().getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user