@EventHandler(priority = EventPriority.MONITOR)
public void onPlayerMove(PlayerMoveEvent event) {

if (plugin.datacore.getBoolean("users." + event.getPlayer().getName() + ".frozen") == true){
	
    Location from = event.getFrom();
    double xfrom = event.getFrom().getX();
    double yfrom = event.getFrom().getY();
    double zfrom = event.getFrom().getZ();
    double xto = event.getTo().getX();
    double yto = event.getTo().getY();
    double zto = event.getTo().getZ();
    if (!(xfrom == xto && yfrom == yto && zfrom == zto)) {
    event.getPlayer().teleport(from);
    }
}


if (plugin.datacore.getBoolean("events.evac") == true && plugin.config.getBoolean("evacExempt." + event.getPlayer().getName()) == false){
	
    Location from = event.getFrom();
    double xfrom = event.getFrom().getX();
    double yfrom = event.getFrom().getY();
    double zfrom = event.getFrom().getZ();
    double xto = event.getTo().getX();
    double yto = event.getTo().getY();
    double zto = event.getTo().getZ();
    if (!(xfrom == xto && yfrom == yto && zfrom == zto)) {
    event.getPlayer().teleport(from);
    }
}

}