Search in sources :

Example 1 with PlayerResourcePackStatusEvent

use of org.bukkit.event.player.PlayerResourcePackStatusEvent in project Glowstone by GlowstoneMC.

the class ResourcePackStatusHandler method handle.

@Override
public void handle(GlowSession session, ResourcePackStatusMessage message) {
    GlowPlayer player = session.getPlayer();
    PlayerResourcePackStatusEvent.Status status = ResourcePackStatus.getStatus(message.getResult());
    player.setResourcePackStatus(status);
    EventFactory.getInstance().callEvent(new PlayerResourcePackStatusEvent(player, status, player.getResourcePackHash()));
}
Also used : PlayerResourcePackStatusEvent(org.bukkit.event.player.PlayerResourcePackStatusEvent) GlowPlayer(net.glowstone.entity.GlowPlayer)

Aggregations

GlowPlayer (net.glowstone.entity.GlowPlayer)1 PlayerResourcePackStatusEvent (org.bukkit.event.player.PlayerResourcePackStatusEvent)1