All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.nukkit.event.player.PlayerFreezeEvent Maven / Gradle / Ivy

There is a newer version: 1.20.40-r1
Show newest version
package cn.nukkit.event.player;

import cn.nukkit.Player;
import cn.nukkit.api.PowerNukkitXOnly;
import cn.nukkit.api.Since;
import cn.nukkit.event.Cancellable;
import cn.nukkit.event.HandlerList;

@PowerNukkitXOnly
@Since("1.6.0.0-PNX")
public class PlayerFreezeEvent extends PlayerEvent implements Cancellable {
    private float speedFactor;
    private float baseSpeed;

    private static final HandlerList handlers = new HandlerList();

    public static HandlerList getHandlers() {
        return handlers;
    }

    public PlayerFreezeEvent(Player player, float speedFactor, float baseSpeed) {
        this.player = player;
        this.speedFactor = speedFactor;
        this.baseSpeed = baseSpeed;
    }

    public void setBaseSpeed(float baseSpeed) {
        this.baseSpeed = baseSpeed;
    }

    public void setSpeedFactor(float speedFactor) {
        this.speedFactor = speedFactor;
    }

    public float getBaseSpeed() {
        return this.baseSpeed;
    }

    public float getSpeedFactor() {
        return this.speedFactor;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy