use of net.glowstone.inventory.GlowBeaconInventory in project Glowstone by GlowstoneMC.
the class BeaconEffectHandler method handle.
@Override
public void handle(GlowSession session, BeaconEffectMessage message) {
GlowPlayer player = session.getPlayer();
// Verify that the current player is in a beacon
if (!(player.getOpenInventory().getTopInventory() instanceof GlowBeaconInventory)) {
return;
}
GlowBeaconInventory beacon = (GlowBeaconInventory) player.getOpenInventory().getTopInventory();
beacon.setActiveEffects(message.getPrimary(), message.getSecondary());
}
Aggregations